cz.cuni.amis.pogamut.ut2004.agent.navigation.astar
Class UT2004AStarGoalNavPoint

Package class diagram package UT2004AStarGoalNavPoint
java.lang.Object
  extended by cz.cuni.amis.pogamut.ut2004.agent.navigation.astar.UT2004AStarGoal
      extended by cz.cuni.amis.pogamut.ut2004.agent.navigation.astar.UT2004AStarGoalNavPoint
All Implemented Interfaces:
cz.cuni.amis.utils.astar.AStarEvaluator<NavPoint>, cz.cuni.amis.utils.astar.AStarGoal<NavPoint>, cz.cuni.amis.utils.astar.AStarHeuristic<NavPoint>

public class UT2004AStarGoalNavPoint
extends UT2004AStarGoal


Field Summary
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.agent.navigation.astar.UT2004AStarGoal
closeList, openList
 
Constructor Summary
UT2004AStarGoalNavPoint(NavPoint goalNavPoint)
           
 
Method Summary
 int getEstimatedDistanceToGoal(NavPoint node)
          Using Euclidian distance via Location.getDistance(Location).
 NavPoint getGoalNavPoint()
           
 boolean isGoalReached(NavPoint actualNode)
          This tests whether 'actualNode' matches your desired 'goalNode'.
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.agent.navigation.astar.UT2004AStarGoal
getCloseList, getExtraCost, getOpenList, isNodeOpened, setCloseList, setOpenList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UT2004AStarGoalNavPoint

public UT2004AStarGoalNavPoint(NavPoint goalNavPoint)
Method Detail

getGoalNavPoint

public NavPoint getGoalNavPoint()

getEstimatedDistanceToGoal

public int getEstimatedDistanceToGoal(NavPoint node)
Using Euclidian distance via Location.getDistance(Location).

Specified by:
getEstimatedDistanceToGoal in interface cz.cuni.amis.utils.astar.AStarHeuristic<NavPoint>
Specified by:
getEstimatedDistanceToGoal in class UT2004AStarGoal

isGoalReached

public boolean isGoalReached(NavPoint actualNode)
Description copied from class: UT2004AStarGoal
This tests whether 'actualNode' matches your desired 'goalNode'. You will usually use "==" to do that as every NavPoint is "sort-of" singleton for single agent (note that every agent has different one, so you might want to equals their ids via NavPoint.getId()).

Specified by:
isGoalReached in interface cz.cuni.amis.utils.astar.AStarGoal<NavPoint>
Specified by:
isGoalReached in class UT2004AStarGoal


Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.