RepastHPC
2.3.1
|
Creates ValueLayer whose location coordinates are ints. More...
#include <ValueLayer.h>
Public Member Functions | |
DiscreteValueLayer (const DiscreteValueLayer< ValueType, Borders > &other) | |
DiscreteValueLayer & | operator= (const DiscreteValueLayer< ValueType, Borders > &rhs) |
DiscreteValueLayer (const std::string &name, const GridDimensions &dimensions, bool dense, const ValueType &defaultValue=ValueType()) | |
Creates a DiscreteValueLayer whose cells contain a default value of ValueType() with the specified dimensions. More... | |
ValueType & | get (const Point< int > &pt) |
Gets the value at the specified point. More... | |
void | set (const ValueType &value, const Point< int > &pt) |
Sets the value at the specified point. More... | |
Public Member Functions inherited from repast::ValueLayer< ValueType, int > | |
ValueLayer (const std::string &name, const GridDimensions &dimensions) | |
ValueType & | operator[] (const Point< int > &pt) |
Gets the value at the specified point. More... | |
const ValueType & | operator[] (const Point< int > &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, int > | |
void | translate (std::vector< int > &pt) |
Translates pt by dimensions origin. | |
Protected Attributes inherited from repast::ValueLayer< ValueType, int > | |
GridDimensions | _dimensions |
Protected Attributes inherited from repast::BaseValueLayer | |
std::string | _name |
Creates ValueLayer whose location coordinates are ints.
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::DiscreteValueLayer< ValueType, Borders >::DiscreteValueLayer | ( | const std::string & | name, |
const GridDimensions & | dimensions, | ||
bool | dense, | ||
const ValueType & | defaultValue = ValueType() |
||
) |
Creates a DiscreteValueLayer whose cells contain a default value of ValueType() with the specified dimensions.
name | the name of the DiscreteValueLayer |
dimension | the dimensions of the DiscreteValueLayer |
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, int >.
|
virtual |
Sets the value at the specified point.
value | the value |
pt | the point where the value should be stored |
Implements repast::ValueLayer< ValueType, int >.