dk.deepthought.sidious.planner.graph
Interface Vertex

All Known Implementing Classes:
AStarVertex

public interface Vertex

This interface represents a vertex in a graph.

Author:
Deepthought

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

g

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.

Returns:
the shortest path cost candidate

update

void update(Edge edgeToPredecessor,
            double cost)
Updates this vertex' information about its predecessor and cost candidate.

This vertex' values will be updated if and only if a lower cost path to this vertex has been found.

Parameters:
edgeToPredecessor - the edge to the previous vertex
cost - the cost of getting to this vertex

getPredecessorVertex

Vertex getPredecessorVertex()
Gets the predecessor Vertex from the edge.

Returns:
the predecessor vertex

getStepToThis

Step getStepToThis()
Gets the Step leading to this Vertex.

Returns:
the Step

getState

State getState()
Gets the State represented by this Vertex.

Returns:
the state

isGoal

boolean isGoal()
Returns true if this Vertex is the goal vertex. The goal vertex is defined as the end of a path.

Returns:
true if this is the goal vertex.

isSource

boolean isSource()
Returns true if this Vertex is the source vertex. The source vertex is defined as the start of a path.

Returns:
true if this is the source vertex.

toSourceVertex

Vertex toSourceVertex(Step initialStep)
Creates a source vertex from the specified initial setpoints.

Parameters:
initialStep - the initial step
Returns:
the source Vertex

toGoalVertex

Vertex toGoalVertex()
Creates a goal vertex.

Returns:
the goal Vertex

partiallyEquals

boolean partiallyEquals(Vertex vertex)
Checks whether this vertex is contains all the state descriptors of the input vertex. The input vertex does not have to contain all the state descriptors of this vertex.

Parameters:
vertex - the input vertex
Returns:
true if all state descriptors are contained in this vertex


Copyright © Deepthought Development - All Rights Reserved.