NEST  2.6.0,not_revisioned_source_dir@0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
nest::Ntree< D, T, max_capacity, max_depth >::iterator Class Reference

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_typeoperator* ()
 
value_typeoperator-> ()
 
iteratoroperator++ ()
 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

Ntreentree_
 
Ntreetop_
 
index node_
 

Detailed Description

template<int D, class T, int max_capacity = 100, int max_depth = 10>
class nest::Ntree< D, T, max_capacity, max_depth >::iterator

Iterator iterating the nodes in a Quadtree.

Constructor & Destructor Documentation

template<int D, class T, int max_capacity = 100, int max_depth = 10>
nest::Ntree< D, T, max_capacity, max_depth >::iterator::iterator ( )
inline

Initialize an invalid iterator.

template<int D, class T , int max_capacity, int max_depth>
nest::Ntree< D, T, max_capacity, max_depth >::iterator::iterator ( Ntree q)
template<int D, class T , int max_capacity, int max_depth>
nest::Ntree< D, T, max_capacity, max_depth >::iterator::iterator ( Ntree q,
index  n 
)

Member Function Documentation

template<int D, class T , int max_capacity, int max_depth>
void nest::Ntree< D, T, max_capacity, max_depth >::iterator::next_leaf_ ( )
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().

template<int D, class T, int max_capacity = 100, int max_depth = 10>
bool nest::Ntree< D, T, max_capacity, max_depth >::iterator::operator!= ( const iterator other) const
inline
template<int D, class T, int max_capacity = 100, int max_depth = 10>
value_type& nest::Ntree< D, T, max_capacity, max_depth >::iterator::operator* ( )
inline
template<int D, class T , int max_capacity, int max_depth>
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.

template<int D, class T, int max_capacity = 100, int max_depth = 10>
iterator nest::Ntree< D, T, max_capacity, max_depth >::iterator::operator++ ( int  )
inline

Postfix increment operator.

template<int D, class T, int max_capacity = 100, int max_depth = 10>
value_type* nest::Ntree< D, T, max_capacity, max_depth >::iterator::operator-> ( )
inline
template<int D, class T, int max_capacity = 100, int max_depth = 10>
bool nest::Ntree< D, T, max_capacity, max_depth >::iterator::operator== ( const iterator other) const
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_.

Member Data Documentation

template<int D, class T, int max_capacity = 100, int max_depth = 10>
index nest::Ntree< D, T, max_capacity, max_depth >::iterator::node_
protected
template<int D, class T, int max_capacity = 100, int max_depth = 10>
Ntree* nest::Ntree< D, T, max_capacity, max_depth >::iterator::ntree_
protected
template<int D, class T, int max_capacity = 100, int max_depth = 10>
Ntree* nest::Ntree< D, T, max_capacity, max_depth >::iterator::top_
protected

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