|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Vertex
This interface represents a vertex in a graph.
Method Summary | |
---|---|
double |
g()
At any given time, this method returns the cost of the shortest path to this vertex, with respect to the set of vertices the algorithm has evaluated at that time. |
Vertex |
getPredecessorVertex()
Gets the predecessor Vertex from the edge. |
State |
getState()
Gets the State represented by this Vertex . |
Step |
getStepToThis()
Gets the Step leading to this Vertex . |
boolean |
isGoal()
Returns true if this Vertex is the goal
vertex. |
boolean |
isSource()
Returns true if this Vertex is the source
vertex. |
boolean |
partiallyEquals(Vertex vertex)
Checks whether this vertex is contains all the state descriptors of the input vertex. |
Vertex |
toGoalVertex()
Creates a goal vertex. |
Vertex |
toSourceVertex(Step initialStep)
Creates a source vertex from the specified initial setpoints. |
void |
update(Edge edgeToPredecessor,
double cost)
Updates this vertex' information about its predecessor and cost candidate. |
Method Detail |
---|
double g()
void update(Edge edgeToPredecessor, double cost)
This vertex' values will be updated if and only if a lower cost path to this vertex has been found.
edgeToPredecessor
- the edge to the previous vertexcost
- the cost of getting to this vertexVertex getPredecessorVertex()
Vertex
from the edge.
Step getStepToThis()
Step
leading to this Vertex
.
Step
State getState()
State
represented by this Vertex
.
boolean isGoal()
true
if this Vertex
is the goal
vertex. The goal vertex is defined as the end of a path.
true
if this is the goal vertex.boolean isSource()
true
if this Vertex
is the source
vertex. The source vertex is defined as the start of a path.
true
if this is the source vertex.Vertex toSourceVertex(Step initialStep)
initialStep
- the initial step
Vertex
Vertex toGoalVertex()
Vertex
boolean partiallyEquals(Vertex vertex)
vertex
- the input vertex
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |