public abstract class AbstractBidirAlgo extends AbstractRoutingAlgorithm
| Modifier and Type | Field and Description |
|---|---|
protected PathBidirRef |
bestPath |
protected com.carrotsearch.hppc.IntObjectMap<SPTEntry> |
bestWeightMapFrom |
protected com.carrotsearch.hppc.IntObjectMap<SPTEntry> |
bestWeightMapOther |
protected com.carrotsearch.hppc.IntObjectMap<SPTEntry> |
bestWeightMapTo |
protected SPTEntry |
currFrom |
protected SPTEntry |
currTo |
protected boolean |
finishedFrom |
protected boolean |
finishedTo |
protected int |
from |
protected int |
to |
additionalEdgeFilter, flagEncoder, graph, inEdgeExplorer, maxVisitedNodes, nodeAccess, outEdgeExplorer, traversalMode, weighting| Constructor and Description |
|---|
AbstractBidirAlgo(Graph graph,
Weighting weighting,
TraversalMode tMode) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
accept(EdgeIteratorState edge,
SPTEntry currEdge,
boolean reverse) |
protected boolean |
bwdSearchCanBeStopped() |
Path |
calcPath(int from,
int to)
Calculates the best path between the specified nodes.
|
protected double |
calcWeight(EdgeIteratorState iter,
SPTEntry currEdge,
boolean reverse) |
protected Path |
createAndInitPath() |
protected abstract SPTEntry |
createEntry(EdgeIteratorState edge,
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 abstract SPTEntry |
createStartEntry(int node,
double weight,
boolean reverse)
Creates the root shortest path tree entry for the forward or backward search.
|
protected Path |
extractPath()
To be overwritten from extending class.
|
protected boolean |
finished()
To be overwritten from extending class.
|
protected boolean |
fromEntryCanBeSkipped() |
protected boolean |
fwdSearchCanBeStopped() |
protected double |
getCurrentFromWeight() |
protected double |
getCurrentToWeight() |
protected int |
getIncomingEdge(SPTEntry entry) |
protected int |
getOrigEdgeId(EdgeIteratorState edge,
boolean reverse) |
protected int |
getTraversalId(EdgeIteratorState edge,
int origEdgeId,
boolean reverse) |
int |
getVisitedNodes()
Returns the visited nodes after searching.
|
protected void |
initCollections(int size) |
protected void |
initFrom(int from,
double weight) |
protected void |
initTo(int to,
double weight) |
protected void |
postInit(int from,
int to) |
protected void |
postInitFrom() |
protected void |
postInitTo() |
protected void |
runAlgo() |
protected void |
setUpdateBestPath(boolean b) |
protected boolean |
toEntryCanBeSkipped() |
protected void |
updateBestPath(EdgeIteratorState edgeState,
SPTEntry entry,
int traversalId,
boolean reverse) |
protected void |
updateEntry(SPTEntry entry,
EdgeIteratorState edge,
int edgeId,
double weight,
SPTEntry parent,
boolean reverse) |
accept, calcPaths, checkAlreadyRun, createEmptyPath, getName, isMaxVisitedNodesExceeded, setEdgeFilter, setMaxVisitedNodes, toStringprotected int from
protected int to
protected com.carrotsearch.hppc.IntObjectMap<SPTEntry> bestWeightMapFrom
protected com.carrotsearch.hppc.IntObjectMap<SPTEntry> bestWeightMapTo
protected com.carrotsearch.hppc.IntObjectMap<SPTEntry> bestWeightMapOther
protected SPTEntry currFrom
protected SPTEntry currTo
protected PathBidirRef bestPath
protected boolean finishedFrom
protected boolean finishedTo
public AbstractBidirAlgo(Graph graph, Weighting weighting, TraversalMode tMode)
protected void initCollections(int size)
protected abstract SPTEntry createStartEntry(int node, double weight, boolean reverse)
protected abstract SPTEntry createEntry(EdgeIteratorState edge, int incEdge, double weight, SPTEntry parent, boolean reverse)
SPTEntry or one of its subclasses) during a dijkstra
expansion.edge - the edge that is currently processed for the expansionincEdge - the id of the edge that is incoming to the node the edge is pointed at. usually this is the same as
edge.getEdge(), but for edge-based CH and in case edge is 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 otherwisepublic Path calcPath(int from, int to)
RoutingAlgorithmprotected Path createAndInitPath()
protected void initFrom(int from,
double weight)
protected void initTo(int to,
double weight)
protected void postInit(int from,
int to)
protected void postInitFrom()
protected void postInitTo()
protected void runAlgo()
protected boolean finished()
AbstractRoutingAlgorithmfinished in class AbstractRoutingAlgorithmprotected void updateBestPath(EdgeIteratorState edgeState, SPTEntry entry, int traversalId, boolean reverse)
protected void updateEntry(SPTEntry entry, EdgeIteratorState edge, int edgeId, double weight, SPTEntry parent, boolean reverse)
protected boolean accept(EdgeIteratorState edge, SPTEntry currEdge, boolean reverse)
protected int getOrigEdgeId(EdgeIteratorState edge, boolean reverse)
protected int getIncomingEdge(SPTEntry entry)
protected int getTraversalId(EdgeIteratorState edge, int origEdgeId, boolean reverse)
protected double calcWeight(EdgeIteratorState iter, SPTEntry currEdge, boolean reverse)
protected Path extractPath()
AbstractRoutingAlgorithmextractPath in class AbstractRoutingAlgorithmprotected boolean fromEntryCanBeSkipped()
protected boolean fwdSearchCanBeStopped()
protected boolean toEntryCanBeSkipped()
protected boolean bwdSearchCanBeStopped()
protected double getCurrentFromWeight()
protected double getCurrentToWeight()
protected void setUpdateBestPath(boolean b)
public int getVisitedNodes()
RoutingAlgorithmCopyright © 2012–2019. All rights reserved.