public class NodeBasedWitnessPathSearcher extends Object
DijkstraOneToMany
,
i.e. its a Dijkstra search that allows re-using the shortest path tree for different searches with the same origin
node and uses large int/double arrays instead of hash maps to store the shortest path tree (higher memory consumption,
but faster query times -> better for CH preparation). Main reason we use this instead of DijkstraOneToMany
is that we can use this implementation with a CHPreparationGraph
and we are only interested in checking for
witness paths (e.g. we do not need to find the actual path).Modifier and Type | Field and Description |
---|---|
protected double[] |
weights |
Constructor and Description |
---|
NodeBasedWitnessPathSearcher(CHPreparationGraph graph) |
Modifier and Type | Method and Description |
---|---|
NodeBasedWitnessPathSearcher |
clear()
Call clear if you have a different start node and need to clear the cache.
|
void |
close() |
int |
findEndNode(int from,
int to) |
boolean |
finished() |
String |
getMemoryUsageAsString()
List currently used memory in MB (approximately)
|
int |
getVisitedNodes() |
double |
getWeight(int endNode) |
void |
ignoreNode(int node) |
protected boolean |
isWeightLimitExceeded() |
void |
setMaxVisitedNodes(int numberOfNodes) |
void |
setWeightLimit(double weightLimit) |
public NodeBasedWitnessPathSearcher(CHPreparationGraph graph)
public NodeBasedWitnessPathSearcher clear()
public double getWeight(int endNode)
public int findEndNode(int from, int to)
public boolean finished()
public void setWeightLimit(double weightLimit)
protected boolean isWeightLimitExceeded()
public void close()
public int getVisitedNodes()
public String getMemoryUsageAsString()
public void setMaxVisitedNodes(int numberOfNodes)
public void ignoreNode(int node)
Copyright © 2012–2021. All rights reserved.