Class BellmanFordDistance<V,​E>

  • Type Parameters:
    V -
    E -

    public class BellmanFordDistance<V,​E>
    extends java.lang.Object
    Simple implementation of the Bellman Ford distance computation. It solves the single source all shortest paths problem and allows to handle negative edges. Here, I did not take into account the cyclic case, but assume to be given a DAG.
    Author:
    Andreas Rogge-Solti
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.apache.commons.collections15.Transformer<E,​? extends java.lang.Number> nev  
    • Constructor Summary

      Constructors 
      Constructor Description
      BellmanFordDistance​(edu.uci.ics.jung.graph.Graph<V,​E> g, org.apache.commons.collections15.Transformer<E,​? extends java.lang.Number> nev)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<V,​java.lang.Number> getDistanceMap​(V startPoint)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • nev

        protected org.apache.commons.collections15.Transformer<E,​? extends java.lang.Number> nev
    • Constructor Detail

      • BellmanFordDistance

        public BellmanFordDistance​(edu.uci.ics.jung.graph.Graph<V,​E> g,
                                   org.apache.commons.collections15.Transformer<E,​? extends java.lang.Number> nev)
    • Method Detail

      • getDistanceMap

        public java.util.Map<V,​java.lang.Number> getDistanceMap​(V startPoint)