public class ShortestPathUtils extends Object
| Constructor and Description |
|---|
ShortestPathUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <V,E> List<E> |
getPath(Graph<V,E> graph,
ShortestPath<V,E> sp,
V source,
V target)
Returns a
List of the edges on the shortest path from
source to target, in order of their
occurrence on this path. |
public static <V,E> List<E> getPath(Graph<V,E> graph, ShortestPath<V,E> sp, V source, V target)
List of the edges on the shortest path from
source to target, in order of their
occurrence on this path.V - the vertex typeE - the edge typegraph - 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 measuredsource to target,
in the order traversedCopyright © 2016. All rights reserved.