View Javadoc

1   package cz.cuni.amis.utils.floydwarshall;
2   
3   import java.util.Collection;
4   import java.util.List;
5   
6   /**
7    * This class represents the search space for Floyd-Warshall algorithm.
8    * <ol>
9    * <li>we need to know which nodes are part of the map</li>
10   * <li>we need to know the travel cost between two nodes (edge cost)</li>
11   * </ol>
12   */
13  @Deprecated
14  public interface FWMap<NODE> {
15  	
16  	/**
17  	 * This must return the list of ALL NODES that are present in your map (== environment).
18  	 * These nodes are going to be then used for FW.
19  	 * <p><p>
20  	 * IT IS FORBIDDEN TO SHUFFLE NODES IN THIS LIST ... IT MUST ALWAYS RETURN THE VERY SAME LIST (or at least
21  	 * list that is having every node in the place it was before).  
22  	 */
23  	public List<NODE> getNodes();
24  	
25  	/**
26  	 * General cost of having this node at your path. This allows you to say how every node appeals to the agent, 
27  	 * it may specify "this is a cool node, try to get it on your path" (negative cost) or "this is neutral node"
28  	 * (zero cost) or "this is a bad node to have on your path" (positive cost).
29  	 * 
30  	 * @param node
31  	 * @return
32  	 */
33  	public int getNodeCost(NODE node);
34  	
35  	/**
36  	 * Should return the distance from nodeFrom to nodeTo.
37       * You can be sure that nodeTo is among the neighbours of nodeFrom.
38       * 
39  	 * @param nodeFrom
40  	 * @param nodeTo
41  	 * @return cost of an edge
42  	 */
43  	public int getEdgeCost(NODE nodeFrom, NODE nodeTo);
44  	
45  	
46  }