PhoenixGraph  01.0.0
Set of tools to simplify graph manipulation
Loading...
Searching...
No Matches
PNTreeLight.h
Go to the documentation of this file.
1/***************************************
2 Auteur : Pierre Aubert
3 Mail : pierre.aubert@lapp.in2p3.fr
4 Licence : CeCILL-C
5****************************************/
6
7#ifndef __PNTREELIGHT_H__
8#define __PNTREELIGHT_H__
9
10#include "PNTreeLightNode.h"
11
13template<typename T, typename U, unsigned char N>
15 public:
17 PNTreeLight(T pos[N], T size[N], T sizeLimit = 1e-5);
18 virtual ~PNTreeLight();
20
21 bool saveGnuplotData(const std::string & fileName);
22 bool saveGnuplotData(std::ofstream & fs, T height);
23
24 void setPosition(T pos[N]);
25 void setSize(T size[N]);
26 void setLimitSize(T limitSize);
27
28 bool addElement(T * posData, U * data);
29 const U * getLastData(T * posData) const;
30 const U * getCloserData(T * posData) const;
31 const U * getCloserDataDist(T & distFromCloserData, T * posData) const;
32
33 protected:
34 void copyPNTreeLight(const PNTreeLight<T,U,N> & other);
35
36 private:
37 PNTreeLight(const PNTreeLight<T,U,N> & other);
38 void initialisationPNTreeLight(T pos[N], T size[N], T sizeLimit);
39
41 T p_pos[N];
43 T p_size[N];
48};
49
50#include "PNTreeLight_impl.h"
51
52
53#endif
54
Describe a Quad tree.
void setPosition(T pos[N])
Set the position of the PNTreeLight.
virtual ~PNTreeLight()
Destructeur of PNTreeLight.
PNTreeLight & operator=(const PNTreeLight< T, U, N > &other)
Definition of equal operator of PNTreeLight.
PNTreeLight()
Default constructeur of PNTreeLight.
bool saveGnuplotData(const std::string &fileName)
Saves the PNTreeLight into a txt file for gnuplot.
T p_pos[N]
Position of the hyper cube.
Definition PNTreeLight.h:41
T p_sizeLimit
Size limit of the cells.
Definition PNTreeLight.h:45
const U * getLastData(T *posData) const
Get the data of the last node in the N tree.
void copyPNTreeLight(const PNTreeLight< T, U, N > &other)
Copy function of PNTreeLight.
T p_size[N]
Size of the hyper cube.
Definition PNTreeLight.h:43
PNTreeLightNode< T, U, N > p_node
Table of the children of the current node.
Definition PNTreeLight.h:47
const U * getCloserData(T *posData) const
Get the closer data from the given position.
void setSize(T size[N])
Set the size of the PNTreeLight.
const U * getCloserDataDist(T &distFromCloserData, T *posData) const
Get the closer data from the given position.
bool addElement(T *posData, U *data)
Add an element in the PNTreeLightNode.
void setLimitSize(T limitSize)
Set the limit size of the PNTreeLight cells.
void initialisationPNTreeLight(T pos[N], T size[N], T sizeLimit)
Initialisation function of the class PNTreeLight.