public class FloydWarshallShortestPaths<V,E>
extends java.lang.Object
Constructor and Description |
---|
FloydWarshallShortestPaths(Graph<V,E> g)
Constructs the shortest path array for the given graph.
|
Modifier and Type | Method and Description |
---|---|
double |
getDiameter() |
double |
shortestDistance(V v1,
V v2)
Retrieves the shortest distance between two vertices.
|
public double shortestDistance(V v1, V v2)
v1
- first vertexv2
- second vertexpublic double getDiameter()