52 bool inside(
const std::vector<double_t> &)
const
53 {
throw KernelException(
"Grid mask must be applied to a grid layer."); }
98 throw BadProperty(
"Grid mask must be 2- or 3-dimensional.");
121 def<DictionaryDatum>(
d, get_name(), maskd);
123 def<long>(maskd,
names::rows, lower_right_[1]-upper_left_[1]);
125 def<long>(maskd,
names::layers, lower_right_[2]-upper_left_[2]);
133 lower_right_ = lower_right_ - upper_left_ -
anchor;
int int_t
Integer number with at least 16 bit.
Definition: nest.h:95
const Name d("d")
Specific to Izhikevich 2003.
Definition: nest_names.h:83
Position< D, int_t > lower_right_
Definition: grid_mask.h:84
AbstractMask * intersect_mask(const AbstractMask &) const
Create the intersection of this mask with another.
Definition: grid_mask.h:67
const Name layers("layers")
Definition: topology_names.h:81
Represent strings by ints to facilitate fast comparison.
Definition: name.h:53
Position< D, int_t > get_upper_left() const
Definition: grid_mask.h:76
Position< D, int_t > get_lower_right() const
Definition: grid_mask.h:79
A class that associates names and tokens.
Definition: dict.h:45
const Name anchor("anchor")
Definition: topology_names.h:50
Base class for all Kernel exceptions.
Definition: exceptions.h:54
AbstractMask * minus_mask(const AbstractMask &) const
Create the difference of this mask and another.
Definition: grid_mask.h:73
const Name grid3d("grid3d")
Definition: topology_names.h:92
bool inside(const std::vector< double_t > &) const
Definition: grid_mask.h:52
Exception to be thrown if a status parameter is incomplete or inconsistent.
Definition: exceptions.h:420
Position< D, int_t > upper_left_
Definition: grid_mask.h:83
DictionaryDatum get_dict() const
Definition: grid_mask.h:117
const Name columns("columns")
Definition: topology_names.h:43
Mask defined in terms of grid points rather than spacial coordinates.
Definition: grid_mask.h:41
void set_anchor(const Position< D, int_t > &)
Definition: grid_mask.h:131
GridMask< D > * clone() const
Definition: grid_mask.h:59
GridMask(const DictionaryDatum &d)
Parameters: columns - horizontal size in grid coordinates rows - vertical size in grid coordinates la...
Definition: grid_mask.h:88
const Name grid("grid")
Definition: topology_names.h:91
Default types used by the NEST kernel.
const Name rows("rows")
Number of rows in a layer or mask.
Definition: topology_names.h:42
AbstractMask * union_mask(const AbstractMask &) const
Create the union of this mask with another.
Definition: grid_mask.h:70
long getValue< long >(const Token &t)
Definition: tokenutils.cc:36
Abstract base class for masks with unspecified dimension.
Definition: mask.h:41