org.jgrapht.alg.interfaces

• Type Parameters:
V - vertex type
All Known Implementing Classes:

public interface AStarAdmissibleHeuristic<V>
Interface for an admissible heuristic used in A* search.
Author:
Joris Kinable, Jon Robison, Thomas Breitbart
• ### Method Summary

All Methods
Modifier and Type Method and Description
double getCostEstimate(V sourceVertex, V targetVertex)
An admissible "heuristic estimate" of the distance from $x$, the sourceVertex, to the goal (usually denoted $h(x)$).
• ### Method Detail

• #### getCostEstimate

double getCostEstimate(V sourceVertex,
V targetVertex)
An admissible "heuristic estimate" of the distance from $x$, the sourceVertex, to the goal (usually denoted $h(x)$). This is the good guess function which must never overestimate the distance.
Parameters:
sourceVertex - the source vertex
targetVertex - the target vertex
Returns:
an estimate of the distance from the source to the target vertex