NEST main@f146f75
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.

References nest::GridLayer< D >::GridLayer(), layer_, layer_size_, mask_, and node_.

Referenced by operator!=(), operator++(), and operator==().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ masked_iterator() [2/2]

template<int D>
nest::GridLayer< D >::masked_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.

References anchor_, nest::GridLayer< D >::dims_, nest::Layer< D >::extent_, nest::GridLayer< D >::GridLayer(), layer_, layer_size_, nest::Box< D >::lower_left, nest::Layer< D >::lower_left_, mask_, node_, nest::Layer< D >::periodic_, and nest::Box< D >::upper_right.

Here is the call graph for this function:

Member Function Documentation

◆ operator!=()

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

References layer_, masked_iterator(), and node_.

Here is the call graph for this function:

◆ operator*()

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

References layer_, and node_.

◆ 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.

References anchor_, layer_, mask_, and node_.

◆ operator++() [2/2]

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

Postfix increment operator.

References masked_iterator().

Here is the call graph for this function:

◆ 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 layer_, masked_iterator(), and node_.

Here is the call graph for this function:

Member Data Documentation

◆ anchor_

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

Referenced by masked_iterator(), and operator++().

◆ layer_

template<int D>
const GridLayer< D >& nest::GridLayer< D >::masked_iterator::layer_
protected

◆ layer_size_

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

Referenced by masked_iterator(), and masked_iterator().

◆ mask_

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

◆ node_

template<int D>
MultiIndex< D > nest::GridLayer< D >::masked_iterator::node_
protected

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