RepastHPC
2.3.1
|
The DimensionDatum class stores all of the data that the ValueLayerND class will need for each dimension in the N-dimensional space. More...
#include <ValueLayerND.h>
Public Member Functions | |
DimensionDatum (int indx, GridDimensions globalBoundaries, GridDimensions localBoundaries, int buffer, bool isPeriodic) | |
Constructor. More... | |
virtual | ~DimensionDatum () |
Destructor. | |
int | getSendReceiveSize (int relativeLocation) |
Gets the size of the data to be sent during synchronization. More... | |
int | getTransformedCoord (int originalCoord) |
Given a coordinate in global simulation coordinates, returns the value in simplified coordinates. More... | |
int | getIndexedCoord (int originalCoord, bool isSimplified=false) |
Given a coordinate, returns the index of that coordinate. More... | |
bool | isInLocalBounds (int originalCoord) |
Returns true if the specified coordinate is within the local boundaries on this dimension. More... | |
void | report (int dimensionNumber) |
Writes a report to the std out file. More... | |
The DimensionDatum class stores all of the data that the ValueLayerND class will need for each dimension in the N-dimensional space.
This mainly includes coordinate boundaries along each dimension, but these boundaries include local, global, and a few other memoized variants.
repast::DimensionDatum< T >::DimensionDatum | ( | int | indx, |
GridDimensions | globalBoundaries, | ||
GridDimensions | localBoundaries, | ||
int | buffer, | ||
bool | isPeriodic | ||
) |
Constructor.
indx | |
globalBoundaries | global simulation space boundaries |
localBoundaries | local boundaries of this process's space |
buffer | the size of the buffer zone |
isPeriodic | true if the space is periodic, false if not |
int repast::DimensionDatum< T >::getIndexedCoord | ( | int | originalCoord, |
bool | isSimplified = false |
||
) |
Given a coordinate, returns the index of that coordinate.
The original coordinate may be in global simulation coordinates or in 'simplified' coordinates. If it is not in simplified coordinates, the first step is to simplify.
For example, suppose the global space is from 0 to 100, and the local space is from 0 to 10, and the buffer zone value is 3. Passing 99 in global coordinates is equivalent to passing -1 in simplified coordinates. The index value in both cases is ((-1) - (-3)) or 2.
originalCoord | the original coordinate to be transformed |
isSimplified | true if the original coordinate is already in simplified coordinates |
int repast::DimensionDatum< T >::getSendReceiveSize | ( | int | relativeLocation | ) |
Gets the size of the data to be sent during synchronization.
int repast::DimensionDatum< T >::getTransformedCoord | ( | int | originalCoord | ) |
Given a coordinate in global simulation coordinates, returns the value in simplified coordinates.
For example, suppose the global space is from 0 to 100, and the local space is from 0 to 10, and the buffer zone value is 3. The simplified coordinates for this region of the local space will be -3 to 13. If the value passed to this function is 99, this function will return -1.
originalCoord | the original coordinate |
bool repast::DimensionDatum< T >::isInLocalBounds | ( | int | originalCoord | ) |
Returns true if the specified coordinate is within the local boundaries on this dimension.
originalCoordinate | the coordinate to be tested |
|
inline |
Writes a report to the std out file.
dimensionNumber | passed to the written report, identifying which dimension this is |