T
- the type of all nodes in the Graph
public final class PathNode<T>
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
java.util.List<PathNode<T>> |
children()
Gets all accessible direct neighbors of the current
node
that were examined during the path search. |
double |
f()
Gets the estimated total cost of the search path.
|
double |
g()
Gets the total cost of the search path up to the current
node . |
double |
h()
Gets the estimated total cost of the search path from the current
node . |
PathNode<T> |
parent()
Gets the parent of the
PathNode . |
public final T node
public java.util.List<PathNode<T>> children()
node
that were examined during the path search.
AStar
adds elements to the children()
collection
while expanding the current search path.List
of all accessible direct neighbors of the
current node
that were examined during the path searchpublic double f()
node
.public double g()
node
.
Known quantity that represents the total cost to move from the source node
to the current node
, along the path defined by the chain of
parent
links. Zero if the current node
is the source node.node
public double h()
node
.
Estimated quantity that represents the total cost to move from the current
node
to the target node. This estimate is usually obtained by calling
Graph.getDistance(T, T)
. Zero if the current node
is the target node.node
to targetpublic PathNode<T> parent()
PathNode
.
Tracing back through the parent()
links of all PathNode
instances in a search path eventually leads back to the source node.PathNode
in a path that starts at the source node,
or null
for the source node itself