PhoenixGraph  01.2.3
Set of tools to simplify graph manipulation
Loading...
Searching...
No Matches
PNTreeLightNode< T, U, N > Class Template Reference

Describe a Quad tree. More...

#include <PNTreeLightNode.h>

Public Member Functions

bool addElement (T *posData, U *data, const T pos[N], const T size[N], const T sizeLimit)
 Add an element in the PNTreeLightNode.
void clear ()
 Clear the PNTreeLightNode content.
PNTreeLightNode< T, U, N > * getChild (unsigned char childId)
 Returns the child of the PNTreeLightNode.
const PNTreeLightNode< T, U, N > * getChild (unsigned char childId) const
 Returns the child of the PNTreeLightNode.
PNTreeLightNode< T, U, N > * getChildFromPos (T childPos[N], const T *posData, const T pos[N], const T size[N])
 Get the child of the PNTreeLightNode with a position.
const PNTreeLightNode< T, U, N > * getChildFromPos (T childPos[N], const T *posData, const T pos[N], const T size[N]) const
 Get the child of the PNTreeLightNode with a position.
bool getCloserData (U *&closerData, T &distFromCloserData, bool *tabIsNeighbourChecked, unsigned int nbNeighbour, const T *posData, const T pos[N], const T size[N]) const
 Get the closer data from the given position posData.
U * getData ()
const U * getData () const
T * getDataPos ()
 Returns the data position.
const T * getDataPos () const
 Returns the data position.
unsigned char getFullIndexChild (unsigned char index[N]) const
 Get the full index position of a child.
void getIndexOfChildFromPos (unsigned char index[N], const T posData[N], const T pos[N], const T size[N]) const
void getIndexOfChildFromPos (unsigned char index[N], T posData[N], T pos[N], T size[N])
const U * getLastData (const T *posData, const T pos[N], const T size[N]) const
 Get the data of the last node in the N tree.
PNTreeLightNode< T, U, N > * getTabChildren ()
 Returns the table of children of the PNTreeLightNode.
const PNTreeLightNode< T, U, N > * getTabChildren () const
 Returns the table of children of the PNTreeLightNode.
 PNTreeLightNode ()
 Default constructor of PNTreeLightNode.
bool saveGnuplotData (const std::string &fileName, T pos[N], T size[N])
 Saves the PNTreeLightNode into a txt file for gnuplot.
bool saveGnuplotData (std::ofstream &fs, T height, T pos[N], T size[N])
 Saves the PNTreeLightNode into a txt file for gnuplot.
virtual ~PNTreeLightNode ()
 Destructeur of PNTreeLightNode.

Protected Member Functions

void copyPNTreeLightNode (const PNTreeLightNode< T, U, N > &other)
 Copy function of PNTreeLightNode.

Private Member Functions

void initialisationPNTreeLightNode ()
 Initialisation function of the class PNTreeLightNode.
 PNTreeLightNode (const PNTreeLightNode< T, U, N > &other)
 Copy constructor of PNTreeLightNode.
bool split (const T pos[N], const T size[N], T sizeLimit)
 Split the PNTreeLightNode.

Private Attributes

U * p_data
 Data of the node.
T * p_posData
 Position of the data in the cell.
PNTreeLightNode< T, U, N > * p_tableChildren
 Position of the data in the hyper cube.

Detailed Description

template<typename T, typename U, unsigned char N>
class PNTreeLightNode< T, U, N >

Describe a Quad tree.

T : Type of the positions U : type of the data pointors to be stored N : number of dimensions of the N Tree

Definition at line 22 of file PNTreeLightNode.h.

Constructor & Destructor Documentation

◆ PNTreeLightNode() [1/2]

template<typename T, typename U, unsigned char N>
PNTreeLightNode< T, U, N >::PNTreeLightNode ( )

Default constructor of PNTreeLightNode.

Definition at line 19 of file PNTreeLightNode_impl.h.

19 {
21}
void initialisationPNTreeLightNode()
Initialisation function of the class PNTreeLightNode.

References initialisationPNTreeLightNode().

Referenced by addElement(), clear(), copyPNTreeLightNode(), getChild(), getChild(), getChildFromPos(), getChildFromPos(), getCloserData(), getData(), getIndexOfChildFromPos(), getLastData(), getTabChildren(), getTabChildren(), PNTreeLightNode(), and split().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~PNTreeLightNode()

