fr.inria.opengve.bridge.algorithms.common.shortestPath
Class BellmanFord<V,E extends Link<V>,G extends Graph<V,E>>

java.lang.Object
  extended by java.util.Observable
      extended by fr.inria.opengve.bridge.algorithms.StepAlgo<V,E>
          extended by fr.inria.opengve.bridge.algorithms.common.shortestPath.ShortestPathWithSingleOrigin<V,E,G>
              extended by fr.inria.opengve.bridge.algorithms.common.shortestPath.BellmanFord<V,E,G>
All Implemented Interfaces:
java.lang.Runnable

public abstract class BellmanFord<V,E extends Link<V>,G extends Graph<V,E>>
extends ShortestPathWithSingleOrigin<V,E,G>

This class implement the Bellman-Ford algorithm. It's permit to compute all shortest path from a given vertex. This algorithms work also with negative weight on edges. You must verify after shortest path computation the presence of negative cycles (foundNegativeCycle()). Now we present shortly the use of this class.

After constructing the Bellman-Ford object, some steps are necessary to obtains shortest paths or distances.

  • Initialize Algorithm :