public static class AStar.DistanceCosts extends Object implements AStar.Costs
Constructor and Description |
---|
DistanceCosts() |
Modifier and Type | Method and Description |
---|---|
double |
cost(Node parent,
Edge edge,
Node next)
Cost of displacement from parent to next.
|
double |
heuristic(Node node,
Node target)
Estimate cost from the given node to the target node.
|
public DistanceCosts()
public double heuristic(Node node, Node target)
AStar.Costs
heuristic
in interface AStar.Costs
node
- A node.target
- The target node.public double cost(Node parent, Edge edge, Node next)
AStar.Costs
cost
in interface AStar.Costs
parent
- The node we come from.edge
- The definition of an heuristic. The heuristic is in charge of evaluating
The edge used between the two nodes (in case this is a
multi-graph).next
- The node we go to.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses