home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 27 / IOPROG_27.ISO / SOFT / GRAPH.ZIP / AI / SRC / UNISEAR / TDEPTH.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-12  |  485 b   |  29 lines

  1. #include "tree.h"
  2.  
  3. /*                      DEPTH_TREE_
  4.  
  5.     The constructor passes the start node, goal node and the number of
  6.     operators to SEARCH_.
  7.  
  8. */
  9.  
  10. DEPTH_TREE_::DEPTH_TREE_(NODE_ *start, NODE_ *goal, int op)
  11.     :SEARCH_(start, goal, op)
  12. {
  13. }
  14.  
  15.  
  16.  
  17. /*                      ADD
  18.  
  19.     Adds a node to the search graph, without checking if it's already
  20.     in the graph.
  21.  
  22. */
  23.  
  24. int DEPTH_TREE_::add(NODE_ *succ)
  25. {
  26.     open.addtohead(*succ);
  27.     return(1);
  28. }
  29.