public class Path extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
Path.EdgeVisitor
The callback used in forEveryEdge.
|
Modifier and Type | Field and Description |
---|---|
protected double |
distance |
protected int |
endNode |
protected Graph |
graph |
protected boolean |
reverseOrder |
protected SPTEntry |
sptEntry
Shortest path tree entry
|
protected long |
time |
protected Weighting |
weighting |
Modifier and Type | Method and Description |
---|---|
protected void |
addEdge(int edge) |
List<EdgeIteratorState> |
calcEdges()
Returns the list of all edges.
|
InstructionList |
calcInstructions(Translation tr) |
com.carrotsearch.hppc.IntIndexedContainer |
calcNodes() |
PointList |
calcPoints()
This method calculated a list of points for this path
|
Path |
extract()
Extracts the Path from the shortest-path-tree determined by sptEntry.
|
String |
getDebugInfo() |
List<String> |
getDescription() |
double |
getDistance() |
int |
getEdgeCount() |
long |
getExtractTime() |
EdgeIteratorState |
getFinalEdge()
Yields the final edge of the path
|
long |
getTime() |
double |
getWeight()
This weight will be updated during the algorithm.
|
boolean |
isFound() |
protected void |
processEdge(int edgeId,
int adjNode,
int prevEdgeId)
Calculates the distance and time of the specified edgeId.
|
Path |
setDescription(List<String> description) |
Path |
setDistance(double distance) |
protected Path |
setEndNode(int end) |
Path |
setFound(boolean found) |
protected Path |
setFromNode(int from)
We need to remember fromNode explicitly as its not saved in one edgeId of edgeIds.
|
Path |
setSPTEntry(SPTEntry sptEntry) |
Path |
setWeight(double w) |
String |
toDetailsString() |
String |
toString() |
protected Graph graph
protected double distance
protected boolean reverseOrder
protected long time
protected SPTEntry sptEntry
protected int endNode
protected Weighting weighting
public List<String> getDescription()
protected void addEdge(int edge)
protected Path setEndNode(int end)
protected Path setFromNode(int from)
public int getEdgeCount()
public boolean isFound()
public Path setFound(boolean found)
public Path setDistance(double distance)
public double getDistance()
public long getTime()
public double getWeight()
public Path setWeight(double w)
public Path extract()
public EdgeIteratorState getFinalEdge()
public long getExtractTime()
public String getDebugInfo()
protected void processEdge(int edgeId, int adjNode, int prevEdgeId)
prevEdgeId
- here the edge that comes before edgeId is necessary. I.e. for the reverse search we need the
next edge.public List<EdgeIteratorState> calcEdges()
public com.carrotsearch.hppc.IntIndexedContainer calcNodes()
public PointList calcPoints()
public InstructionList calcInstructions(Translation tr)
public String toDetailsString()
Copyright © 2012–2017. All rights reserved.