RepastHPC
2.3.1
|
Continous value layer whose location coordinates are double. More...
#include <ValueLayer.h>
Public Member Functions | |
ContinuousValueLayer (const ContinuousValueLayer< ValueType, Borders > &other) | |
ContinuousValueLayer & | operator= (const ContinuousValueLayer< ValueType, Borders > &rhs) |
ContinuousValueLayer (const std::string &name, const GridDimensions &dimensions, const ValueType &defaultValue=ValueType()) | |
Creates a ContinuousValueLayer whose cells contain a default value of ValueType() with the specified dimensions. More... | |
ValueType & | get (const Point< double > &pt) |
Gets the value at the specified point. More... | |
void | set (const ValueType &value, const Point< double > &pt) |
Sets the value at the specified point. More... | |
Public Member Functions inherited from repast::ValueLayer< ValueType, double > | |
ValueLayer (const std::string &name, const GridDimensions &dimensions) | |
ValueType & | operator[] (const Point< double > &pt) |
Gets the value at the specified point. More... | |
const ValueType & | operator[] (const Point< double > &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... | |
Additional Inherited Members | |
Protected Member Functions inherited from repast::ValueLayer< ValueType, double > | |
void | translate (std::vector< double > &pt) |
Translates pt by dimensions origin. | |
Protected Attributes inherited from repast::ValueLayer< ValueType, double > | |
GridDimensions | _dimensions |
Protected Attributes inherited from repast::BaseValueLayer | |
std::string | _name |
Continous value layer whose location coordinates are double.
ValueType | the type of what the value layer stores. |
Borders | the type of borders (wrapped / periodic, strict). Border types can be found in GridComponents.h |
repast::ContinuousValueLayer< ValueType, Borders >::ContinuousValueLayer | ( | const std::string & | name, |
const GridDimensions & | dimensions, | ||
const ValueType & | defaultValue = ValueType() |
||
) |
Creates a ContinuousValueLayer whose cells contain a default value of ValueType() with the specified dimensions.
name | the name of the ContinuousValueLayer |
dimension | the dimensions of the ContinuousValueLayer |
dense | whether or not the ValueLayer will be densely populated or not |
defaultValue | the default value to return if no value has been set of a location. The default is the result of ValueType(). |
|
virtual |
Gets the value at the specified point.
If no value has been set at the specified point then this returns the default value.
param pt the location to get the value of
Implements repast::ValueLayer< ValueType, double >.
|
virtual |
Sets the value at the specified point.
value | the value |
pt | the point where the value should be stored |
Implements repast::ValueLayer< ValueType, double >.