NEST  2.6.0,not_revisioned_source_dir@0
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
nest::BallMask< D > Class Template Reference

Mask defining a circular or spherical region. More...

#include <mask.h>

Inheritance diagram for nest::BallMask< D >:
nest::Mask< D > nest::AbstractMask

Public Member Functions

 BallMask (Position< D > center, double_t radius)
 
 BallMask (const DictionaryDatum &)
 Creates a BallMask from a Dictionary which should contain the key "radius" with a double value and optionally the key "anchor" (the center position) with an array of doubles. More...
 
 ~BallMask ()
 
bool inside (const Position< D > &p) const
 
bool inside (const Box< D > &) const
 
bool outside (const Box< D > &b) const
 
Box< D > get_bbox () const
 The whole mask is inside (i.e., false everywhere outside) the bounding box. More...
 
DictionaryDatum get_dict () const
 
Mask< D > * clone () const
 Clone method. More...
 
template<>
Name get_name ()
 
template<>
Name get_name ()
 
template<>
bool inside (const Box< 2 > &b) const
 
template<>
bool inside (const Box< 3 > &b) const
 
- Public Member Functions inherited from nest::Mask< D >
 ~Mask ()
 
bool inside (const std::vector< double_t > &pt) const
 
AbstractMaskintersect_mask (const AbstractMask &other) const
 Create the intersection of this mask with another. More...
 
AbstractMaskunion_mask (const AbstractMask &other) const
 Create the union of this mask with another. More...
 
AbstractMaskminus_mask (const AbstractMask &other) const
 Create the difference of this mask and another. More...
 
- Public Member Functions inherited from nest::AbstractMask
virtual ~AbstractMask ()
 Virtual destructor. More...
 

Static Public Member Functions

static Name get_name ()
 

Protected Attributes

Position< D > center_
 
double_t radius_
 

Detailed Description

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

Mask defining a circular or spherical region.

Constructor & Destructor Documentation

template<int D>
nest::BallMask< D >::BallMask ( Position< D >  center,
double_t  radius 
)
inline
Parameters
centerCenter of sphere
radiusRadius of sphere
template<int D>
nest::BallMask< D >::BallMask ( const DictionaryDatum d)

Creates a BallMask from a Dictionary which should contain the key "radius" with a double value and optionally the key "anchor" (the center position) with an array of doubles.

References nest::names::anchor, nest::names::d, and nest::names::radius.

template<int D>
nest::BallMask< D >::~BallMask ( )
inline

Member Function Documentation

template<int D>
Mask< D > * nest::BallMask< D >::clone ( ) const
virtual

Clone method.

Returns
dynamically allocated copy of mask object

Implements nest::Mask< D >.

template<int D>
Box< D > nest::BallMask< D >::get_bbox ( ) const
virtual

The whole mask is inside (i.e., false everywhere outside) the bounding box.

Returns
bounding box

Implements nest::Mask< D >.

References nest::Box< D >::lower_left, and nest::Box< D >::upper_right.

template<int D>
DictionaryDatum nest::BallMask< D >::get_dict ( ) const
virtual
Returns
a dictionary with the definition for this mask.

Reimplemented from nest::AbstractMask.

References nest::names::anchor, nest::names::d, and nest::names::radius.

template<int D>
static Name nest::BallMask< D >::get_name ( )
static
Returns
the name of this mask type.
template<>
Name nest::BallMask< 2 >::get_name ( )
inline

References nest::names::circular.

template<>
Name nest::BallMask< 3 >::get_name ( )
inline
template<>
bool nest::BallMask< 2 >::inside ( const Box< 2 > &  b) const
template<>
bool nest::BallMask< 3 >::inside ( const Box< 3 > &  b) const
template<int D>
bool nest::BallMask< D >::inside ( const Position< D > &  p) const
virtual
Returns
true if point is inside the circle

Implements nest::Mask< D >.

template<int D>
bool nest::BallMask< D >::inside ( const Box< D > &  ) const
virtual
Returns
true if the whole box is inside the circle

Implements nest::Mask< D >.

template<int D>
bool nest::BallMask< D >::outside ( const Box< D > &  b) const
virtual
Returns
true if the whole box is outside the circle

Reimplemented from nest::Mask< D >.

References nest::Box< D >::lower_left, and nest::Box< D >::upper_right.

Member Data Documentation

template<int D>
Position<D> nest::BallMask< D >::center_
protected
template<int D>
double_t nest::BallMask< D >::radius_
protected

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