NEST
2.6.0,not_revisioned_source_dir@0
|
Iterator iterating the nodes in a Quadtree. More...
#include <ntree.h>
Public Member Functions | |
iterator () | |
Initialize an invalid iterator. More... | |
iterator (Ntree &q) | |
Initialize an iterator to point to the first node in the first non-empty leaf within the tree below this Ntree. More... | |
iterator (Ntree &q, index n) | |
Initialize an iterator to point to the nth node in this Ntree, which must be a leaf. More... | |
value_type & | operator* () |
value_type * | operator-> () |
iterator & | operator++ () |
Move the iterator to the next node within the tree. More... | |
iterator | operator++ (int) |
Postfix increment operator. More... | |
bool | operator== (const iterator &other) const |
Iterators are equal if they point to the same node in the same ntree. More... | |
bool | operator!= (const iterator &other) const |
Protected Member Functions | |
void | next_leaf_ () |
Move to the next leaf quadrant, or set ntree_ to 0 if there are no more leaves. More... | |
Protected Attributes | |
Ntree * | ntree_ |
Ntree * | top_ |
index | node_ |
Iterator iterating the nodes in a Quadtree.
|
inline |
Initialize an invalid iterator.
nest::Ntree< D, T, max_capacity, max_depth >::iterator::iterator | ( | Ntree & | q | ) |
Initialize an iterator to point to the first node in the first non-empty leaf within the tree below this Ntree.
References nest::Ntree< D, T, max_capacity, max_depth >::children_, nest::Ntree< D, T, max_capacity, max_depth >::is_leaf(), nest::Ntree< D, T, max_capacity, max_depth >::iterator::next_leaf_(), nest::Ntree< D, T, max_capacity, max_depth >::nodes_, and nest::Ntree< D, T, max_capacity, max_depth >::iterator::ntree_.
nest::Ntree< D, T, max_capacity, max_depth >::iterator::iterator | ( | Ntree & | q, |
index | n | ||
) |
Initialize an iterator to point to the nth node in this Ntree, which must be a leaf.
The top of the tree is the first ancestor of the Ntree.
References assert(), nest::Ntree< D, T, max_capacity, max_depth >::leaf_, nest::Ntree< D, T, max_capacity, max_depth >::iterator::ntree_, nest::Ntree< D, T, max_capacity, max_depth >::parent_, and nest::Ntree< D, T, max_capacity, max_depth >::iterator::top_.
|
protected |
Move to the next leaf quadrant, or set ntree_ to 0 if there are no more leaves.
References assert(), and nest::Ntree< D, T, max_capacity, max_depth >::N.
Referenced by nest::Ntree< D, T, max_capacity, max_depth >::iterator::iterator().
|
inline |
|
inline |
Ntree< D, T, max_capacity, max_depth >::iterator & nest::Ntree< D, T, max_capacity, max_depth >::iterator::operator++ | ( | ) |
Move the iterator to the next node within the tree.
May cause the iterator to become invalid if there are no more nodes.
|
inline |
Postfix increment operator.
|
inline |
|
inline |
Iterators are equal if they point to the same node in the same ntree.
References nest::Ntree< D, T, max_capacity, max_depth >::iterator::node_, and nest::Ntree< D, T, max_capacity, max_depth >::iterator::ntree_.
|
protected |
|
protected |
Referenced by nest::Ntree< D, T, max_capacity, max_depth >::iterator::iterator(), nest::Ntree< D, T, max_capacity, max_depth >::iterator::operator!=(), nest::Ntree< D, T, max_capacity, max_depth >::iterator::operator*(), nest::Ntree< D, T, max_capacity, max_depth >::iterator::operator->(), and nest::Ntree< D, T, max_capacity, max_depth >::iterator::operator==().
|
protected |