public abstract class AbstractRoutingAlgorithm extends Object implements RoutingAlgorithm
| Modifier and Type | Field and Description |
|---|---|
protected EdgeExplorer |
edgeExplorer |
protected Graph |
graph |
protected int |
maxVisitedNodes |
protected NodeAccess |
nodeAccess |
protected TraversalMode |
traversalMode |
protected Weighting |
weighting |
| Constructor and Description |
|---|
AbstractRoutingAlgorithm(Graph graph,
Weighting weighting,
TraversalMode traversalMode) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
accept(EdgeIteratorState iter,
int prevOrNextEdgeId) |
List<Path> |
calcPaths(int from,
int to)
Calculates multiple possibilities for a path.
|
protected void |
checkAlreadyRun() |
protected Path |
createEmptyPath() |
protected abstract Path |
extractPath()
To be overwritten from extending class.
|
protected abstract boolean |
finished()
To be overwritten from extending class.
|
String |
getName() |
protected boolean |
isMaxVisitedNodesExceeded() |
void |
setMaxVisitedNodes(int numberOfNodes)
Limit the search to numberOfNodes.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcalcPath, getVisitedNodesprotected final Graph graph
protected final Weighting weighting
protected final TraversalMode traversalMode
protected final NodeAccess nodeAccess
protected final EdgeExplorer edgeExplorer
protected int maxVisitedNodes
public AbstractRoutingAlgorithm(Graph graph, Weighting weighting, TraversalMode traversalMode)
graph - specifies the graph where this algorithm will run onweighting - set the used weight calculation (e.g. fastest, shortest).traversalMode - how the graph is traversed e.g. if via nodes or edges.public void setMaxVisitedNodes(int numberOfNodes)
RoutingAlgorithmsetMaxVisitedNodes in interface RoutingAlgorithmprotected boolean accept(EdgeIteratorState iter, int prevOrNextEdgeId)
protected void checkAlreadyRun()
protected abstract boolean finished()
protected abstract Path extractPath()
public List<Path> calcPaths(int from, int to)
RoutingAlgorithmcalcPaths in interface RoutingAlgorithmRoutingAlgorithm.calcPath(int, int)protected Path createEmptyPath()
public String getName()
getName in interface RoutingAlgorithmprotected boolean isMaxVisitedNodesExceeded()
Copyright © 2012–2022. All rights reserved.