36 throw BadProperty(
"Masks must have same number of dimensions.");
46 throw BadProperty(
"Masks must have same number of dimensions.");
56 throw BadProperty(
"Masks must have same number of dimensions.");
71 for(
int i=0;i<D;++i) {
81 return (p>=lower_left_) && (p<=upper_right_);
93 for(
int i=0;i<D;++i) {
103 return Box<D>(lower_left_, upper_right_);
117 def<DictionaryDatum>(
d, get_name(), maskd);
126 return (p-center_).length() <= radius_;
136 if (!inside(p))
return false;
138 if (!inside(p))
return false;
140 if (!inside(p))
return false;
142 if (!inside(p))
return false;
154 if (!inside(p))
return false;
156 if (!inside(p))
return false;
158 if (!inside(p))
return false;
160 if (!inside(p))
return false;
162 if (!inside(p))
return false;
164 if (!inside(p))
return false;
166 if (!inside(p))
return false;
168 if (!inside(p))
return false;
178 for (
int i=0; i<D; ++i) {
189 Box<D> bb(center_, center_);
190 for (
int i=0; i<D; ++i) {
208 def<DictionaryDatum>(
d, get_name(), maskd);
217 return mask1_->inside(p) && mask2_->inside(p);
223 return mask1_->inside(b) && mask2_->inside(b);
229 return mask1_->outside(b) || mask2_->outside(b);
235 Box<D> bb = mask1_->get_bbox();
236 Box<D> bb2 = mask2_->get_bbox();
237 for (
int i=0; i<D; ++i) {
255 return mask1_->inside(p) || mask2_->inside(p);
261 return mask1_->inside(b) || mask2_->inside(b);
267 return mask1_->outside(b) && mask2_->outside(b);
273 Box<D> bb = mask1_->get_bbox();
274 Box<D> bb2 = mask2_->get_bbox();
275 for (
int i=0; i<D; ++i) {
293 return mask1_->inside(p) && !mask2_->inside(p);
299 return mask1_->inside(b) && mask2_->outside(b);
305 return mask1_->outside(b) || mask2_->inside(b);
311 return mask1_->get_bbox();
323 return m_->inside(-p);
341 Box<D> bb = m_->get_bbox();
354 return m_->inside(p-anchor_);
372 Box<D> bb = m_->get_bbox();
bool outside(const Box< D > &b) const
Definition: mask_impl.h:91
Mask combining two masks with a minus operation, the difference.
Definition: mask.h:371
virtual bool outside(const Box< D > &b) const
Definition: mask_impl.h:68
Box< D > get_bbox() const
The whole mask is inside (i.e., false everywhere outside) the bounding box.
Definition: mask_impl.h:271
Mask oriented in the opposite direction.
Definition: mask.h:411
const Name d("d")
Specific to Izhikevich 2003.
Definition: nest_names.h:83
bool inside(const Position< D > &p) const
Definition: mask_impl.h:253
Box< D > get_bbox() const
The whole mask is inside (i.e., false everywhere outside) the bounding box.
Definition: mask_impl.h:233
Mask shifted by an anchor.
Definition: mask.h:446
Mask< D > * clone() const
Clone method.
Definition: mask_impl.h:198
bool inside(const Position< D > &p) const
Definition: mask_impl.h:79
DictionaryDatum get_dict() const
Definition: mask_impl.h:383
const Name lower_left("lower_left")
Definition: topology_names.h:66
Box< D > get_bbox() const
The whole mask is inside (i.e., false everywhere outside) the bounding box.
Definition: mask_impl.h:101
bool inside(const Position< D > &p) const
Definition: mask_impl.h:291
Box< D > get_bbox() const
The whole mask is inside (i.e., false everywhere outside) the bounding box.
Definition: mask_impl.h:187
Mask< D > * clone() const
Clone method.
Definition: mask_impl.h:377
Mask< D > * clone() const
Clone method.
Definition: mask_impl.h:315
Mask< D > * clone() const
Clone method.
Definition: mask_impl.h:107
Mask defining a circular or spherical region.
Definition: mask.h:235
virtual bool inside(const Position< D > &) const =0
bool inside(const Position< D > &p) const
Definition: mask_impl.h:321
Mask defining a box region.
Definition: mask.h:182
const Name radius("radius")
Definition: topology_names.h:68
Abstract base class for masks with given dimension.
Definition: mask.h:90
A class that associates names and tokens.
Definition: dict.h:45
bool inside(const Position< D > &p) const
Definition: mask_impl.h:352
const Name anchor("anchor")
Definition: topology_names.h:50
bool outside(const Box< D > &b) const
Definition: mask_impl.h:174
const Name other("other")
Node type.
Definition: nest_names.h:216
A box is defined by the lower left corner (minimum coordinates) and the upper right corner (maximum c...
Definition: position.h:289
AbstractMask * union_mask(const AbstractMask &other) const
Create the union of this mask with another.
Definition: mask_impl.h:42
bool outside(const Box< D > &b) const
Definition: mask_impl.h:333
bool outside(const Box< D > &b) const
Definition: mask_impl.h:227
Exception to be thrown if a status parameter is incomplete or inconsistent.
Definition: exceptions.h:420
bool outside(const Box< D > &b) const
Definition: mask_impl.h:265
Position< D > upper_right
Definition: position.h:297
Box< D > get_bbox() const
The whole mask is inside (i.e., false everywhere outside) the bounding box.
Definition: mask_impl.h:339
bool outside(const Box< D > &b) const
Definition: mask_impl.h:364
Mask< D > * clone() const
Clone method.
Definition: mask_impl.h:346
AbstractMask * minus_mask(const AbstractMask &other) const
Create the difference of this mask and another.
Definition: mask_impl.h:52
const Name b("b")
Specific to Brette & Gerstner 2005 (aeif_cond-*)
Definition: nest_names.h:58
AbstractMask * intersect_mask(const AbstractMask &other) const
Create the intersection of this mask with another.
Definition: mask_impl.h:32
Mask< D > * clone() const
Clone method.
Definition: mask_impl.h:285
Box< D > get_bbox() const
The whole mask is inside (i.e., false everywhere outside) the bounding box.
Definition: mask_impl.h:370
Mask combining two masks with a Boolean AND, the intersection.
Definition: mask.h:293
Position< D > lower_left
Definition: position.h:296
bool outside(const Box< D > &b) const
Definition: mask_impl.h:303
Mask combining two masks with a Boolean OR, the sum.
Definition: mask.h:332
Abstract base class for masks with unspecified dimension.
Definition: mask.h:41
bool inside(const Position< D > &p) const
Definition: mask_impl.h:215
Mask< D > * clone() const
Clone method.
Definition: mask_impl.h:247
DictionaryDatum get_dict() const
Definition: mask_impl.h:204
const Name p("p")
current release probability (Tsodyks2_connection)
Definition: nest_names.h:218
const Name upper_right("upper_right")
Definition: topology_names.h:67
bool inside(const Position< D > &p) const
Definition: mask_impl.h:124
Box< D > get_bbox() const
The whole mask is inside (i.e., false everywhere outside) the bounding box.
Definition: mask_impl.h:309
DictionaryDatum get_dict() const
Definition: mask_impl.h:113