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, int erc)
          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 A* - adds estremcost to node
 int getestRemCost()
          accessor for estremcost for A*
 int getestTotalCost()
          accessor for esttotalcost for A*
 int getglobalCost()
          acccessor for globalcost
 int getlocalCost()
          accessor 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 setestRemCost(int erc)
          mutator for estremcost for A*
 void setestTotalCost(int erc)
          mutator for esttotalcost for A*
 void setglobalCost(int lc)
          mutator for globalcost
 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,
                   int erc)
constructor
Parameters:
s - a Search_State
lc - local cost of getting to this node from its predecessor
erc - estimated remaining cost
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()
accessor for localcost

setglobalCost

public void setglobalCost(int lc)
mutator for globalcost

getglobalCost

public int getglobalCost()
acccessor for globalcost

setestRemCost

public void setestRemCost(int erc)
mutator for estremcost for A*

getestRemCost

public int getestRemCost()
accessor for estremcost for A*

setestTotalCost

public void setestTotalCost(int erc)
mutator for esttotalcost for A*

getestTotalCost

public int getestTotalCost()
accessor for esttotalcost for A*

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 A* - adds estremcost to 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