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

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