public class FloydWarshallShortestPaths<V,E> extends Object
Constructor and Description |
---|
FloydWarshallShortestPaths(Graph<V,E> graph) |
Modifier and Type | Method and Description |
---|---|
double |
getDiameter() |
Graph<V,E> |
getGraph() |
GraphPath<V,E> |
getShortestPath(V a,
V b)
Get the shortest path between two vertices.
|
List<V> |
getShortestPathAsVertexList(V a,
V b) |
List<GraphPath<V,E>> |
getShortestPaths()
Get all shortest paths in the graph.
|
List<GraphPath<V,E>> |
getShortestPaths(V v)
Get shortest paths from a vertex to all other vertices in the graph.
|
int |
getShortestPathsCount() |
double |
shortestDistance(V a,
V b)
Get the length of a shortest path.
|
public int getShortestPathsCount()
public double shortestDistance(V a, V b)
a
- first vertexb
- second vertexpublic double getDiameter()
public GraphPath<V,E> getShortestPath(V a, V b)
a
- From verticeb
- To verticepublic List<GraphPath<V,E>> getShortestPaths(V v)
v
- the originating vertexCopyright © 2016. All rights reserved.