Class AStar.Node
raft.kilavuz.runtime
java.lang.Object
  raft.kilavuz.runtime.AStar.Node
All Implemented Interfaces:
Direct Known Subclasses:
Enclosing class:

abstract public static class AStar.Node
extends Object
implements Serializable
base class of all A* nodes

Constructor Summary
protected
AStar.Node()
only subclasses may call this constructor
Method Summary
abstract float
getCostEstimate(AStar.Node dest, PathContext context)
returns the cost estimate from this node to destination node.
int
getId()
returns id of this node.
abstract Collection<? extends AStar.Transition>
getTransitions()
returns a collection of transitions from this node.
boolean
isSameWithGoal(AStar.Node goal)

returns true if id of this node equals id of goal node.

Constructor Detail
AStar.Node
protected AStar.Node()
only subclasses may call this constructor
Method Detail
getId
public final int getId()
returns id of this node. id's are assigned during creation of nodes.

getTransitions
public abstract Collection<? extends AStar.TransitiongetTransitions()
returns a collection of transitions from this node. if an adjacent node is unreachable result may contain it with a negative cost

getCostEstimate
public abstract float getCostEstimate(AStar.Node dest,
                                      PathContext context)
returns the cost estimate from this node to destination node. if cannot be estimated, returning 0 will also result in finding a solution but generally should take much time
Parameters:
dest - destination node
context - more information about pathfinding enviroment.
See Also:

isSameWithGoal
public boolean isSameWithGoal(AStar.Node goal)

returns true if id of this node equals id of goal node. this is almost the same as == operator as all nodes are assigned a different id when they're created. the result may differ from == operator if two nodes created in different JVM sessions are compared.

this method is called to decide if goal node is reached, so override this method if you have a different criteria to decide if goal is reached.

Since:
0.91
Java API documentation generated with DocFlex/Doclet v1.5.2
DocFlex/Doclet is both a multi-format Javadoc doclet and a free edition of DocFlex/Javadoc. If you need to customize your Javadoc without writing a full-blown doclet from scratch, DocFlex/Javadoc may be the only tool able to help you! Find out more at www.docflex.com