NEST main@caf0ae8
 
Loading...
Searching...
No Matches
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.
 
 masked_iterator (const GridLayer< D > &layer, const Mask< D > &mask, const Position< D > &anchor)
 Initialise an iterator to point to the first node inside the mask.
 
value_type operator* ()
 
masked_iterator & operator++ ()
 Move the iterator to the next node within the mask.
 
masked_iterator operator++ (int)
 Postfix increment operator.
 
bool operator== (const masked_iterator &other) const
 Iterators are equal if they point to the same node in the same layer.
 
bool operator!= (const masked_iterator &other) const
 

Protected Attributes

const GridLayer< D > & layer_
 
int layer_size_
 
const Mask< D > * mask_
 
Position< D > anchor_
 
MultiIndex< D > node_
 

Detailed Description

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

Iterator iterating over the nodes inside a Mask.

Constructor & Destructor Documentation

◆ masked_iterator() [1/2]

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

Constructor for an invalid iterator.

◆ masked_iterator() [2/2]

Member Function Documentation

◆ operator!=()

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

◆ operator*()

template<int D>
std::pair< Position< D >, size_t > nest::GridLayer< D >::masked_iterator::operator* ( )
inline

◆ operator++() [1/2]

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.

◆ operator++() [2/2]

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

Postfix increment operator.

◆ 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::layer_, and nest::GridLayer< D >::masked_iterator::node_.

Member Data Documentation

◆ anchor_

template<int D>
Position< D > nest::GridLayer< D >::masked_iterator::anchor_
protected

◆ layer_

◆ layer_size_

template<int D>
int nest::GridLayer< D >::masked_iterator::layer_size_
protected

◆ mask_

template<int D>
const Mask< D >* nest::GridLayer< D >::masked_iterator::mask_
protected

◆ node_


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