Iterator iterating the nodes in a Quadtree. More...
#include <ntree.h>
Public Member Functions | |
| iterator () | |
| Initialize an invalid 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. | |
| iterator (Ntree &q, size_t n) | |
| Initialize an iterator to point to the nth node in this Ntree, which must be a leaf. | |
| value_type & | operator* () |
| value_type * | operator-> () |
| iterator & | operator++ () |
| Move the iterator to the next node within the tree. | |
| iterator | operator++ (int) |
| Postfix increment operator. | |
| bool | operator== (const iterator &other) const |
| Iterators are equal if they point to the same node in the same ntree. | |
| 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. | |
Protected Attributes | |
| Ntree * | ntree_ |
| Ntree * | top_ |
| size_t | node_ |
Iterator iterating the nodes in a Quadtree.
|
inline |
Initialize an invalid iterator.
References node_, ntree_, and top_.
Referenced by operator!=(), operator++(), and operator==().
|
explicit |
Initialize an iterator to point to the first node in the first non-empty leaf within the tree below this Ntree.
References node_, nest::Ntree< D, T, max_capacity, max_depth >::Ntree(), ntree_, and top_.
| nest::Ntree< D, T, max_capacity, max_depth >::iterator::iterator | ( | Ntree & | q, |
| size_t | n ) |
|
protected |
Move to the next leaf quadrant, or set ntree_ to 0 if there are no more leaves.
References nest::Ntree< D, T, max_capacity, max_depth >::N, ntree_, and top_.
Referenced by operator++().
|
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.
References next_leaf_(), node_, and ntree_.
|
inline |
|
inline |
|
inline |
Iterators are equal if they point to the same node in the same ntree.
References iterator(), node_, and ntree_.
|
protected |
Referenced by iterator(), iterator(), iterator(), operator!=(), operator*(), operator++(), operator->(), and operator==().
|
protected |
Referenced by iterator(), iterator(), iterator(), next_leaf_(), operator!=(), operator*(), operator++(), operator->(), and operator==().
|
protected |
Referenced by iterator(), iterator(), iterator(), and next_leaf_().