|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

public interface IAStarResult<NODE>
This interface is returned by AStar#AStar.findPath(cz.cuni.amis.pathfinding.map.IPFGoal, long).
It contains results from the search as well as method for finding the path from the startNode to the goalNode.
| Method Summary | |
|---|---|
int |
getCostToNode(NODE node)
Returns cost of the path from startNode to node if the node was touched by A* algorithm (if A* was successful, then this always contains the goalNode and every node on the path at least). |
int |
getDistanceToGoal()
If the AStar succeeded then it returns the distance to the goal from the start node. |
int |
getEstimatedCostToNode(NODE node)
Returns estimated cost of the path from startNode to goal through node. |
List<NODE> |
getPath()
Returns the path from startNode to goalNode. |
NODE |
getPreviousNode(NODE node)
Previous node in the path to the goal node. |
boolean |
isSuccess()
Whether this result represents the success, i.e., path from start to goal node has been found. |
| Method Detail |
|---|
NODE getPreviousNode(NODE node)
node -
int getCostToNode(NODE node)
If node wasn't touched by A* algorithm, then it returns -1.
node -
int getEstimatedCostToNode(NODE node)
If node wasn't touched by A* algorithm, then it returns -1.
node -
List<NODE> getPath()
First item is startNode and the last item is goalNode. If startNode == goalNode then it contains only one item. For each index ... path[index] has neighbor path[index+1].
If the path doesn't exist - returns null.
int getDistanceToGoal()
Returns -1 otherwise.
boolean isSuccess()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||