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, graph, maxVisitedNodes, nodeAccess, 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, toStringpublic DijkstraOneToMany(Graph graph, Weighting weighting, TraversalMode tMode)
public Path calcPath(int from, int to)
RoutingAlgorithmpublic Path extractPath()
AbstractRoutingAlgorithmextractPath in class AbstractRoutingAlgorithmpublic DijkstraOneToMany clear()
public double getWeight(int endNode)
public int findEndNode(int from,
int to)
public boolean finished()
AbstractRoutingAlgorithmfinished in class AbstractRoutingAlgorithmpublic void setWeightLimit(double weightLimit)
protected boolean isWeightLimitExceeded()
public void close()
public int getVisitedNodes()
RoutingAlgorithmpublic String getName()
getName in interface RoutingAlgorithmgetName in class AbstractRoutingAlgorithmpublic String getMemoryUsageAsString()
Copyright © 2012–2021. All rights reserved.