|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPFMapView<NODE>
This interface provides additional information about the map algorithms are going to work with. In its implementation you may provide custom view on the map as needed for your search (for instance you need to forbid some nodes / edges or change the general cost of nodes / edges in order to change how your agent is going to plan the path).
Generally, you will use IPFMap
interface to define the map in general and then use this IPFMapView
interface
to specify a specific needs you need to impose over the map as is "forbidding" some nodes or "imposing additional costs
onto the nodes".
Nested Class Summary | |
---|---|
static class |
IPFMapView.DefaultView<NODE>
Default view does not impose any specific view on the map... |
Method Summary | |
---|---|
int |
getArcExtraCost(NODE nodeFrom,
NODE nodeTo,
int mapCost)
Method defining extra-arc cost, that is a cost that is added to IPFMap.getArcCost(Object, Object) . |
Collection<NODE> |
getExtraNeighbors(NODE node,
Collection<NODE> mapNeighbors)
This method may return new nodes which are not present in 'mapNeighbors' (as returned by IPFMap.getNeighbors(Object) ). |
int |
getNodeExtraCost(NODE node,
int mapCost)
Method defining extra-node cost, that is a cost that is added to IPFMap.getNodeCost(Object) . |
boolean |
isArcOpened(NODE nodeFrom,
NODE nodeTo)
Arcs filter. |
boolean |
isNodeOpened(NODE node)
Nodes filter. |
Method Detail |
---|
Collection<NODE> getExtraNeighbors(NODE node, Collection<NODE> mapNeighbors)
IPFMap.getNeighbors(Object)
).
Such nodes are then exclusively accessible to your particular agent, that is, this methods is adding nodes that can be accessed
by the agent but are not part of your general map description.
"node" MUST NOT BE ADDED TO "mapNeighbors"!
Returned collection must not contain multiple references to a single neighbor (multi-graph is forbidden).
Returned collection must not contain any node from "mapNeighbors".
node
- mapNeighbors
- neighbors of the "node" as returned by IPFMap.getNeighbors(Object)
, may return nullint getNodeExtraCost(NODE node, int mapCost)
IPFMap.getNodeCost(Object)
.
This allows you to provide "customization" to the graph nodes, simply, it is a way of telling "this node is cool to have in path" (negative cost) or "this node is bad to have in path" (positive cost).
node
- mapCost
- cost of the node as returned by underlying IPFMap.getNodeCost(Object)
int getArcExtraCost(NODE nodeFrom, NODE nodeTo, int mapCost)
IPFMap.getArcCost(Object, Object)
.
This allows you to provide "customization" to the graph arc costs. It allows you to say "this is a cool arc to use for travel" (negative extra cost) or "this edge is hard to cross" (positive extra cost).
NOTE THAT YOU MUST AVOID HAVING NEGATIVELY-VALUED ARCs (IPFMap.getArcCost(Object, Object)
+ getArcExtraCost(Object, Object, int)
< 0)!
Such arcs might lead to negative-valued circles which will make exploratory algorithms to endlessly walk in circles.
nodeFrom
- nodeTo
- mapCost
- cost of the arc as returned by underlying IPFMap.getArcCost(Object, Object)
boolean isNodeOpened(NODE node)
node
-
boolean isArcOpened(NODE nodeFrom, NODE nodeTo)
nodeFrom
- nodeTo
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |