View Javadoc

1   package cz.cuni.amis.utils.astar;
2   
3   /**
4    * Evaluator is extending a functionality of {@link AStarHeuristic} allowing 
5    * you to additionally specified which NODEs can't be visited at all or assign
6    * extra cost to edges between nodes which is added to {@link AStarMap#getEdgeCost(Object, Object)}
7    * when computing distances between them.
8    * 
9    * @author Jimmy
10   *
11   * @param <NODE>
12   * 
13   * <p><p>
14   * Use amis-path-finding library instead, see svn://artemis.ms.mff.cuni.cz/pogamut/trunk/project/Utils/AmisPathFinding
15   */
16  @Deprecated
17  public interface AStarEvaluator<NODE> extends AStarHeuristic<NODE> {
18  
19  	 /**
20  	  * Returns true if A* can use this node (e.g. to step on this type of floor)
21        * You can use it to forbid some specific nodes	  
22  	  */
23  	 public boolean isNodeOpened(NODE node); 
24  
25  	 /**
26  	  * Returns extra cost to add to value when trying to go
27        * nodeFrom to nodeTo ... of course it can depends only on nodeTo 
28        * (some special kind of a floor for instance)
29        * 
30        * Don't worry about the edge cost to become negative, A* ensures that
31        * that the least cost is 0 (Algorithm can't work over graphs with negative
32        * costs.)
33        * 
34  	  * @return extra cost of edge for nodeFrom -> nodeTo
35  	  */
36  	 public int getExtraCost(NODE nodeFrom, NODE nodeTo);
37  	
38  }