cz.cuni.amis.utils.astar
Interface AStarGoal<NODE>

All Superinterfaces:
AStarEvaluator<NODE>, AStarHeuristic<NODE>

public interface AStarGoal<NODE>
extends AStarEvaluator<NODE>

This class defines the goal of A* algorithm, it allows you to provide complex implementation of the isGoalReached(Object) method.


Method Summary
 boolean isGoalReached(NODE actualNode)
          Returns true, if we've reached the goal ...
 void setCloseList(java.util.Collection<NODE> closeList)
          This is called at the beginning of the A* algorithm to bind the close list to the goal (you may use it check which nodes we've visited, etc...
 void setOpenList(java.util.Collection<NODE> openList)
          This is called at the beginning of the A* algorithm to bind the open list to the goal (you may use it check which nodes we've visited, etc...
 
Methods inherited from interface cz.cuni.amis.utils.astar.AStarEvaluator
getExtraCost, isNodeOpened
 
Methods inherited from interface cz.cuni.amis.utils.astar.AStarHeuristic
getEstimatedDistanceToGoal
 

Method Detail

setOpenList

void setOpenList(java.util.Collection<NODE> openList)
This is called at the beginning of the A* algorithm to bind the open list to the goal (you may use it check which nodes we've visited, etc... for extra cost for instance). DON'T CHANGE IT!


setCloseList

void setCloseList(java.util.Collection<NODE> closeList)
This is called at the beginning of the A* algorithm to bind the close list to the goal (you may use it check which nodes we've visited, etc... for extra cost for instance). DON'T CHANGE IT!


isGoalReached

boolean isGoalReached(NODE actualNode)
Returns true, if we've reached the goal ... e.g. actualNode is node we were trying to get to if this function never returns true, A* will run until all nodes are evaluated

Parameters:
actualNode -