public class DijkstraOneToMany extends AbstractRoutingAlgorithm
Dijkstra
. Old data structures are cached between requests and potentially reused and
the shortest path tree is stored in (large as the graph) arrays instead of hash maps.
Modifier and Type | Field and Description |
---|---|
protected double[] |
weights |
edgeExplorer, flagEncoder, graph, inEdgeFilter, maxVisitedNodes, nodeAccess, outEdgeFilter, traversalMode, weighting
Constructor and Description |
---|
DijkstraOneToMany(Graph graph,
Weighting weighting,
TraversalMode tMode) |
Modifier and Type | Method and Description |
---|---|
Path |
calcPath(int from,
int to)
Calculates the best path between the specified nodes.
|
DijkstraOneToMany |
clear()
Call clear if you have a different start node and need to clear the cache.
|
void |
close() |
Path |
extractPath()
To be overwritten from extending class.
|
int |
findEndNode(int from,
int to) |
boolean |
finished()
To be overwritten from extending class.
|
String |
getMemoryUsageAsString()
List currently used memory in MB (approximately)
|
String |
getName() |
int |
getVisitedNodes()
Returns the visited nodes after searching.
|
double |
getWeight(int endNode) |
protected boolean |
isWeightLimitExceeded() |
void |
setWeightLimit(double weightLimit) |
accept, calcPaths, checkAlreadyRun, createEmptyPath, isMaxVisitedNodesExceeded, setMaxVisitedNodes, toString
public DijkstraOneToMany(Graph graph, Weighting weighting, TraversalMode tMode)
public Path calcPath(int from, int to)
RoutingAlgorithm
public Path extractPath()
AbstractRoutingAlgorithm
extractPath
in class AbstractRoutingAlgorithm
public DijkstraOneToMany clear()
public double getWeight(int endNode)
public int findEndNode(int from, int to)
public boolean finished()
AbstractRoutingAlgorithm
finished
in class AbstractRoutingAlgorithm
public void setWeightLimit(double weightLimit)
protected boolean isWeightLimitExceeded()
public void close()
public int getVisitedNodes()
RoutingAlgorithm
public String getName()
getName
in interface RoutingAlgorithm
getName
in class AbstractRoutingAlgorithm
public String getMemoryUsageAsString()
Copyright © 2012–2020. All rights reserved.