template<typename T, typename U, unsigned char N>
PNTreeLightNode< T, U, N >::~PNTreeLightNode ( )
virtual

Destructeur of PNTreeLightNode.

Definition at line 33 of file PNTreeLightNode_impl.h.

33 {
34 clear();
35}
void clear()
Clear the PNTreeLightNode content.

References clear().

Here is the call graph for this function:

◆ PNTreeLightNode() [2/2]

template<typename T, typename U, unsigned char N>
PNTreeLightNode< T, U, N >::PNTreeLightNode ( const PNTreeLightNode< T, U, N > & other)
private

Copy constructor of PNTreeLightNode.

Parameters
other: class to copy

Definition at line 27 of file PNTreeLightNode_impl.h.

27 {
29}
Describe a Quad tree.
void copyPNTreeLightNode(const PNTreeLightNode< T, U, N > &other)
Copy function of PNTreeLightNode.

References copyPNTreeLightNode(), and PNTreeLightNode().

Here is the call graph for this function:

Member Function Documentation

◆ addElement()

template<typename T, typename U, unsigned char N>
bool PNTreeLightNode< T, U, N >::addElement ( T * posData,
U * data,
const T pos[N],
const T size[N],
const T sizeLimit )

Add an element in the PNTreeLightNode.

Parameters
posData: position of the data
data: pointer to the data we want to sort
pos: position of the current node
size: size of the current node
sizeLimit: limit of the cell size
Returns
true on success, false otherwise

Definition at line 70 of file PNTreeLightNode_impl.h.

70 {
72 return false;
73 }
74 if(p_tableChildren == NULL){
75 if(p_data == NULL){ //The cell is empty
76 p_data = data;
78 return true;
79 }else{ //There is a data in the cell
80 if(!split(pos, size, sizeLimit)) return false;
82 }
83 }else{ //There are children
84 T childPos[N];
86 if(child == NULL){
87 return false;
88 }else{
89 T childSize[N];
92 }
93 }
94}
void makeHalfSize(T childSize[N], const T parentSize[N])
Get the size of the child.
PNTreeLightNode< T, U, N > * p_tableChildren
Position of the data in the hyper cube.
PNTreeLightNode()
Default constructor of PNTreeLightNode.
bool addElement(T *posData, U *data, const T pos[N], const T size[N], const T sizeLimit)
Add an element in the PNTreeLightNode.
bool split(const T pos[N], const T size[N], T sizeLimit)
Split the PNTreeLightNode.
U * p_data
Data of the node.
T * p_posData
Position of the data in the cell.
const PNTreeLightNode< T, U, N > * getChildFromPos(T childPos[N], const T *posData, const T pos[N], const T size[N]) const
Get the child of the PNTreeLightNode with a position.

References addElement(), checkSizeLimitLight(), getChildFromPos(), makeHalfSize(), p_data, p_posData, p_tableChildren, PNTreeLightNode(), and split().

Referenced by addElement(), and split().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear()

template<typename T, typename U, unsigned char N>
void PNTreeLightNode< T, U, N >::clear ( )

Clear the PNTreeLightNode content.

Definition at line 176 of file PNTreeLightNode_impl.h.

176 {
177 if(p_tableChildren != NULL){
178 for(unsigned char i(0); i < PPower<2, N>::Value; ++i){
180 child->clear();
181 }
182 delete [] p_tableChildren;
184 }
185 p_data = NULL;
186}

References clear(), p_data, p_tableChildren, and PNTreeLightNode().

Referenced by clear(), and ~PNTreeLightNode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ copyPNTreeLightNode()

template<typename T, typename U, unsigned char N>
void PNTreeLightNode< T, U, N >::copyPNTreeLightNode ( const PNTreeLightNode< T, U, N > & other)
protected

Copy function of PNTreeLightNode.

Parameters
other: class to copy

Definition at line 453 of file PNTreeLightNode_impl.h.

453 {
454
455}

References PNTreeLightNode().

Referenced by PNTreeLightNode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getChild() [1/2]

template<typename T, typename U, unsigned char N>
PNTreeLightNode< T, U, N > * PNTreeLightNode< T, U, N >::getChild ( unsigned char childId)

Returns the child of the PNTreeLightNode.

Parameters
childId: id of the child we want to have
Returns
pointer to the child or NULL if there is not

Definition at line 444 of file PNTreeLightNode_impl.h.

444 {
446 return &(p_tableChildren[childId]);
447}

References p_tableChildren, PNTreeLightNode(), and PPower< V, N >::Value.

