N
- node classE
- edge classpublic class FloydWarshallAPSP<N,E> extends Object implements APSPResult<N,E>
Constructor and Description |
---|
FloydWarshallAPSP(Graph<N,E> graph,
EdgeWeights<E> ew) |
Modifier and Type | Method and Description |
---|---|
void |
findAPSP() |
static <N,E> APSPResult<N,E> |
findAPSP(Graph<N,E> graph,
EdgeWeights<E> edgeWeights) |
List<E> |
getShortestPath(N src,
N tgt)
Retrieves the shortest path between the given nodes, or null if there
exists no such path.
|
float |
getShortestPathDistance(N src,
N tgt)
Retrieves the length of the shortest path between the given nodes.
|
public FloydWarshallAPSP(Graph<N,E> graph, EdgeWeights<E> ew)
public static <N,E> APSPResult<N,E> findAPSP(Graph<N,E> graph, EdgeWeights<E> edgeWeights)
public void findAPSP()
public float getShortestPathDistance(N src, N tgt)
APSPResult
getShortestPathDistance
in interface APSPResult<N,E>
src
- the source nodetgt
- the target nodeGraphAlgorithms#INVALID_DISTANCE
if there exists no such path.public List<E> getShortestPath(N src, N tgt)
APSPResult
getShortestPath
in interface APSPResult<N,E>
src
- the source nodetgt
- the target nodeCopyright © 2015. All Rights Reserved.