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

Package class diagram package AStarEvaluator
Type Parameters:
NODE -
All Superinterfaces:
AStarHeuristic<NODE>
All Known Subinterfaces:
AStarGoal<NODE>

public interface AStarEvaluator<NODE>
extends AStarHeuristic<NODE>

Evaluator is extending a functionality of AStarHeuristic allowing you to additionally specified which NODEs can't be visited at all or assign extra cost to edges between nodes which is added to AStarMap.getEdgeCost(Object, Object) when computing distances between them.

Author:
Jimmy

Method Summary
 int getExtraCost(NODE nodeFrom, NODE nodeTo)
          Returns extra cost to add to value when trying to go nodeFrom to nodeTo ...
 boolean isNodeOpened(NODE node)
          Returns true if A* can use this node (e.g.
 
Methods inherited from interface cz.cuni.amis.utils.astar.AStarHeuristic
getEstimatedDistanceToGoal
 

Method Detail

isNodeOpened

boolean isNodeOpened(NODE node)
Returns true if A* can use this node (e.g. to step on this type of floor) You can use it to forbid some specific nodes


getExtraCost

int getExtraCost(NODE nodeFrom,
                 NODE nodeTo)
Returns extra cost to add to value when trying to go nodeFrom to nodeTo ... of course it can depends only on nodeTo (some special kind of a floor for instance) Don't worry about the edge cost to become negative, A* ensures that that the least cost is 0 (Algorithm can't work over graphs with negative costs.)

Returns:
extra cost of edge for nodeFrom -> nodeTo


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