1 package cz.cuni.amis.utils.astar; 2 3 import java.util.Collection; 4 5 /** 6 * This class represents the search space for A* algorithm 7 * 1) we need to know which neighbours the node has 8 * 2) we need to know the travel cost between two nodes (edge cost) 9 * 10 * <p><p> 11 * Use amis-path-finding library instead, see svn://artemis.ms.mff.cuni.cz/pogamut/trunk/project/Utils/AmisPathFinding 12 */ 13 @Deprecated 14 public interface AStarMap<NODE> { 15 16 /** 17 * General cost of having this node at your path. This allows you to say how every node appeals to the agent, 18 * it may specify "this is a cool node, try to get it on your path" (negative cost) or "this is neutral node" 19 * (zero cost) or "this is a bad node to have on your path" (positive cost). 20 * 21 * @param node 22 * @return 23 */ 24 public int getNodeCost(NODE node); 25 26 /** 27 * Should return the distance from nodeFrom to nodeTo 28 * You can be sure that nodeTo is among the neighbours of nodeFrom. 29 * @param nodeFrom 30 * @param nodeTo 31 * @return cost of an edge 32 */ 33 public int getEdgeCost(NODE nodeFrom, NODE nodeTo); 34 35 /** 36 * This should return a collection of nodes which are connected to this one. 37 */ 38 public Collection<NODE> getNodeNeighbours(NODE node); 39 }