Further details of how non-recursive TreeNode design works:
(for a 2D tree)
(m_tree)
+ -- 0
(a)+ - 0
1
1 +
1 <------you are here
+ - + - 0
0 1
0 1
0 0
for the node indicated, the 'index' vector would contain
index=[ 0 1 3 ...............]
parents=[&m_tree &a ..................]
or directly refered to as m_tree.nodes[1].nodes[3]
the tree indicates a covering of an index space in either
1 or 0. 1 is stored in the tree by pointing at the static
'full' data member, 0 is stored as a 0.
every 'nodes' member of a TreeNode object can be either
0, &full, or a pointer .
The interpretation of the tree depends on what m_spanBox is.
nodes[i] indicates whether the i'th quadrant of the parent
Box is full, empty, or needs to be parsed deeper.
|
Public Member Functions |
| TreeIntVectSet () |
| TreeIntVectSet (const Box &) |
| TreeIntVectSet (const TreeIntVectSet &a_sivs) |
| ~TreeIntVectSet () |
void | define (const Box &) |
void | define (const TreeIntVectSet &a_sivs) |
TreeIntVectSet & | operator= (const TreeIntVectSet &a_sivs) |
TreeIntVectSet & | operator|= (const TreeIntVectSet &a_sivs) |
| or
|
TreeIntVectSet & | operator|= (const IntVect &a_iv) |
TreeIntVectSet & | operator|= (const Box &a_box) |
TreeIntVectSet & | operator &= (const TreeIntVectSet &s_sivs) |
| and
|
TreeIntVectSet & | operator &= (const Box &a_box) |
| and
|
TreeIntVectSet & | operator &= (const ProblemDomain &a_domain) |
| and
|
TreeIntVectSet & | operator-= (const TreeIntVectSet &a_sivs) |
| not
|
TreeIntVectSet & | operator-= (const IntVect &a_iv) |
| not
|
TreeIntVectSet & | operator-= (const Box &a_box) |
| not
|
bool | operator== (const TreeIntVectSet &lhs) const |
| returns true if
|
Vector< Box > | createBoxes () const |
| Returns Vector<Box> representation of this IntVectSet.
|
void | createBoxes (Vector< Box > &boxes, int &size) const |
| Returns Vector<Box> representation of this IntVectSet.
|
bool | contains (const IntVect &iv) const |
bool | contains (const Box &box) const |
TreeIntVectSet | chop (int idir, int chop_pnt) |
void | grow (int igrow) |
| - See also:
- IntVectSet::grow
|
void | grow (int idir, int igrow) |
void | refine (int iref=2) |
| fast if iref is power of 2
|
void | coarsen (int iref=2) |
| fast if iref is power of 2
|
void | shift (const IntVect &iv) |
| slow operation
|
void | clear () |
void | nestingRegion (int a_radius, const Box &a_domain, int granularity) |
void | nestingRegion (int a_radius, const ProblemDomain &a_domain, int granularity) |
const Box & | minBox () const |
bool | isEmpty () const |
int | numPts () const |
void | compact () const |
void | recalcMinBox () const |
|
int | linearSize () const |
void | linearIn (const void *const inBuf) |
void | linearOut (void *const a_outBuf) const |
Private Member Functions |
void | trimCoarsen (int icoarse) |
void | growTree () |
Static Private Member Functions |
void | quadrantBox (const Box &inputBox, int quadrant, Box &outputQuadrant) |
void | clearTree (TreeNode &tree) |
void | expandNode (TreeNode &node) |
int | oppositeQuadrant (int index) |
bool | nextIntVect (const Box &box, IntVect &iv) |
void | nextNode (int ¤tDepth) |
void | cloneNode (const TreeNode &src, TreeNode &dest) |
Private Attributes |
TreeNode | m_tree |
Box | m_minBox |
Box | m_spanBox |
int | m_depth |
Static Private Attributes |
Pool | treeNodePool |
Vector< int > | index |
Vector< int > | bufferOffset |
Vector< TreeNode * > | parents |
Vector< Box > | boxes |
TreeNode | full |
Friends |
class | TreeIntVectSetIterator |
struct | Flag |
class | IntVectSet |
void | dumpTree (const TreeIntVectSet *set) |