VANET Simulator
 All Classes Functions Variables
Public Member Functions | List of all members
vanetsim.routing.A_Star.A_Star_LookupTable< K, V > Class Reference

Public Member Functions

 A_Star_LookupTable (int initialCapacity)
A_Star_Node get (Node key)
void put (Node key, A_Star_Node value)

Detailed Description

A LookupTable for the mapping between Nodes and A_Star_Nodes. Uses the nodeid to construct an extremely very efficient lookup in an array. This has a far better performance than traditional HashMaps because no hashing is needed and no collisions can occur.
If you encounter any problems you may switch to the standard Java Hashmap by just replacing all occurences.

Constructor & Destructor Documentation

vanetsim.routing.A_Star.A_Star_LookupTable< K, V >.A_Star_LookupTable ( int  initialCapacity)

Constructs an empty LookupTable.

initialCapacitythe initial capacity.

Member Function Documentation

A_Star_Node vanetsim.routing.A_Star.A_Star_LookupTable< K, V >.get ( Node  key)

Returns the value to which the specified node is mapped, or null if this map contains no mapping for the key.

void vanetsim.routing.A_Star.A_Star_LookupTable< K, V >.put ( Node  key,
A_Star_Node  value 

Associates the specified value with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced.

keykey with which the specified value is to be associated
valuevalue to be associated with the specified key

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