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)
inline

Constructs an empty LookupTable.

Parameters
initialCapacitythe initial capacity.

Member Function Documentation

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

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 
)
inline

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.

Parameters
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: