public abstract class UT2004AStarGoal extends Object implements cz.cuni.amis.utils.astar.AStarGoal<NavPoint>
| Modifier and Type | Field and Description |
|---|---|
protected Collection<NavPoint> |
closeList |
protected Collection<NavPoint> |
openList |
| Constructor and Description |
|---|
UT2004AStarGoal() |
| Modifier and Type | Method and Description |
|---|---|
Collection<NavPoint> |
getCloseList() |
abstract int |
getEstimatedDistanceToGoal(NavPoint node)
Method defining "heuristic" for A*, see
AStarHeuristic.getEstimatedDistanceToGoal(Object). |
int |
getExtraCost(NavPoint nodeFrom,
NavPoint nodeTo)
Method defining extra-edge cost, see
AStarEvaluator.getExtraCost(Object, Object). |
Collection<NavPoint> |
getOpenList() |
abstract boolean |
isGoalReached(NavPoint actualNode)
This tests whether 'actualNode' matches your desired 'goalNode'.
|
boolean |
isNodeOpened(NavPoint node)
Method defining which nodes are allowed to be explored and which are forbidden, see
AStarEvaluator.isNodeOpened(Object). |
void |
setCloseList(Collection<NavPoint> closeList) |
void |
setOpenList(Collection<NavPoint> openList) |
protected Collection<NavPoint> closeList
protected Collection<NavPoint> openList
public void setCloseList(Collection<NavPoint> closeList)
setCloseList in interface cz.cuni.amis.utils.astar.AStarGoal<NavPoint>public void setOpenList(Collection<NavPoint> openList)
setOpenList in interface cz.cuni.amis.utils.astar.AStarGoal<NavPoint>public Collection<NavPoint> getCloseList()
public Collection<NavPoint> getOpenList()
public int getExtraCost(NavPoint nodeFrom, NavPoint nodeTo)
AStarEvaluator.getExtraCost(Object, Object). You probably won't need to use that, thus
it is not abstract.
Returns: always 0
getExtraCost in interface cz.cuni.amis.utils.astar.AStarEvaluator<NavPoint>public boolean isNodeOpened(NavPoint node)
AStarEvaluator.isNodeOpened(Object). You probably
won't need to use that, thus it is not abstract.
Returns: always 0
isNodeOpened in interface cz.cuni.amis.utils.astar.AStarEvaluator<NavPoint>public abstract int getEstimatedDistanceToGoal(NavPoint node)
AStarHeuristic.getEstimatedDistanceToGoal(Object). You will usually want to return
Euclidian distance between 'node' and your goal using NavPoint.getLocation() and Location.getDistance(Location).
See also UT2004AStarGoalNavPoint.getEstimatedDistanceToGoal in interface cz.cuni.amis.utils.astar.AStarHeuristic<NavPoint>node - public abstract boolean isGoalReached(NavPoint actualNode)
NavPoint.getId()).isGoalReached in interface cz.cuni.amis.utils.astar.AStarGoal<NavPoint>actualNode - Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.