/*************************************** Auteur : Pierre Aubert Mail : aubertp7@gmail.com Licence : CeCILL-C ****************************************/ #ifndef __PNTREELIGHT_H__ #define __PNTREELIGHT_H__ #include "PNTreeLightNode.h" ///@brief Describes only the PNTreeClass tree, without the size template class PNTreeLight{ public: PNTreeLight(); PNTreeLight(T pos[N], T size[N], T sizeLimit = 1e-5); virtual ~PNTreeLight(); PNTreeLight & operator = (const PNTreeLight & other); bool saveGnuplotData(const std::string & fileName); bool saveGnuplotData(std::ofstream & fs, T height); void setPosition(T pos[N]); void setSize(T size[N]); void setLimitSize(T limitSize); bool addElement(T * posData, U * data); const U * getLastData(T * posData) const; const U * getCloserData(T * posData) const; const U * getCloserDataDist(T & distFromCloserData, T * posData) const; protected: void copyPNTreeLight(const PNTreeLight & other); private: PNTreeLight(const PNTreeLight & other); void initialisationPNTreeLight(T pos[N], T size[N], T sizeLimit); ///Position of the hyper cube T p_pos[N]; ///Size of the hyper cube T p_size[N]; ///Size limit of the cells T p_sizeLimit; ///Table of the children of the current node PNTreeLightNode p_node; }; #include "PNTreeLight_impl.h" #endif