Assignment Search Framework
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
MapLocHashFunction Class Reference
Inheritance diagram for MapLocHashFunction:

Public Member Functions

 MapLocHashFunction ()
 
virtual ~MapLocHashFunction ()
 
virtual StateHash getStateHash (const MapLocation &state) const
 
void setMapDimensions (const MapPathfindingTransitions &ops)
 
void setMapDimensions (unsigned width, unsigned height)
 
- Public Member Functions inherited from StateHashFunction< MapLocation >
 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...
 

Detailed Description

A class for calculating the hash value of a map location.

Constructor & Destructor Documentation

MapLocHashFunction::MapLocHashFunction ( )

Constructor for a map location hash function. Initializes the map dimensions to zeroes.

MapLocHashFunction::~MapLocHashFunction ( )
virtual

Destructor for a map location hash function. Does nothing.

Member Function Documentation

StateHash MapLocHashFunction::getStateHash ( const MapLocation &  state) const
virtual

Returns the hash value of the given state.

Parameters
stateThe state whose hash value is needed.
Returns
The hash value of the given state.

Implements StateHashFunction< MapLocation >.

void MapLocHashFunction::setMapDimensions ( const MapPathfindingTransitions &  ops)

Sets the map dimensions based on the given map transition function.

Parameters
opsThe map transition function.
void MapLocHashFunction::setMapDimensions ( unsigned  width,
unsigned  height 
)

Sets the map dimensions to the given values.

Parameters
widthThe map width.
heightThe map height.

Member Data Documentation

uint64_t MapLocHashFunction::map_height
protected

The height of the map. Stored as uint64_t to avoid extra type casting.

uint64_t MapLocHashFunction::map_width
protected

The width of the map. Stored as uint64_t to avoid extra type casting.


The documentation for this class was generated from the following files: