All Packages This Package Class Hierarchy Class Search Index
java.lang.Object | +----aima.search.SearchNode
Search node represents a node in a search tree and supplies utility functions needed for implementing a search.
public class SearchNode extends java.lang.Object { // Fields 5 protected String appliedOp; protected int depth; protected SearchNode parent; protected float pathCost; protected State state; // Constructors 2 protected SearchNode(); public SearchNode(State); // Methods 7 public void expand(GeneralQueue); public String getAppliedOp(); public int getDepth(); public SearchNode getParent(); public float getPathCost(); public State getState(); public SearchNode makeNode(Successor); }
protected State state
State at this node
protected SearchNode parent
Reference back to parent node.
protected String appliedOp
Operation that was applied to parent
protected int depth
Depth of this node
protected float pathCost
Cost of getting to this node
protected SearchNode()
No-argument constructor needed for newInstance()
public SearchNode(State startState)
Constructor takes a state and makes it a parentless search node
public State getState()
Returns state of this node.
public SearchNode getParent()
Returns parent of this node.
public String getAppliedOp()
Returns applied operation for this node.
public int getDepth()
Returns depth of this node.
public float getPathCost()
Returns cost of getting to this node
public void expand(GeneralQueue expandInto)
Expands a node into its successors
public SearchNode makeNode(Successor successor)
Makes a new node of the same type as this one, using a successor returned by an object of type State
All Packages This Package Class Hierarchy Class Search IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4