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 |
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,
double weight,
SPTEntry parent,
boolean reverse) |
protected abstract SPTEntry |
createStartEntry(int node,
double weight,
boolean reverse) |
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 |
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 |
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,
double weight,
SPTEntry parent,
boolean reverse) |
accept, calcPaths, checkAlreadyRun, createEmptyPath, getName, isMaxVisitedNodesExceeded, setEdgeFilter, setMaxVisitedNodes, toStringprotected 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, double weight, SPTEntry parent, boolean reverse)
public 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 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, double weight, SPTEntry parent, boolean reverse)
protected boolean accept(EdgeIteratorState edge, SPTEntry currEdge, boolean reverse)
protected int getOrigEdgeId(EdgeIteratorState edge, boolean reverse)
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–2018. All rights reserved.