Assignment Search Framework
|
Public Member Functions | |
MapLocHashFunction () | |
virtual | ~MapLocHashFunction () |
virtual StateHash | getStateHash (const MapLocation &state) const |
void | setMapDimensions (const MapPathfindingTransitions &ops) |
void | setMapDimensions (unsigned width, unsigned height) |
![]() | |
StateHashFunction () | |
virtual | ~StateHashFunction () |
Protected Attributes | |
uint64_t | map_width |
The width of the map. Stored as uint64_t to avoid extra type casting. More... | |
uint64_t | map_height |
The height of the map. Stored as uint64_t to avoid extra type casting. More... | |
A class for calculating the hash value of a map location.
MapLocHashFunction::MapLocHashFunction | ( | ) |
Constructor for a map location hash function. Initializes the map dimensions to zeroes.
|
virtual |
Destructor for a map location hash function. Does nothing.
|
virtual |
Returns the hash value of the given state.
state | The state whose hash value is needed. |
Implements StateHashFunction< MapLocation >.
void MapLocHashFunction::setMapDimensions | ( | const MapPathfindingTransitions & | ops | ) |
Sets the map dimensions based on the given map transition function.
ops | The map transition function. |
void MapLocHashFunction::setMapDimensions | ( | unsigned | width, |
unsigned | height | ||
) |
Sets the map dimensions to the given values.
width | The map width. |
height | The map height. |
|
protected |
The height of the map. Stored as uint64_t to avoid extra type casting.
|
protected |
The width of the map. Stored as uint64_t to avoid extra type casting.