NEST main@caf0ae8
 
Loading...
Searching...
No Matches
nest::GridMask< D > Class Template Reference

Mask defined in terms of grid points rather than spacial coordinates. More...

#include <grid_mask.h>

Inheritance diagram for nest::GridMask< D >:
[legend]
Collaboration diagram for nest::GridMask< D >:
[legend]

Public Member Functions

 GridMask (const Dictionary &d)
 Parameters: shape - size in grid coordinates (length 2 for 2D layers or length 3 for 3D layers)
 
bool inside (const std::vector< double > &) const override
 
void set_anchor (const Position< D, int > &)
 
Dictionary get_dict () const override
 
GridMask< D > * clone () const
 
AbstractMask * intersect_mask (const AbstractMask &) const override
 Create the intersection of this mask with another.
 
AbstractMask * union_mask (const AbstractMask &) const override
 Create the union of this mask with another.
 
AbstractMask * minus_mask (const AbstractMask &) const override
 Create the difference of this mask and another.
 
Position< D, int > get_upper_left () const
 
Position< D, int > get_lower_right () const
 
std::string get_name ()
 
std::string get_name ()
 
- Public Member Functions inherited from nest::AbstractMask
virtual ~AbstractMask ()
 

Static Public Member Functions

static std::string get_name ()
 

Protected Attributes

Position< D, int > upper_left_
 
Position< D, int > lower_right_
 

Detailed Description

template<int D>
class nest::GridMask< D >

Mask defined in terms of grid points rather than spacial coordinates.

Only suitable for grid layers.

Constructor & Destructor Documentation

◆ GridMask()

template<int D>
nest::GridMask< D >::GridMask ( const Dictionary &  d)

Parameters: shape - size in grid coordinates (length 2 for 2D layers or length 3 for 3D layers)

References nest::names::shape().

Here is the call graph for this function:

Member Function Documentation

◆ clone()

template<int D>
GridMask< D > * nest::GridMask< D >::clone ( ) const
inline

◆ get_dict()

template<int D>
Dictionary nest::GridMask< D >::get_dict ( ) const
overridevirtual
Returns
a dictionary with the definition for this mask.

Reimplemented from nest::AbstractMask.

References nest::names::shape().

Here is the call graph for this function:

◆ get_lower_right()

template<int D>
Position< D, int > nest::GridMask< D >::get_lower_right ( ) const
inline

References nest::GridMask< D >::lower_right_.

Referenced by nest::MaskedLayer< D >::check_mask_().

Here is the caller graph for this function:

◆ get_name() [1/3]

template<int D>
static std::string nest::GridMask< D >::get_name ( )
static
Returns
the name of this mask type.

◆ get_name() [2/3]

std::string nest::GridMask< 2 >::get_name ( )
inline

References nest::names::grid().

Here is the call graph for this function:

◆ get_name() [3/3]

std::string nest::GridMask< 3 >::get_name ( )
inline

References nest::names::grid3d().

Here is the call graph for this function:

◆ get_upper_left()

template<int D>
Position< D, int > nest::GridMask< D >::get_upper_left ( ) const
inline

References nest::GridMask< D >::upper_left_.

Referenced by nest::MaskedLayer< D >::check_mask_().

Here is the caller graph for this function:

◆ inside()

template<int D>
bool nest::GridMask< D >::inside ( const std::vector< double > &  ) const
inlineoverridevirtual
Returns
true if point is inside mask.

Implements nest::AbstractMask.

◆ intersect_mask()

template<int D>
AbstractMask * nest::GridMask< D >::intersect_mask ( const AbstractMask &  other) const
inlineoverridevirtual

Create the intersection of this mask with another.

Masks must have the same dimension

Returns
a new dynamically allocated mask.

Implements nest::AbstractMask.

◆ minus_mask()

template<int D>
AbstractMask * nest::GridMask< D >::minus_mask ( const AbstractMask &  other) const
inlineoverridevirtual

Create the difference of this mask and another.

Masks must have the same dimension.

Returns
a new dynamically allocated mask.

Implements nest::AbstractMask.

◆ set_anchor()

template<int D>
void nest::GridMask< D >::set_anchor ( const Position< D, int > &  anchor)

Referenced by nest::create_mask().

Here is the caller graph for this function:

◆ union_mask()

template<int D>
AbstractMask * nest::GridMask< D >::union_mask ( const AbstractMask &  other) const
inlineoverridevirtual

Create the union of this mask with another.

Masks must have the same dimension.

Returns
a new dynamically allocated mask.

Implements nest::AbstractMask.

Member Data Documentation

◆ lower_right_

template<int D>
Position< D, int > nest::GridMask< D >::lower_right_
protected

◆ upper_left_

template<int D>
Position< D, int > nest::GridMask< D >::upper_left_
protected

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