Here is the call graph for this function:

◆ getChild() [2/2]

template<typename T, typename U, unsigned char N>
const PNTreeLightNode< T, U, N > * PNTreeLightNode< T, U, N >::getChild ( unsigned char childId) const

Returns the child of the PNTreeLightNode.

Parameters
childId: id of the child we want to have
Returns
pointer to the child or NULL if there is not

Definition at line 434 of file PNTreeLightNode_impl.h.

434 {
436 return &(p_tableChildren[childId]);
437}

References p_tableChildren, PNTreeLightNode(), and PPower< V, N >::Value.

Here is the call graph for this function:

◆ getChildFromPos() [1/2]

template<typename T, typename U, unsigned char N>
PNTreeLightNode< T, U, N > * PNTreeLightNode< T, U, N >::getChildFromPos ( T childPos[N],
const T * posData,
const T pos[N],
const T size[N] )

Get the child of the PNTreeLightNode with a position.

Parameters
[out]childPos: position of the child
posData: position of the data
pos: position of the current node
size: size of the current node
Returns
child of the current PNTreeLightNode which contains the position (pos)

Definition at line 346 of file PNTreeLightNode_impl.h.

346 {
347 if(p_tableChildren == NULL) return NULL;
348 unsigned char posChild(0), base(1);
349 bool cond;
350 for(unsigned char j(0); j < N; ++j){
351 cond = ((posData[j] - pos[j]) > size[j]*0.5);
352 childPos[j] = pos[j] + cond*size[j]*0.5;
353 posChild += cond*base;
354 base *= 2; //on poura faire du décalage de bit plus tard
355 }
356 if(posChild >= PPower<2, N>::Value) return NULL;
357 else{
358// std::cerr << "PNTreeLightNode<T, U, N>::getChildFromPos : posChild = " << ((int)posChild) << std::endl;
359 return &(p_tableChildren[posChild]);
360 }
361}

References p_tableChildren, PNTreeLightNode(), and PPower< V, N >::Value.

Here is the call graph for this function:

◆ getChildFromPos() [2/2]

template<typename T, typename U, unsigned char N>
const PNTreeLightNode< T, U, N > * PNTreeLightNode< T, U, N >::getChildFromPos ( T childPos[N],
const T * posData,
const T pos[N],
const T size[N] ) const

Get the child of the PNTreeLightNode with a position.

Parameters
[out]childPos: position of the child
posData: position of the data
pos: position of the current node
size: size of the current node
Returns
child of the current PNTreeLightNode which contains the position (pos)

Definition at line 324 of file PNTreeLightNode_impl.h.

324 {
325 if(p_tableChildren == NULL) return NULL;
326 unsigned char posChild(0), base(1);
327 bool cond;
328 for(unsigned char j(0); j < N; ++j){
329 cond = ((posData[j] - pos[j]) > size[j]*0.5);
330 childPos[j] = pos[j] + cond*size[j]*0.5;
331 posChild += cond*base;
332 base *= 2; //on poura faire du décalage de bit plus tard
333 }
334 if(posChild >= PPower<2, N>::Value) return NULL;
335 else return &(p_tableChildren[posChild]);
336}

References p_tableChildren, PNTreeLightNode(), and PPower< V, N >::Value.

Referenced by addElement(), getCloserData(), getLastData(), and split().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCloserData()

template<typename T, typename U, unsigned char N>
bool PNTreeLightNode< T, U, N >::getCloserData ( U *& closerData,
T & distFromCloserData,
bool * tabIsNeighbourChecked,
unsigned int nbNeighbour,
const T * posData,
const T pos[N],
const T size[N] ) const

Get the closer data from the given position posData.

Parameters
[out]closerData: pointer to the closer data found
[out]distFromCloserData: distance from the closer data to the search position posData
[out]tabIsNeighbourChecked: table of the checked neighbours (true), or unchecked neighbours (false)
nbNeighbour: size of the table of neighbours
posData: position used to search the closer data
pos: position of the current node
size: size of the current node
Returns
true if the closer data has been found, false if the parent needs to keep searching

Definition at line 258 of file PNTreeLightNode_impl.h.

