public abstract class AbstractBidirCHAlgo extends AbstractBidirAlgo implements BidirRoutingAlgorithm
for non-CH bidirectional algorithms
Modifier and Type | Field and Description |
---|---|
protected RoutingCHGraph |
graph |
protected RoutingCHEdgeExplorer |
inEdgeExplorer |
protected CHEdgeFilter |
levelEdgeFilter |
protected NodeAccess |
nodeAccess |
protected RoutingCHEdgeExplorer |
outEdgeExplorer |
bestBwdEntry, bestFwdEntry, bestWeight, bestWeightMapFrom, bestWeightMapOther, bestWeightMapTo, currFrom, currTo, finishedFrom, finishedTo, from, fromOutEdge, maxVisitedNodes, to, toInEdge, traversalMode, updateBestPath
Constructor and Description |
---|
AbstractBidirCHAlgo(RoutingCHGraph graph,
TraversalMode tMode) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
accept(RoutingCHEdgeIteratorState edge,
SPTEntry currEdge,
boolean reverse) |
protected double |
calcWeight(RoutingCHEdgeIteratorState edgeState,
boolean reverse,
int prevOrNextEdgeId) |
protected double |
calcWeight(RoutingCHEdgeIteratorState iter,
SPTEntry currEdge,
boolean reverse) |
protected Path |
createEmptyPath() |
protected abstract SPTEntry |
createEntry(int edge,
int adjNode,
int incEdge,
double weight,
SPTEntry parent,
boolean reverse)
Creates a new entry of the shortest path tree (a
SPTEntry or one of its subclasses) during a dijkstra
expansion. |
protected Path |
extractPath() |
protected void |
fillEdgesFromUsingFilter(CHEdgeFilter edgeFilter) |
protected void |
fillEdgesToUsingFilter(CHEdgeFilter edgeFilter) |
boolean |
finished() |
protected double |
getInEdgeWeight(SPTEntry entry) |
protected void |
initCollections(int size) |
protected void |
postInitFrom() |
protected void |
postInitTo() |
void |
setPathExtractorSupplier(Supplier<BidirPathExtractor> pathExtractorSupplier) |
String |
toString() |
protected void |
updateEntry(SPTEntry entry,
int edge,
int adjNode,
int incEdge,
double weight,
SPTEntry parent,
boolean reverse) |
bwdSearchCanBeStopped, calcPath, calcPath, calcPaths, checkAlreadyRun, createStartEntry, fromEntryCanBeSkipped, fwdSearchCanBeStopped, getCurrentFromWeight, getCurrentToWeight, getIncomingEdge, getName, getVisitedNodes, initFrom, initTo, isMaxVisitedNodesExceeded, postInit, runAlgo, setMaxVisitedNodes, setUpdateBestPath, toEntryCanBeSkipped, updateBestPath
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
calcPath
calcPath, calcPaths, getName, getVisitedNodes, setMaxVisitedNodes
protected final RoutingCHGraph graph
protected final NodeAccess nodeAccess
protected RoutingCHEdgeExplorer inEdgeExplorer
protected RoutingCHEdgeExplorer outEdgeExplorer
protected CHEdgeFilter levelEdgeFilter
public AbstractBidirCHAlgo(RoutingCHGraph graph, TraversalMode tMode)
protected void initCollections(int size)
initCollections
in class AbstractBidirAlgo
protected abstract SPTEntry createEntry(int edge, int adjNode, int incEdge, double weight, SPTEntry parent, boolean reverse)
SPTEntry
or one of its subclasses) during a dijkstra
expansion.edge
- the id of the edge that is currently processed for the expansionadjNode
- the adjacent node of the edgeincEdge
- the id of the edge that is incoming to the node the edge is pointed at. usually this is the same as
edge, but for edge-based CH and in case edge corresponds to a shortcut incEdge is the original edge
that is incoming to the nodeweight
- 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 otherwiseprotected void postInitFrom()
postInitFrom
in class AbstractBidirAlgo
protected void postInitTo()
postInitTo
in class AbstractBidirAlgo
protected void fillEdgesFromUsingFilter(CHEdgeFilter edgeFilter)
edgeFilter
- edge filter used to fill edges. the levelEdgeFilter
reference will be set to
edgeFilter by this method, so make sure edgeFilter does not use it directly.protected void fillEdgesToUsingFilter(CHEdgeFilter edgeFilter)
fillEdgesFromUsingFilter(CHEdgeFilter)
public boolean finished()
finished
in class AbstractBidirAlgo
protected double calcWeight(RoutingCHEdgeIteratorState edgeState, boolean reverse, int prevOrNextEdgeId)
protected void updateEntry(SPTEntry entry, int edge, int adjNode, int incEdge, double weight, SPTEntry parent, boolean reverse)
protected boolean accept(RoutingCHEdgeIteratorState edge, SPTEntry currEdge, boolean reverse)
protected double calcWeight(RoutingCHEdgeIteratorState iter, SPTEntry currEdge, boolean reverse)
protected double getInEdgeWeight(SPTEntry entry)
getInEdgeWeight
in class AbstractBidirAlgo
protected Path extractPath()
extractPath
in class AbstractBidirAlgo
public void setPathExtractorSupplier(Supplier<BidirPathExtractor> pathExtractorSupplier)
protected Path createEmptyPath()
Copyright © 2012–2022. All rights reserved.