|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jgrapht.alg.DijkstraShortestPath<V,E>
public final class DijkstraShortestPath<V,E>
An implementation of Dijkstra's
shortest path algorithm using ClosestFirstIterator.
| Constructor Summary | |
|---|---|
DijkstraShortestPath(Graph<V,E> graph,
V startVertex,
V endVertex)
Creates and executes a new DijkstraShortestPath algorithm instance. |
|
DijkstraShortestPath(Graph<V,E> graph,
V startVertex,
V endVertex,
double radius)
Creates and executes a new DijkstraShortestPath algorithm instance. |
|
| Method Summary | ||
|---|---|---|
static
|
findPathBetween(Graph<V,E> graph,
V startVertex,
V endVertex)
Convenience method to find the shortest path via a single static method call. |
|
GraphPath<V,E> |
getPath()
Return the path found. |
|
java.util.List<E> |
getPathEdgeList()
Return the edges making up the path found. |
|
double |
getPathLength()
Return the length of the path found. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DijkstraShortestPath(Graph<V,E> graph,
V startVertex,
V endVertex)
graph - the graph to be searchedstartVertex - the vertex at which the path should startendVertex - the vertex at which the path should end
public DijkstraShortestPath(Graph<V,E> graph,
V startVertex,
V endVertex,
double radius)
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| Method Detail |
|---|
public java.util.List<E> getPathEdgeList()
public GraphPath<V,E> getPath()
public double getPathLength()
public static <V,E> java.util.List<E> findPathBetween(Graph<V,E> graph,
V startVertex,
V endVertex)
graph - the graph to be searchedstartVertex - the vertex at which the path should startendVertex - the vertex at which the path should end
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||