260{
261 if(p_tableChildren == NULL){ //If the node has no child
262 if(p_data == NULL) return false; //If the node has no data
263 else{ //If the node has data
264 if(closerData == NULL){
267 return true;
268 }else{
273 }
274 return false;
275 }
276 }
277 }else{ //If the node has children
278 T childPos[N];
280 if(child == NULL) return false;
281 else{
282 T childSize[N];
285 if(b) return true;
286 else{
287 unsigned char indexChild[N], currentChildIndex[N];
291
292 for(unsigned char i(0); i < PPower<2, N>::Value; ++i){
293 if(i == fullIndexChild) continue;
294 for(unsigned char j(0); j < N; ++j){
295 currentChildIndex[j] = (i >> j) & 1;
297 }
299 //If the neighbours is already checked, skip it
301 //If the neighbours is not check yet, check it and write it in the tabIsNeighbourChecked
305 {
306 return true;
307 }
308 }
310 return false;
311 }
312 }
313 }
314}
bool isNeighbourSearchFinised(const bool *tabIsNeighbourChecked, unsigned int nbNeighbour)
Says is the neighbours search is finised.
T getDistanceFromData(const T posA[N], const T posB[N])
Get the distance between two points.
void getIndexOfChildFromPos(unsigned char index[N], const T posData[N], const T pos[N], const T size[N]) const
unsigned char getFullIndexChild(unsigned char index[N]) const
Get the full index position of a child.
bool getCloserData(U *&closerData, T &distFromCloserData, bool *tabIsNeighbourChecked, unsigned int nbNeighbour, const T *posData, const T pos[N], const T size[N]) const
Get the closer data from the given position posData.

References getChildFromPos(), getCloserData(), getDistanceFromData(), getFullIndexChild(), getIndexOfChildFromPos(), getNeighbourCellIndex(), isNeighbourSearchFinised(), makeHalfSize(), p_data, p_posData, p_tableChildren, and PNTreeLightNode().

Referenced by getCloserData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getData() [1/2]

template<typename T, typename U, unsigned char N>
U * PNTreeLightNode< T, U, N >::getData ( )

References PNTreeLightNode().

Here is the call graph for this function:

◆ getData() [2/2]

template<typename T, typename U, unsigned char N>
const U * PNTreeLightNode< T, U, N >::getData ( ) const

◆ getDataPos() [1/2]

template<typename T, typename U, unsigned char N>
T * PNTreeLightNode< T, U, N >::getDataPos ( )

Returns the data position.

Returns
data position

Definition at line 415 of file PNTreeLightNode_impl.h.

415{return p_posData;}

References p_posData.

◆ getDataPos() [2/2]

template<typename T, typename U, unsigned char N>
const T * PNTreeLightNode< T, U, N >::getDataPos ( ) const

Returns the data position.

Returns
data position

Definition at line 409 of file PNTreeLightNode_impl.h.

409{return p_posData;}

References p_posData.

◆ getFullIndexChild()

template<typename T, typename U, unsigned char N>
unsigned char PNTreeLightNode< T, U, N >::getFullIndexChild ( unsigned char index[N]) const

Get the full index position of a child.

Parameters
index: vector of index position of a child
Returns
full index position of a child

Definition at line 396 of file PNTreeLightNode_impl.h.

396 {
397 unsigned char posChild(0), base(1);
398 for(unsigned char j(0); j < N; ++j){
399 posChild += (index[j])*base;
400 base *= 2; //on poura faire du décalage de bit plus tard
401 }
402 return posChild;
403}

Referenced by getCloserData().

Here is the caller graph for this function:

◆ getIndexOfChildFromPos() [1/2]

template<typename T, typename U, unsigned char N>
void PNTreeLightNode< T, U, N >::getIndexOfChildFromPos ( unsigned char index[N],
const T posData[N],
const T pos[N],
const T size[N] ) const

Referenced by getCloserData().

Here is the caller graph for this function:

◆ getIndexOfChildFromPos() [2/2]

template<typename T, typename U, unsigned char N>
void PNTreeLightNode< T, U, N >::getIndexOfChildFromPos ( unsigned char index[N],
T posData[N],
T pos[N],
T size[N] )

References PNTreeLightNode().

Here is the call graph for this function:

◆ getLastData()

template<typename T, typename U, unsigned char N>
const U * PNTreeLightNode< T, U, N >::getLastData ( const T * posData,
const T pos[N],
const T size[N] ) const

Get the data of the last node in the N tree.

Parameters
posData: position of the data
pos: position of the current node
size: size of the current node
Returns
data of the last node in the N tree

Definition at line 195 of file PNTreeLightNode_impl.h.

