All Packages  This Package  Class Hierarchy  Class Search  Index

Class aima.search.HeuristicSearchNode

java.lang.Object
   |
   +----aima.search.SearchNode
           |
           +----aima.search.HeuristicSearchNode

This class extends SearchNode to include initial computation, storage, and retrieval of heuristic information.


public class  HeuristicSearchNode
     extends aima.search.SearchNode
{
          // Fields 1
     protected float h;

          // Constructors 2
     public HeuristicSearchNode();
     public HeuristicSearchNode(State);

          // Methods 4
     protected void computeH();
     public float getF();
     public float getH();
     public SearchNode makeNode(Successor);
}



Fields


h

   protected float h

Value of heuristic for search node;



Constructors


HeuristicSearchNode

   public HeuristicSearchNode() 

No-argument constructor needed for Class.newInstance();



HeuristicSearchNode

   public HeuristicSearchNode(State startState) 

Constructor makes search node for startState and computes and stores heuristic.




Methods


computeH

   protected void computeH() 

Computes and stores heuristic function for state.



getH

   public float getH() 

Returns value of heuristic function.



getF

   public float getF() 

Returns f(node), defined as heuristic + cost to node.



makeNode

   public SearchNode makeNode(Successor successor) 

Returns a new node based on a successor of this node.

Overrides:
makeNode in class SearchNode


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4