org._3pq.jgrapht.alg
Class DijkstraShortestPath
java.lang.Object
org._3pq.jgrapht.alg.DijkstraShortestPath
public final class DijkstraShortestPath
extends java.lang.Object
DijkstraShortestPath(Graph graph, Object startVertex, Object endVertex, double radius) - Creates and executes a new DijkstraShortestPath algorithm instance.
|
static List | findPathBetween(Graph graph, Object startVertex, Object endVertex) - Convenience method to find the shortest path via a single static method
call.
|
List | getPathEdgeList() - Return the edges making up the path found.
|
double | getPathLength() - Return the length of the path found.
|
DijkstraShortestPath
public DijkstraShortestPath(Graph graph,
Object startVertex,
Object endVertex,
double radius)
Creates and executes a new DijkstraShortestPath algorithm instance. An
instance is only good for a single search; after construction, it can
be accessed to retrieve information about the path found.
graph
- the graph to be searchedstartVertex
- the vertex at which the path should startendVertex
- the vertex at which the path should endradius
- limit on path length, or Double.POSITIVE_INFINITY for
unbounded search
findPathBetween
public static List findPathBetween(Graph graph,
Object startVertex,
Object endVertex)
Convenience method to find the shortest path via a single static method
call. If you need a more advanced search (e.g. limited by radius, or
computation of the path length), use the constructor instead.
graph
- the graph to be searchedstartVertex
- the vertex at which the path should startendVertex
- the vertex at which the path should end
- List of Edges, or null if no path exists
getPathEdgeList
public List getPathEdgeList()
Return the edges making up the path found.
- List of Edges, or null if no path exists
getPathLength
public double getPathLength()
Return the length of the path found.
- path length, or Double.POSITIVE_INFINITY if no path exists