|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.brackeen.javagamebook.path.AStarNode
The AStarNode class, along with the AStarSearch class, implements a generic A* search algorthim. The AStarNode class should be subclassed to provide searching capability.
Constructor Summary | |
AStarNode()
|
Method Summary | |
int |
compareTo(java.lang.Object other)
|
float |
getCost()
|
abstract float |
getCost(AStarNode node)
Gets the cost between this node and the specified adjacent (aka "neighbor" or "child") node. |
abstract float |
getEstimatedCost(AStarNode node)
Gets the estimated cost between this node and the specified node. |
abstract java.util.List |
getNeighbors()
Gets the children (aka "neighbors" or "adjacent nodes") of this node. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AStarNode()
Method Detail |
public float getCost()
public int compareTo(java.lang.Object other)
compareTo
in interface java.lang.Comparable
public abstract float getCost(AStarNode node)
public abstract float getEstimatedCost(AStarNode node)
public abstract java.util.List getNeighbors()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |