public static class AStar.DistanceCosts extends Object implements AStar.Costs
| Constructor and Description |
|---|
AStar.DistanceCosts() |
| Modifier and Type | Method and Description |
|---|---|
double |
cost(org.graphstream.graph.Node parent,
org.graphstream.graph.Edge edge,
org.graphstream.graph.Node next)
Cost of displacement from parent to next.
|
double |
heuristic(org.graphstream.graph.Node node,
org.graphstream.graph.Node target)
Estimate cost from the given node to the target node.
|
public double heuristic(org.graphstream.graph.Node node,
org.graphstream.graph.Node target)
AStar.Costsheuristic in interface AStar.Costsnode - A node.target - The target node.public double cost(org.graphstream.graph.Node parent,
org.graphstream.graph.Edge edge,
org.graphstream.graph.Node next)
AStar.Costscost in interface AStar.Costsparent - 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.Copyright © 2015. All rights reserved.