Package com.graphhopper.routing
Class AbstractNonCHBidirAlgo
java.lang.Object
com.graphhopper.routing.AbstractBidirAlgo
com.graphhopper.routing.AbstractNonCHBidirAlgo
- All Implemented Interfaces:
EdgeToEdgeRoutingAlgorithm
,RoutingAlgorithm
- Direct Known Subclasses:
AStarBidirection
,DijkstraBidirectionRef
public abstract class AbstractNonCHBidirAlgo
extends AbstractBidirAlgo
implements EdgeToEdgeRoutingAlgorithm
Common subclass for bidirectional algorithms.
- Author:
- Peter Karich, easbar
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected EdgeFilter
protected EdgeExplorer
protected final Graph
protected final NodeAccess
protected final Weighting
Fields inherited from class com.graphhopper.routing.AbstractBidirAlgo
bestBwdEntry, bestFwdEntry, bestWeight, bestWeightMapFrom, bestWeightMapOther, bestWeightMapTo, currFrom, currTo, finishedFrom, finishedTo, from, fromOutEdge, maxVisitedNodes, timeoutMillis, to, toInEdge, traversalMode, updateBestPath
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractNonCHBidirAlgo
(Graph graph, Weighting weighting, TraversalMode tMode) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
accept
(EdgeIteratorState iter, int prevOrNextEdgeId) protected double
calcWeight
(EdgeIteratorState iter, SPTEntry currEdge, boolean reverse) protected Path
protected abstract SPTEntry
createEntry
(EdgeIteratorState edge, double weight, SPTEntry parent, boolean reverse) Creates a new entry of the shortest path tree (aSPTEntry
or one of its subclasses) during a dijkstra expansion.protected DefaultBidirPathExtractor
createPathExtractor
(Graph graph, Weighting weighting) protected Path
protected void
fillEdgesFromUsingFilter
(EdgeFilter edgeFilter) protected void
fillEdgesToUsingFilter
(EdgeFilter edgeFilter) protected double
getInEdgeWeight
(SPTEntry entry) protected void
protected void
toString()
Methods inherited from class com.graphhopper.routing.AbstractBidirAlgo
bwdSearchCanBeStopped, calcPath, calcPath, calcPaths, checkAlreadyRun, createStartEntry, finished, fromEntryCanBeSkipped, fwdSearchCanBeStopped, getCurrentFromWeight, getCurrentToWeight, getIncomingEdge, getName, getVisitedNodes, initCollections, initFrom, initTo, isMaxVisitedNodesExceeded, isTimeoutExceeded, postInit, runAlgo, setMaxVisitedNodes, setTimeoutMillis, setUpdateBestPath, setupFinishTime, toEntryCanBeSkipped, updateBestPath
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.graphhopper.routing.EdgeToEdgeRoutingAlgorithm
calcPath
Methods inherited from interface com.graphhopper.routing.RoutingAlgorithm
calcPath, calcPaths, getName, getVisitedNodes, setMaxVisitedNodes, setTimeoutMillis
-
Field Details
-
graph
-
nodeAccess
-
weighting
-
edgeExplorer
-
additionalEdgeFilter
-
-
Constructor Details
-
AbstractNonCHBidirAlgo
-
-
Method Details
-
createEntry
protected abstract SPTEntry createEntry(EdgeIteratorState edge, double weight, SPTEntry parent, boolean reverse) Creates a new entry of the shortest path tree (aSPTEntry
or one of its subclasses) during a dijkstra expansion.- Parameters:
edge
- the edge that is currently processed for the expansionweight
- the weight the shortest path three entry should carryparent
- the parent entry of in the shortest path treereverse
- true if we are currently looking at the backward search, false otherwise
-
createPathExtractor
-
postInitFrom
protected void postInitFrom()- Specified by:
postInitFrom
in classAbstractBidirAlgo
-
postInitTo
protected void postInitTo()- Specified by:
postInitTo
in classAbstractBidirAlgo
-
fillEdgesFromUsingFilter
- Parameters:
edgeFilter
- edge filter used to filter edges duringfillEdgesFrom()
-
fillEdgesToUsingFilter
- See Also:
-
calcWeight
-
getInEdgeWeight
- Specified by:
getInEdgeWeight
in classAbstractBidirAlgo
-
extractPath
- Specified by:
extractPath
in classAbstractBidirAlgo
-
accept
-
createEmptyPath
-
toString
-