Class BellmanFordPathElement<V,​E>

    • Field Detail

      • cost

        private double cost
        Deprecated.
      • epsilon

        private double epsilon
        Deprecated.
    • Constructor Detail

      • BellmanFordPathElement

        protected BellmanFordPathElement​(Graph<V,​E> graph,
                                         BellmanFordPathElement<V,​E> pathElement,
                                         E edge,
                                         double cost,
                                         double epsilon)
        Deprecated.
        Creates a path element by concatenation of an edge to a path element.
        Parameters:
        pathElement -
        edge - edge reaching the end vertex of the path element created.
        cost - total cost of the created path element.
        epsilon - tolerance factor.
      • BellmanFordPathElement

        BellmanFordPathElement​(BellmanFordPathElement<V,​E> original)
        Deprecated.
        Copy constructor.
        Parameters:
        original - source to copy from
      • BellmanFordPathElement

        protected BellmanFordPathElement​(V vertex,
                                         double epsilon)
        Deprecated.
        Creates an empty path element.
        Parameters:
        vertex - end vertex of the path element.
        epsilon - tolerance factor.
    • Method Detail

      • getCost

        public double getCost()
        Deprecated.
        Returns the total cost of the path element.
        Returns:
        .
      • improve

        protected boolean improve​(BellmanFordPathElement<V,​E> candidatePrevPathElement,
                                  E candidateEdge,
                                  double candidateCost)
        Deprecated.
        Returns true if the path has been improved, false otherwise. We use an "epsilon" precision to check whether the cost has been improved (because of many roundings, a formula equal to 0 could unfortunately be evaluated to 10^-14).
        Parameters:
        candidatePrevPathElement -
        candidateEdge -
        candidateCost -
        Returns:
        .