public class Path extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
Path.EdgeVisitor
The callback used in forEveryEdge.
|
Modifier and Type | Method and Description |
---|---|
Path |
addDistance(double distance) |
void |
addEdge(int edge) |
Path |
addTime(long time) |
List<EdgeIteratorState> |
calcEdges()
Returns the list of all edges.
|
com.carrotsearch.hppc.IntIndexedContainer |
calcNodes() |
PointList |
calcPoints()
This method calculated a list of points for this path
|
void |
forEveryEdge(Path.EdgeVisitor visitor)
Iterates over all edges in this path sorted from start to end and calls the visitor callback
for every edge.
|
String |
getDebugInfo() |
List<String> |
getDescription() |
double |
getDistance() |
int |
getEdgeCount() |
int |
getEndNode() |
EdgeIteratorState |
getFinalEdge()
Yields the final edge of the path
|
int |
getSize() |
long |
getTime() |
double |
getWeight()
This weight will be updated during the algorithm.
|
boolean |
isFound() |
void |
setDebugInfo(String debugInfo) |
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 |
setWeight(double w) |
String |
toString() |
public Path(Graph graph)
public List<String> getDescription()
public void addEdge(int edge)
public int getEndNode()
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 Path addDistance(double distance)
public double getDistance()
public long getTime()
public Path addTime(long time)
public double getWeight()
public Path setWeight(double w)
public EdgeIteratorState getFinalEdge()
public void setDebugInfo(String debugInfo)
public String getDebugInfo()
public void forEveryEdge(Path.EdgeVisitor visitor)
visitor
- callback to handle every edge. The edge is decoupled from the iterator and can
be stored.public List<EdgeIteratorState> calcEdges()
public com.carrotsearch.hppc.IntIndexedContainer calcNodes()
public PointList calcPoints()
public int getSize()
Copyright © 2012–2020. All rights reserved.