|
| MaskedLayer (Layer< D > &layer, Selector filter, const MaskDatum &mask, bool include_global, bool allow_oversized) |
| Regular constructor. More...
|
|
| MaskedLayer (Layer< D > &layer, Selector filter, const MaskDatum &mask, bool include_global, bool allow_oversized, Layer< D > &target) |
| Constructor for applying "converse" mask to layer. More...
|
|
| ~MaskedLayer () |
|
Ntree< D, index >::masked_iterator | begin (const Position< D > &anchor) |
| Iterate over nodes inside mask. More...
|
|
Ntree< D, index >::masked_iterator | end () |
|
template<int D>
class nest::MaskedLayer< D >
Class for applying masks to layers.
Contains begin and end methods to iterate over nodes inside a mask.
Constructor for applying "converse" mask to layer.
To be used for applying a mask for the target layer to the source layer. The mask will be mirrored about the origin, and settings for periodicity for the target layer will be applied to the source layer.
- Parameters
-
layer | The layer to mask (source layer) |
filter | Optionally select subset of neurons |
mask | The mask to apply to the layer |
include_global | If true, include all nodes, otherwise only local to MPI process |
allow_oversized | If true, allow larges masks than layers when using periodic b.c. |
target | The layer which the given mask is defined for (target layer) |
References nest::MaskedLayer< D >::check_mask_(), nest::Layer< D >::get_extent(), nest::Layer< D >::get_global_positions_ntree(), nest::Layer< D >::get_lower_left(), nest::Layer< D >::get_periodic_mask(), nest::MaskedLayer< D >::mask_, and nest::MaskedLayer< D >::ntree_.
Will check that the mask can be applied to the layer.
The mask must have the same dimensionality as the layer, and a grid mask may only be applied to a grid layer. Unless the allow_oversized flag is set, the mask must also not be larger than the layer in case of periodic boundary conditions. Will throw an exception if the mask does not fit.
- Parameters
-
layer | The layer to check for |
allow_oversized | If true, oversized masks are allowed |
References nest::Mask< D >::get_bbox(), nest::GridLayer< D >::get_dims(), nest::Layer< D >::get_extent(), nest::GridMask< D >::get_lower_right(), nest::Layer< D >::get_periodic_mask(), nest::GridMask< D >::get_upper_left(), nest::names::layer, nest::names::lower_left, nest::Box< D >::lower_left, nest::names::mask, nest::names::upper_right, nest::Box< D >::upper_right, and nest::names::y.
Referenced by nest::MaskedLayer< D >::MaskedLayer().