1 package cz.cuni.amis.utils.astar; 2 3 /** 4 * This is an interface containing a method for computing the {@link AStar} heuristic. That means the estimation 5 * how far the goal is from some node that is currently being visited by {@link AStar}. 6 * 7 * @author Jimmy 8 */ 9 public interface AStarHeuristic<NODE> { 10 11 /** 12 * This is heuristic function. 13 * <p><p> 14 * <b>WARNING:</b> 15 * <p><p> 16 * This heuristic must be correct for A* to work correctly, that means 17 * the returned distance must be smaller or equal to the real distance 18 * and must be monotonic. (In 2D, 3D an euclidean metric will do the job). 19 * 20 * @return how far is to the goal from the node 21 */ 22 public int getEstimatedDistanceToGoal(NODE node); 23 24 }