195 {
196 if(p_tableChildren == NULL){
197 if(p_data == NULL) return NULL;
198 else return p_data;
199 }else{
200 T childPos[N];
202 if(child == NULL) return NULL;
203 else{
204 T childSize[N];
207 }
208 }
209}
const U * getLastData(const T *posData, const T pos[N], const T size[N]) const
Get the data of the last node in the N tree.

References getChildFromPos(), getLastData(), makeHalfSize(), p_data, p_tableChildren, and PNTreeLightNode().

Referenced by getLastData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTabChildren() [1/2]

template<typename T, typename U, unsigned char N>
PNTreeLightNode< T, U, N > * PNTreeLightNode< T, U, N >::getTabChildren ( )

Returns the table of children of the PNTreeLightNode.

Returns
table of children of the PNTreeLightNode

Definition at line 427 of file PNTreeLightNode_impl.h.

427{return p_tableChildren;}

References p_tableChildren, and PNTreeLightNode().

Here is the call graph for this function:

◆ getTabChildren() [2/2]

template<typename T, typename U, unsigned char N>
const PNTreeLightNode< T, U, N > * PNTreeLightNode< T, U, N >::getTabChildren ( ) const

Returns the table of children of the PNTreeLightNode.

Returns
table of children of the PNTreeLightNode

Definition at line 421 of file PNTreeLightNode_impl.h.

421{return p_tableChildren;}

References p_tableChildren, and PNTreeLightNode().

Here is the call graph for this function:

◆ initialisationPNTreeLightNode()

template<typename T, typename U, unsigned char N>
void PNTreeLightNode< T, U, N >::initialisationPNTreeLightNode ( )
private

Initialisation function of the class PNTreeLightNode.

Definition at line 499 of file PNTreeLightNode_impl.h.

499 {
500 p_posData = NULL;
501 p_data = NULL;
503}

References p_data, p_posData, and p_tableChildren.

Referenced by PNTreeLightNode().

Here is the caller graph for this function:

◆ saveGnuplotData() [1/2]

template<typename T, typename U, unsigned char N>
bool PNTreeLightNode< T, U, N >::saveGnuplotData ( const std::string & fileName,
T pos[N],
T size[N] )

Saves the PNTreeLightNode into a txt file for gnuplot.

Parameters
fileName: name of the text file we want to write
pos: position of the current node
size: size of the current node
Returns
true on success, false otherwise

Definition at line 103 of file PNTreeLightNode_impl.h.

103 {
104 if(fileName == "") return false;
106 fs.open(fileName);
107 if(!fs.is_open()){return false;}
108 bool b = saveGnuplotData(fs, 0, pos, size);
109 fs.close();
110 return b;
111}
bool saveGnuplotData(const std::string &fileName, T pos[N], T size[N])
Saves the PNTreeLightNode into a txt file for gnuplot.

References saveGnuplotData().

Referenced by saveGnuplotData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveGnuplotData() [2/2]

template<typename T, typename U, unsigned char N>
bool PNTreeLightNode< T, U, N >::saveGnuplotData ( std::ofstream & fs,
T height,
T pos[N],
T size[N] )

Saves the PNTreeLightNode into a txt file for gnuplot.

Parameters
fs: text file we want to write
height: height of the quad to draw
pos: position of the current node
size: size of the current node
Returns
true on success, false otherwise

Definition at line 121 of file PNTreeLightNode_impl.h.

