public class ShortestPathTree extends Object
Modifier and Type | Field and Description |
---|---|
DominanceFunction |
dominanceFunction |
RoutingRequest |
options |
Constructor and Description |
---|
ShortestPathTree(RoutingRequest options,
DominanceFunction dominanceFunction) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(State newState)
The add method checks a new State to see if it is non-dominated and thus worth visiting
later.
|
void |
dump()
Print out a summary of the number of states and vertices.
|
Collection<State> |
getAllStates() |
RoutingRequest |
getOptions() |
GraphPath |
getPath(Vertex dest,
boolean optimize) |
List<GraphPath> |
getPaths() |
List<GraphPath> |
getPaths(Vertex dest,
boolean optimize) |
State |
getState(Vertex dest)
Returns the 'best' state for the given Vertex, where 'best' depends on the implementation.
|
List<State> |
getStates(Vertex dest)
Returns a collection of 'interesting' states for the given Vertex.
|
int |
getVertexCount() |
Set<Vertex> |
getVertices() |
String |
toString() |
boolean |
visit(State state)
The visit method should be called upon extracting a State from a priority queue.
|
public final RoutingRequest options
public final DominanceFunction dominanceFunction
public ShortestPathTree(RoutingRequest options, DominanceFunction dominanceFunction)
public List<GraphPath> getPaths(Vertex dest, boolean optimize)
public List<GraphPath> getPaths()
public GraphPath getPath(Vertex dest, boolean optimize)
public RoutingRequest getOptions()
public void dump()
public boolean add(State newState)
newState
- the State to add to the SPT, if it is deemed non-dominatedpublic State getState(Vertex dest)
dest
- the vertex of interestpublic List<State> getStates(Vertex dest)
dest
- the vertex of interestpublic int getVertexCount()
public boolean visit(State state)
state
- - the state about to be visitedpublic Collection<State> getAllStates()
Copyright © 2019. All rights reserved.