public class NodeBasedWitnessPathSearcher extends Object
Constructor and Description |
---|
NodeBasedWitnessPathSearcher(CHPreparationGraph graph) |
Modifier and Type | Method and Description |
---|---|
double |
findUpperBound(int targetNode,
double acceptedWeight,
int maxSettledNodes)
Runs or continues a Dijkstra search starting at the startNode and ignoring the ignoreNode given in init().
|
String |
getMemoryUsageAsString() |
int |
getSettledNodes() |
void |
init(int startNode,
int ignoreNode)
Sets up a search for given start node and an ignored node.
|
public NodeBasedWitnessPathSearcher(CHPreparationGraph graph)
public void init(int startNode, int ignoreNode)
public double findUpperBound(int targetNode, double acceptedWeight, int maxSettledNodes)
targetNode
- the target of the search. if this node is settled we return the weight of the shortest pathacceptedWeight
- once we find a path with weight smaller than or equal to this we return the weight. the
returned weight might be larger than the weight of the real shortest path. if there is
no path with weight smaller than or equal to this we stop the search and return the best
path we found.maxSettledNodes
- once the number of settled nodes exceeds this number we return the currently found best
weight path. in this case we might not have found a path at all.Double.POSITIVE_INFINITY
if no path was foundpublic int getSettledNodes()
public String getMemoryUsageAsString()
Copyright © 2012–2023. All rights reserved.