Package org.jgrapht.alg
Class BellmanFordPathElement<V,E>
- java.lang.Object
-
- org.jgrapht.alg.AbstractPathElement<V,E>
-
- org.jgrapht.alg.BellmanFordPathElement<V,E>
-
@Deprecated final class BellmanFordPathElement<V,E> extends AbstractPathElement<V,E>
Deprecated.moved into shortest path packageHelper class forBellmanFordShortestPath; not intended for general use.
-
-
Field Summary
Fields Modifier and Type Field Description private doublecostDeprecated.private doubleepsilonDeprecated.-
Fields inherited from class org.jgrapht.alg.AbstractPathElement
nHops, prevEdge, prevPathElement
-
-
Constructor Summary
Constructors Modifier Constructor Description (package private)BellmanFordPathElement(BellmanFordPathElement<V,E> original)Deprecated.Copy constructor.protectedBellmanFordPathElement(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.protectedBellmanFordPathElement(V vertex, double epsilon)Deprecated.Creates an empty path element.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description doublegetCost()Deprecated.Returns the total cost of the path element.protected booleanimprove(BellmanFordPathElement<V,E> candidatePrevPathElement, E candidateEdge, double candidateCost)Deprecated.Returnstrueif the path has been improved,falseotherwise.-
Methods inherited from class org.jgrapht.alg.AbstractPathElement
createEdgeListPath, getHopCount, getPrevEdge, getPrevPathElement, getVertex
-
-
-
-
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.Returnstrueif the path has been improved,falseotherwise. 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:
- .
-
-