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 >::masked_iterator Class Reference

Iterator iterating the nodes in a Quadtree inside a Mask. More...

#include <ntree.h>

Public Member Functions

 masked_iterator ()
 Initialize an invalid iterator. More...
 
 masked_iterator (Ntree &q, const Mask< D > &mask, const Position< D > &anchor)
 Initialize an iterator to point to the first leaf node inside the mask within the tree below this Ntree. More...
 
value_typeoperator* ()
 
value_typeoperator-> ()
 
masked_iteratoroperator++ ()
 Move the iterator to the next node inside the mask within the tree. More...
 
masked_iterator operator++ (int)
 Postfix increment operator. More...
 
bool operator== (const masked_iterator &other) const
 Iterators are equal if they point to the same node in the same ntree. More...
 
bool operator!= (const masked_iterator &other) const
 

Protected Member Functions

void init_ ()
 Initialize. More...
 
void next_leaf_ ()
 Find the next leaf which is not outside the mask. More...
 
void first_leaf_ ()
 Find the first leaf which is not outside the mask. More...
 
void first_leaf_inside_ ()
 Set the allin_top_ to the current quadrant, and find the first leaf below the current quadrant. More...
 
void next_anchor_ ()
 Go to the next anchor image. More...
 

Protected Attributes

Ntreentree_
 
Ntreetop_
 
Ntreeallin_top_
 
index node_
 
const Mask< D > * mask_
 
Position< D > anchor_
 
std::vector< Position< D > > anchors_
 
index current_anchor_
 

Detailed Description

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

Iterator iterating the nodes in a Quadtree inside a Mask.

Constructor & Destructor Documentation

template<int D, class T, int max_capacity = 100, int max_depth = 10>
nest::Ntree< D, T, max_capacity, max_depth >::masked_iterator::masked_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 >::masked_iterator::masked_iterator ( Ntree q,
const Mask< D > &  mask,
const Position< D > &  anchor 
)

Member Function Documentation

template<int D, class T , int max_capacity, int max_depth>
void nest::Ntree< D, T, max_capacity, max_depth >::masked_iterator::first_leaf_ ( )
protected

Find the first leaf which is not outside the mask.

If no leaf is found below the current quadrant, will continue to next_leaf_().

template<int D, class T , int max_capacity, int max_depth>
void nest::Ntree< D, T, max_capacity, max_depth >::masked_iterator::first_leaf_inside_ ( )
protected

Set the allin_top_ to the current quadrant, and find the first leaf below the current quadrant.

template<int D, class T , int max_capacity, int max_depth>
void nest::Ntree< D, T, max_capacity, max_depth >::masked_iterator::init_ ( )
protected
template<int D, class T , int max_capacity, int max_depth>
void nest::Ntree< D, T, max_capacity, max_depth >::masked_iterator::next_anchor_ ( )
protected

Go to the next anchor image.

template<int D, class T , int max_capacity, int max_depth>
void nest::Ntree< D, T, max_capacity, max_depth >::masked_iterator::next_leaf_ ( )
protected

Find the next leaf which is not outside the mask.

References assert(), and nest::Ntree< D, T, max_capacity, max_depth >::N.

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

Move the iterator to the next node inside the mask within the tree.

May cause the iterator to become invalid if there are no more nodes.

References nest::Ntree< D, T, max_capacity, max_depth >::nodes_.

template<int D, class T, int max_capacity = 100, int max_depth = 10>
masked_iterator nest::Ntree< D, T, max_capacity, max_depth >::masked_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 >::masked_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 >::masked_iterator::operator== ( const masked_iterator other) const
inline

Member Data Documentation

template<int D, class T, int max_capacity = 100, int max_depth = 10>
Ntree* nest::Ntree< D, T, max_capacity, max_depth >::masked_iterator::allin_top_
protected
template<int D, class T, int max_capacity = 100, int max_depth = 10>
Position<D> nest::Ntree< D, T, max_capacity, max_depth >::masked_iterator::anchor_
protected
template<int D, class T, int max_capacity = 100, int max_depth = 10>
std::vector<Position<D> > nest::Ntree< D, T, max_capacity, max_depth >::masked_iterator::anchors_
protected
template<int D, class T, int max_capacity = 100, int max_depth = 10>
index nest::Ntree< D, T, max_capacity, max_depth >::masked_iterator::current_anchor_
protected
template<int D, class T, int max_capacity = 100, int max_depth = 10>
const Mask<D>* nest::Ntree< D, T, max_capacity, max_depth >::masked_iterator::mask_
protected
template<int D, class T, int max_capacity = 100, int max_depth = 10>
index nest::Ntree< D, T, max_capacity, max_depth >::masked_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 >::masked_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 >::masked_iterator::top_
protected

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