Class Search_Node

java.lang.Object
  |
  +--Search_Node

public class Search_Node
extends java.lang.Object


Constructor Summary
Search_Node(Search_State s, int lc)
          constructor
 
Method Summary
 Search_Node get_Parent()
          accessor for parent
 Search_State get_State()
          accessor for state
 java.util.ArrayList get_Successors(Search searcher)
          get_Successors for this node
 int getglobalCost()
          acccessor for globalcost
 int getlocalCost()
          mutator for localcost
 boolean goalP(Search searcher)
          goalP takes a Search_Node & returns true if it's a goal
 boolean same_State(Search_Node n2)
          same_State - does another node have same state as this one?
 void set_Parent(Search_Node n)
          mutator for parent
 void setglobalCost(int lc)
          mutator for localcost
 void setlocalCost(int lc)
          mutator for localcost
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Search_Node

public Search_Node(Search_State s,
                   int lc)
constructor
Parameters:
s - a Search_State
lc - local cost of getting to this node from its predecessor
Method Detail

get_State

public Search_State get_State()
accessor for state

get_Parent

public Search_Node get_Parent()
accessor for parent

set_Parent

public void set_Parent(Search_Node n)
mutator for parent

setlocalCost

public void setlocalCost(int lc)
mutator for localcost

getlocalCost

public int getlocalCost()
mutator for localcost

setglobalCost

public void setglobalCost(int lc)
mutator for localcost

getglobalCost

public int getglobalCost()
acccessor for globalcost

goalP

public boolean goalP(Search searcher)
goalP takes a Search_Node & returns true if it's a goal
Parameters:
searcher - the current search

get_Successors

public java.util.ArrayList get_Successors(Search searcher)
get_Successors for this node
Parameters:
searcher - the current search
Returns:
ArrayList of successor nodes

same_State

public boolean same_State(Search_Node n2)
same_State - does another node have same state as this one?
Parameters:
n2 - the other node

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object