1 package cz.cuni.amis.utils.floydwarshall; 2 3 import cz.cuni.amis.utils.astar.AStarGoal; 4 5 /** 6 * This interface provides additional information about the map Floyd-Warshall algorithm is going to work with. 7 * <p><p> 8 * Generally, you will use {@link FWMap} interface to define the map in general and then use this {@link FWMapView} interface 9 * to specify a specific needs you need to impose over the map as is "forbidding" some nodes or "imposing additional costs 10 * onto the nodes". 11 * 12 * @author Jimmy 13 */ 14 @Deprecated 15 public interface FWMapView<NODE> { 16 17 /** 18 * Method defining extra-node cost, that is a cost that is attached to the "node", by having such node on the path costs 19 * This allows you to provide "customization" to the graph nodes, basicly it is a way of telling "this node is cool to have in path" (negative cost) 20 * or "this node is bad to have in path" (positive cost). 21 * 22 * @param nodeFrom 23 * @param nodeTo 24 * 25 * @return 26 */ 27 public int getNodeExtraCost(NODE node); 28 29 /** 30 * Method defining extra-edge cost, similar to {@link AStarGoal#getExtraCost(Object, Object)}. This allows you to 31 * provide "customization" to the graph edge lengths. It allows you to say "this is a cool edge to use for travel" (negative extra cost) 32 * or "this edge is hard to cross" (positive extra cost). 33 * 34 * @param nodeFrom 35 * @param nodeTo 36 * 37 * @return 38 */ 39 public int getEdgeExtraCost(NODE nodeFrom, NODE nodeTo); 40 41 /** 42 * Method defining which nodes are allowed to be explored / used by {@link FloydWarshall} for the purpose of path planning. 43 * May be used to define "forbidden" nodes, i.e., FloydWarshal will never return path leading to such nodes or using such nodes, it would 44 * act as edges into / from this node are non-existing. 45 * 46 * @param node 47 * 48 * @return 49 */ 50 public boolean isNodeOpened(NODE node); 51 52 /** 53 * Method defining which "edges" (oriented links between nodes) can be used for the purpose of path-planning. It can be used 54 * to "forbid" usage of some edges, that is you can rule out some edges you do not want your agent to be able to travel. 55 * 56 * @param nodeFrom 57 * @param nodeTo 58 * 59 * @return 60 */ 61 public boolean isEdgeOpened(NODE nodeFrom, NODE nodeTo); 62 63 }