VANET Simulator
 All Classes Functions Variables
Public Member Functions | List of all members
vanetsim.routing.A_Star.A_Star_Node Class Reference
Inheritance diagram for vanetsim.routing.A_Star.A_Star_Node:

Public Member Functions

 A_Star_Node (Node realNode, double f, int counter)
 
 A_Star_Node (Node realNode, int counter)
 
void reset (int counter)
 
int getCounter ()
 
boolean isInClosedList ()
 
void setInClosedList (boolean state)
 
boolean isInOpenList ()
 
void setInOpenList (boolean state)
 
double getF ()
 
void setF (double f)
 
double getG ()
 
void setG (double g)
 
A_Star_Node getPredecessor ()
 
void setPredecessor (A_Star_Node predecessor)
 
Node getRealNode ()
 
int compareTo (Object other)
 

Detailed Description

A node specific for the computation in an A*-algorithm.

Constructor & Destructor Documentation

vanetsim.routing.A_Star.A_Star_Node.A_Star_Node ( Node  realNode,
double  f,
int  counter 
)
inline

Instantiates a new A_Star_Node from a node existing on the map.

Parameters
realNodethe real node from the map associated with this A*-specific node
fthe initial value for the approximate distance/time/penalty... to the target
countera value to determine if this node is valid for the current routing calculation
vanetsim.routing.A_Star.A_Star_Node.A_Star_Node ( Node  realNode,
int  counter 
)
inline

Instantiates a new A_Star_Node from a node existing on the map. The f value is set to 0.

Parameters
realNodethe real node from the map associated with this A*-specific node
countera value to determine if this node is valid for the current routing calculation

Member Function Documentation

int vanetsim.routing.A_Star.A_Star_Node.compareTo ( Object  other)
inline

Function needed to implement the Comparable interface. This allows automatic sorting of this node in a SortedSet like a TreeSet based on it's f-value.

Parameters
otherobject to compare this node with
Returns
0 if other is the same, 1 if this is greater than other and -1 if this is less than other
int vanetsim.routing.A_Star.A_Star_Node.getCounter ( )
inline

Returns the current value for the counter

Returns
the counter value
double vanetsim.routing.A_Star.A_Star_Node.getF ( )
inline

Gets the f value (=approximated distance/time/penalty... from this point to the target).

Returns
the f value
double vanetsim.routing.A_Star.A_Star_Node.getG ( )
inline

Gets the g value (=distance/time/penalty... from this point to the beginning).

Returns
the g value
A_Star_Node vanetsim.routing.A_Star.A_Star_Node.getPredecessor ( )
inline

Gets the predecessor of this node.

Returns
the predecessor
Node vanetsim.routing.A_Star.A_Star_Node.getRealNode ( )
inline

Gets the "real" node in the map associated with this A*-specific node.

Returns
the real node
boolean vanetsim.routing.A_Star.A_Star_Node.isInClosedList ( )
inline

Returns if this node is in the ClosedList.

Returns
true if node is already in ClosedList, else false
boolean vanetsim.routing.A_Star.A_Star_Node.isInOpenList ( )
inline

Returns if this node is in the OpenList.

Returns
true if node is already in OpenList, else false
void vanetsim.routing.A_Star.A_Star_Node.reset ( int  counter)
inline

Resets the values of the node to the default values so that it can be reused. If the node is already valid for the current routing run, nothing is done.

Parameters
countera value to determine if this node is valid for the current routing calculation
void vanetsim.routing.A_Star.A_Star_Node.setF ( double  f)
inline

Sets the f value (=approximated distance/time/penalty... from this point to the target).

Parameters
fthe new f value
void vanetsim.routing.A_Star.A_Star_Node.setG ( double  g)
inline

Sets the g value (=distance/time/penalty... from this point to the beginning).

Parameters
gthe new g value
void vanetsim.routing.A_Star.A_Star_Node.setInClosedList ( boolean  state)
inline

Sets if this node is in the ClosedList or not.

Parameters
statetrue if this node shall be in the ClosedList, else false
void vanetsim.routing.A_Star.A_Star_Node.setInOpenList ( boolean  state)
inline

Sets if this node is in the OpenList or not.

Parameters
statetrue if this node shall be in the OpenList, else false
void vanetsim.routing.A_Star.A_Star_Node.setPredecessor ( A_Star_Node  predecessor)
inline

Sets the predecessor of this node.

Parameters
predecessorthe new predecessor

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