V- vertex type
public interface AStarAdmissibleHeuristic<V>
|Modifier and Type||Method and Description|
An admissible "heuristic estimate" of the distance from $x$, the sourceVertex, to the goal (usually denoted $h(x)$).
Returns true if the heuristic is a consistent or monotone heuristic wrt the provided
sourceVertex- the source vertex
targetVertex- the target vertex
graph. A heuristic is monotonic if its estimate is always less than or equal to the estimated distance from any neighboring vertex to the goal, plus the step cost of reaching that neighbor. For details, refer to https://en.wikipedia.org/wiki/Consistent_heuristic. In short, a heuristic is consistent iff
h(u)≤ d(u,v)+h(v), for every edge $(u,v)$, where $d(u,v)$ is the weight of edge $(u,v)$ and $h(u)$ is the estimated cost to reach the target node from vertex u. Most natural admissible heuristics, such as Manhattan or Euclidean distance, are consistent heuristics.
E- graph edges type
graph- graph to test heuristic on
graph, false otherwise
Copyright © 2019. All rights reserved.