RepastHPC
2.3.1
|
A collection that stores values at point locations. More...
#include <ValueLayer.h>
Public Member Functions | |
ValueLayer (const std::string &name, const GridDimensions &dimensions) | |
virtual ValueType & | get (const Point< PointType > &pt)=0 |
Gets the value at the specified point. More... | |
virtual void | set (const ValueType &value, const Point< PointType > &pt)=0 |
Sets the value at the specified point. More... | |
ValueType & | operator[] (const Point< PointType > &pt) |
Gets the value at the specified point. More... | |
const ValueType & | operator[] (const Point< PointType > &pt) const |
Gets the value at the specified point. More... | |
const GridDimensions | dimensions () const |
Gets the dimensions of this ValueLayer. More... | |
const Point< double > | shape () const |
Gets the extents of this ValueLayer. More... | |
Public Member Functions inherited from repast::BaseValueLayer | |
BaseValueLayer (const std::string &name) | |
Creates a BaseValueLayer with the specified name. | |
std::string | name () const |
Gets the value layer's name. More... | |
Protected Member Functions | |
void | translate (std::vector< PointType > &pt) |
Translates pt by dimensions origin. | |
Protected Attributes | |
GridDimensions | _dimensions |
Protected Attributes inherited from repast::BaseValueLayer | |
std::string | _name |
A collection that stores values at point locations.
ValueType | the type stored by the value layer. |
the | coordinate type (int or double) of the point locations. |
|
inline |
Gets the dimensions of this ValueLayer.
|
pure virtual |
Gets the value at the specified point.
If no value has been set at the specified point then this returns some default value. Subclasses will determine the default value.
param pt the location to get the value of
Implemented in repast::DiscreteValueLayer< ValueType, Borders >, and repast::ContinuousValueLayer< ValueType, Borders >.
ValueType & repast::ValueLayer< ValueType, PointType >::operator[] | ( | const Point< PointType > & | pt | ) |
Gets the value at the specified point.
If no value has been set at the specified point then this returns some default value. Subclasses will determine the default value.
param pt the location to get the value of
const ValueType & repast::ValueLayer< ValueType, PointType >::operator[] | ( | const Point< PointType > & | pt | ) | const |
Gets the value at the specified point.
If no value has been set at the specified point then this returns some default value. Subclasses will determine the default value.
param pt the location to get the value of
|
pure virtual |
Sets the value at the specified point.
value | the value |
pt | the point where the value should be stored |
Implemented in repast::DiscreteValueLayer< ValueType, Borders >, and repast::ContinuousValueLayer< ValueType, Borders >.
|
inline |
Gets the extents of this ValueLayer.