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() |
com.carrotsearch.hppc.IntArrayList |
getEdges() |
int |
getEndNode() |
EdgeIteratorState |
getFinalEdge()
Yields the final edge of the path
|
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) |
void |
setEdges(com.carrotsearch.hppc.IntArrayList edgeIds) |
Path |
setEndNode(int end) |
Path |
setFound(boolean found) |
Path |
setFromNode(int from)
We need to remember fromNode explicitly as its not saved in one edgeId of edgeIds.
|
Path |
setTime(long time) |
Path |
setWeight(double w) |
String |
toString() |
public Path(Graph graph)
public List<String> getDescription()
public com.carrotsearch.hppc.IntArrayList getEdges()
public void setEdges(com.carrotsearch.hppc.IntArrayList edgeIds)
public void addEdge(int edge)
public int getEdgeCount()
public int getEndNode()
public Path setEndNode(int end)
public Path setFromNode(int from)
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 setTime(long time)
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()
Copyright © 2012–2021. All rights reserved.