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 PrepareCHGraph
.Modifier and Type | Field and Description |
---|---|
protected double[] |
weights |
Constructor and Description |
---|
NodeBasedWitnessPathSearcher(PrepareCHGraph graph) |
NodeBasedWitnessPathSearcher(PrepareCHGraph graph,
int maxLevel) |
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(PrepareCHGraph graph)
public NodeBasedWitnessPathSearcher(PrepareCHGraph graph, int maxLevel)
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–2020. All rights reserved.