Class ShortestPathUtils
- java.lang.Object
-
- edu.uci.ics.jung.algorithms.shortestpath.ShortestPathUtils
-
public class ShortestPathUtils extends java.lang.ObjectUtilities relating to the shortest paths in a graph.
-
-
Constructor Summary
Constructors Constructor Description ShortestPathUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <V,E>
java.util.List<E>getPath(Graph<V,E> graph, ShortestPath<V,E> sp, V source, V target)Returns aListof the edges on the shortest path fromsourcetotarget, in order of their occurrence on this path.
-
-
-
Method Detail
-
getPath
public static <V,E> java.util.List<E> getPath(Graph<V,E> graph, ShortestPath<V,E> sp, V source, V target)
Returns aListof the edges on the shortest path fromsourcetotarget, in order of their occurrence on this path.- Type Parameters:
V- the vertex typeE- the edge type- Parameters:
graph- the graph for which the shortest path is definedsp- holder of the shortest path informationsource- the vertex from which the shortest path is measuredtarget- the vertex to which the shortest path is measured- Returns:
- the edges on the shortest path from
sourcetotarget, in the order traversed
-
-