public final class Dijkstra<V,E> extends Object
ClosestFirstIterator.| Constructor and Description |
|---|
Dijkstra(org.jgrapht.Graph<V,E> graph,
V startVertex,
V endVertex)
Creates and executes a new DijkstraShortestPath algorithm instance.
|
Dijkstra(org.jgrapht.Graph<V,E> graph,
V startVertex,
V endVertex,
double radius)
Creates and executes a new DijkstraShortestPath algorithm instance.
|
| Modifier and Type | Method and Description |
|---|---|
static <V,E> List<E> |
findPathBetween(org.jgrapht.Graph<V,E> graph,
V startVertex,
V endVertex) |
org.jgrapht.GraphPath<V,E> |
getPath()
Return the path found.
|
List<E> |
getPathEdgeList()
Return the edges making up the path found.
|
double |
getPathLength()
Return the length of the path found.
|
public Dijkstra(org.jgrapht.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 endpublic Dijkstra(org.jgrapht.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 searchpublic List<E> getPathEdgeList()
public org.jgrapht.GraphPath<V,E> getPath()
public double getPathLength()
public static <V,E> List<E> findPathBetween(org.jgrapht.Graph<V,E> graph, V startVertex, V endVertex)
Copyright © 2016. All rights reserved.