121 {
122 if(N == 2){
123 fs << pos[0] << "\t" << pos[1] << "\t" << height << std::endl;
124 fs << (pos[0] + size[0]) << "\t" << pos[1] << "\t" << height << std::endl;
125 fs << (pos[0] + size[0]) << "\t" << (pos[1] + size[1]) << "\t" << height << std::endl;
126 fs << pos[0] << "\t" << (pos[1] + size[1]) << "\t" << height << std::endl;
127 fs << pos[0] << "\t" << pos[1] << "\t" << height << std::endl;
128 }else if(N == 3){
129 T px0(pos[0]), px1(pos[0] + size[0]);
130 T py0(pos[1]), py1(pos[1] + size[1]);
131 T pz0(pos[2]), pz1(pos[2] + size[2]);
132
133 //lower quad
134 fs << px0 << "\t" << py0 << "\t" << pz0 << std::endl;
135 fs << px1 << "\t" << py0 << "\t" << pz0 << std::endl;
136 fs << px1 << "\t" << py1 << "\t" << pz0 << std::endl;
137 fs << px0 << "\t" << py1 << "\t" << pz0 << std::endl;
138 fs << px0 << "\t" << py0 << "\t" << pz0 << std::endl;
139 fs << std::endl;
140 //upper quad
141 fs << px0 << "\t" << py0 << "\t" << pz1 << std::endl;
142 fs << px1 << "\t" << py0 << "\t" << pz1 << std::endl;
143 fs << px1 << "\t" << py1 << "\t" << pz1 << std::endl;
144 fs << px0 << "\t" << py1 << "\t" << pz1 << std::endl;
145 fs << px0 << "\t" << py0 << "\t" << pz1 << std::endl;
146 fs << std::endl;
147 //Lines on Oz axis
148 fs << px0 << "\t" << py0 << "\t" << pz0 << std::endl;
149 fs << px0 << "\t" << py0 << "\t" << pz1 << std::endl;
150 fs << std::endl;
151 fs << px0 << "\t" << py1 << "\t" << pz0 << std::endl;
152 fs << px0 << "\t" << py1 << "\t" << pz1 << std::endl;
153 fs << std::endl;
154 fs << px1 << "\t" << py1 << "\t" << pz0 << std::endl;
155 fs << px1 << "\t" << py1 << "\t" << pz1 << std::endl;
156 fs << std::endl;
157 fs << px1 << "\t" << py0 << "\t" << pz0 << std::endl;
158 fs << px1 << "\t" << py0 << "\t" << pz1 << std::endl;
159 }
160 fs << std::endl;
161 if(p_tableChildren != NULL){
164 for(unsigned char i(0); i < PPower<2, N>::Value; ++i){
165 for(unsigned char k(0); k < N; ++k){
166 posChild[k] = pos[k] + ((i >> k) & 1)*childSize[k];
167 }
168 p_tableChildren[i].saveGnuplotData(fs, height + 1, posChild, childSize);
169 }
170 }
171 return true;
172}

References makeHalfSize(), and p_tableChildren.

Here is the call graph for this function:

◆ split()

template<typename T, typename U, unsigned char N>
bool PNTreeLightNode< T, U, N >::split ( const T pos[N],
const T size[N],
T sizeLimit )
private

Split the PNTreeLightNode.

Parameters
pos: position of the current node
size: size of the current node
sizeLimit: limit of the cell size
Returns
true on success, false otherwise

Definition at line 464 of file PNTreeLightNode_impl.h.

464 {
465 if(p_tableChildren != NULL || p_data == NULL){
466 std::cerr << "PNTreeLightNode<T, U, N>::split() : current node already split" << std::endl;
467 return false;
468 }
469// std::cerr << "PNTreeLightNode<T, U, N>::split() : begin" << std::endl;
473// std::cerr << "PNTreeLightNode<T, U, N>::split : can't split more, child sizes less than " << sizeLimit << std::endl;
474 return false;
475 }
476 unsigned char nbChildren(PPower<2, N>::Value);
478 for(unsigned char i(0); i < nbChildren; ++i){
481 child->p_data = NULL;
483 }
484// std::cerr << "PNTreeLightNode<T, U, N>::split : replace child" << std::endl;
485 T childPos[N];
487 bool b = true;;
488 if(child == NULL) return false;
489 else{
491 }
492 p_data = NULL;
493 p_posData = NULL;
494 return b;
495}

References addElement(), checkSizeLimitLight(), getChildFromPos(), makeHalfSize(), p_data, p_posData, p_tableChildren, PNTreeLightNode(), and PPower< V, N >::Value.

Referenced by addElement().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ p_data

template<typename T, typename U, unsigned char N>
U* PNTreeLightNode< T, U, N >::p_data
private

Data of the node.

Definition at line 66 of file PNTreeLightNode.h.

Referenced by addElement(), clear(), getCloserData(), getLastData(), initialisationPNTreeLightNode(), and split().

◆ p_posData

template<typename T, typename U, unsigned char N>
T* PNTreeLightNode< T, U, N >::p_posData
private

Position of the data in the cell.

Definition at line 64 of file PNTreeLightNode.h.

Referenced by addElement(), getCloserData(), getDataPos(), getDataPos(), initialisationPNTreeLightNode(), and split().

◆ p_tableChildren

template<typename T, typename U, unsigned char N>
PNTreeLightNode<T,U,N>* PNTreeLightNode< T, U, N >::p_tableChildren
private

The documentation for this class was generated from the following files: