public class BellmanFord<E extends EdgeWeightData,V extends DirectedEdgeDataVertex<E> & ShortestPathVertex<E>>
extends java.lang.Object
Constructor and Description |
---|
BellmanFord(DirectedWeightedEdgeGraph<E,V> graph)
Constructor from the graph for which shortest paths are to be found.
|
Modifier and Type | Method and Description |
---|---|
boolean |
findShortestPaths(V s)
Find shortest paths to all vertices reachable from a given source vertex s.
|
public BellmanFord(DirectedWeightedEdgeGraph<E,V> graph)
graph
- graph for which shortest paths are to be foundpublic final boolean findShortestPaths(V s)
s
- source vertex from which shortest paths are to be determined