|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.rico.engine.path.AStarNode
public abstract class 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()
Returns the cost of the node |
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. |
int |
sign(float v)
Returns the sign of the number. |
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()
public int sign(float v)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |