All Packages  This Package  Class Hierarchy  Class Search  Index

Class aima.search.SearchNode

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);
}



Fields


state

   protected State state

State at this node


parent

   protected SearchNode parent

Reference back to parent node.


appliedOp

   protected String appliedOp

Operation that was applied to parent


depth

   protected int depth

Depth of this node


pathCost

   protected float pathCost

Cost of getting to this node



Constructors


SearchNode

   protected SearchNode() 

No-argument constructor needed for newInstance()



SearchNode

   public SearchNode(State startState) 

Constructor takes a state and makes it a parentless search node




Methods


getState

   public State getState() 

Returns state of this node.



getParent

   public SearchNode getParent() 

Returns parent of this node.



getAppliedOp

   public String getAppliedOp() 

Returns applied operation for this node.



getDepth

   public int getDepth() 

Returns depth of this node.



getPathCost

   public float getPathCost() 

Returns cost of getting to this node



expand

   public void expand(GeneralQueue expandInto) 

Expands a node into its successors



makeNode

   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  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4