|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neatech.climbplan.activityplanner.Node
public class Node
Field Summary | |
---|---|
private int |
action
the action that was applied to the parent to generate the node |
private int |
depth
the number of steps along the path from the initial state |
static int |
GO_EAST
|
static int |
GO_NORTH
|
static int |
GO_NORTH_EAST
|
static int |
GO_NORTH_WEST
|
static int |
GO_SOUTH
|
static int |
GO_SOUTH_EAST
|
static int |
GO_SOUTH_WEST
|
static int |
GO_WEST
|
private int |
id
used to uniquely identify nodes |
static int |
NO_ACTION
|
private Node |
parentNode
the node in the search tree that generated this node |
private double |
pathCost
the cost, traditionally denoted by g(n), of the path from the initial state to the node, as indicated by the parent pointers |
private State |
state
the state in the state space to which the node corresponds |
Constructor Summary | |
---|---|
Node(State state,
Node parentNode,
int action,
double pathCost,
int depth)
|
Method Summary | |
---|---|
int |
compareTo(Node o)
|
boolean |
equals(Object o)
|
double |
evaluationFunction()
|
List<Node> |
expand()
|
int |
getAction()
|
int |
getDepth()
|
int |
getID()
|
Node |
getParent()
|
double |
getPathCost()
|
State |
getState()
|
int |
hashCode()
|
boolean |
isTarget()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int NO_ACTION
public static final int GO_NORTH_WEST
public static final int GO_NORTH
public static final int GO_NORTH_EAST
public static final int GO_EAST
public static final int GO_SOUTH_EAST
public static final int GO_SOUTH
public static final int GO_SOUTH_WEST
public static final int GO_WEST
private int id
private State state
private Node parentNode
private int action
private double pathCost
private int depth
Constructor Detail |
---|
public Node(State state, Node parentNode, int action, double pathCost, int depth)
Method Detail |
---|
public int getID()
public State getState()
public Node getParent()
public int getAction()
public double getPathCost()
public int getDepth()
public boolean isTarget()
public double evaluationFunction()
public List<Node> expand()
public int compareTo(Node o)
compareTo
in interface Comparable<Node>
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |