NEST  2.6.0,not_revisioned_source_dir@0
Public Member Functions | Protected Attributes | List of all members
nest::GridLayer< D >::masked_iterator Class Reference

Iterator iterating over the nodes inside a Mask. More...

#include <grid_layer.h>

Public Member Functions

 masked_iterator (const GridLayer< D > &layer)
 Constructor for an invalid iterator. More...
 
 masked_iterator (const GridLayer< D > &layer, const Mask< D > &mask, const Position< D > &anchor, const Selector &filter)
 Initialize an iterator to point to the first node inside the mask. More...
 
value_type operator* ()
 
masked_iteratoroperator++ ()
 Move the iterator to the next node within the mask. 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 layer. More...
 
bool operator!= (const masked_iterator &other) const
 

Protected Attributes

const GridLayer< D > & layer_
 
int_t layer_size_
 
const Mask< D > * mask_
 
Position< D > anchor_
 
Selector filter_
 
MultiIndex< D > node_
 
int_t depth_
 

Detailed Description

template<int D>
class nest::GridLayer< D >::masked_iterator

Iterator iterating over the nodes inside a Mask.

Constructor & Destructor Documentation

template<int D>
nest::GridLayer< D >::masked_iterator::masked_iterator ( const GridLayer< D > &  layer)
inline

Constructor for an invalid iterator.

template<int D>
nest::GridLayer< D >::masked_iterator::masked_iterator ( const GridLayer< D > &  layer,
const Mask< D > &  mask,
const Position< D > &  anchor,
const Selector filter 
)

Member Function Documentation

template<int D>
bool nest::GridLayer< D >::masked_iterator::operator!= ( const masked_iterator other) const
inline
template<int D>
std::pair< Position< D >, index > nest::GridLayer< D >::masked_iterator::operator* ( )
inline
template<int D>
GridLayer< D >::masked_iterator & nest::GridLayer< D >::masked_iterator::operator++ ( )

Move the iterator to the next node within the mask.

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

References nest::AbstractLayer::depth_.

template<int D>
masked_iterator nest::GridLayer< D >::masked_iterator::operator++ ( int  )
inline

Postfix increment operator.

template<int D>
bool nest::GridLayer< D >::masked_iterator::operator== ( const masked_iterator other) const
inline

Iterators are equal if they point to the same node in the same layer.

References nest::GridLayer< D >::masked_iterator::depth_, nest::GridLayer< D >::masked_iterator::layer_, and nest::GridLayer< D >::masked_iterator::node_.

Member Data Documentation

template<int D>
Position<D> nest::GridLayer< D >::masked_iterator::anchor_
protected
template<int D>
int_t nest::GridLayer< D >::masked_iterator::depth_
protected
template<int D>
Selector nest::GridLayer< D >::masked_iterator::filter_
protected
template<int D>
const GridLayer<D>& nest::GridLayer< D >::masked_iterator::layer_
protected
template<int D>
int_t nest::GridLayer< D >::masked_iterator::layer_size_
protected
template<int D>
const Mask<D>* nest::GridLayer< D >::masked_iterator::mask_
protected
template<int D>
MultiIndex<D> nest::GridLayer< D >::masked_iterator::node_
protected

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