Class BellmanFordRouting
- java.lang.Object
-
- com.graphhopper.routing.AbstractRoutingAlgorithm
-
- org.eclipse.mosaic.lib.routing.graphhopper.algorithm.BellmanFordRouting
-
- All Implemented Interfaces:
com.graphhopper.routing.RoutingAlgorithm
public class BellmanFordRouting extends com.graphhopper.routing.AbstractRoutingAlgorithm
Implementation of the Bellman-Ford algorithm which supports negative edge costs. This algorithm visits all edges of the network several times, thus it gets very slow on large networks. Be careful with this! :)
-
-
Constructor Summary
Constructors Constructor Description BellmanFordRouting(com.graphhopper.storage.Graph graph, com.graphhopper.routing.weighting.Weighting weighting, com.graphhopper.util.PMap hints)
Creates a newBellmanFordRouting
object based on theAbstractRoutingAlgorithm
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.graphhopper.routing.Path
calcPath(int from, int to)
Calculates a path between two nodes dependent on the edge costs.int
getVisitedNodes()
-
-
-
Constructor Detail
-
BellmanFordRouting
public BellmanFordRouting(com.graphhopper.storage.Graph graph, com.graphhopper.routing.weighting.Weighting weighting, com.graphhopper.util.PMap hints)
Creates a newBellmanFordRouting
object based on theAbstractRoutingAlgorithm
.- Parameters:
graph
- specifies the graph where this algorithm will run on.weighting
- set the used weight calculation (e.g. fastest, shortest).
-
-