public abstract class AbstractRoutingAlgorithm extends Object implements RoutingAlgorithm
Modifier and Type | Field and Description |
---|---|
protected EdgeExplorer |
edgeExplorer |
protected FlagEncoder |
flagEncoder |
protected Graph |
graph |
protected EdgeFilter |
inEdgeFilter |
protected int |
maxVisitedNodes |
protected NodeAccess |
nodeAccess |
protected EdgeFilter |
outEdgeFilter |
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, wait
calcPath, getVisitedNodes
protected final Graph graph
protected final Weighting weighting
protected final FlagEncoder flagEncoder
protected final TraversalMode traversalMode
protected NodeAccess nodeAccess
protected EdgeExplorer edgeExplorer
protected EdgeFilter inEdgeFilter
protected EdgeFilter outEdgeFilter
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)
RoutingAlgorithm
setMaxVisitedNodes
in interface RoutingAlgorithm
protected 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)
RoutingAlgorithm
calcPaths
in interface RoutingAlgorithm
RoutingAlgorithm.calcPath(int, int)
protected Path createEmptyPath()
public String getName()
getName
in interface RoutingAlgorithm
protected boolean isMaxVisitedNodesExceeded()
Copyright © 2012–2020. All rights reserved.