home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / SourceCode / Crossword / Source / DepthFirstSearch.h < prev    next >
Encoding:
Text File  |  1992-10-11  |  886 b   |  49 lines

  1. /*
  2.  
  3. File DepthFirstSearch.h
  4.  
  5. This search is a standard depth first one.  At each step, the variable with the highest efficiency is selected and filled.  The search backtracks when a variable has no remaining values.
  6.  
  7. It is the responsibility of the variables to implement any special heuristics like backjumping and leapfrogging.
  8.  
  9. */
  10.  
  11. #import <objc/Object.h>
  12.  
  13.  
  14. /* ————————————————————————————————————————————————————————————————————————————  */
  15.  
  16.  
  17. @interface DepthFirstSearch:Object
  18. {
  19.     id        variables;
  20.     id        last;
  21.     BOOL    ok;
  22.     int        next;
  23.     int        count;
  24. }
  25.  
  26. - (BOOL) startSearch: (id) theVariables;
  27. - (BOOL) continue;
  28. - (BOOL) step;
  29. - (BOOL) done;
  30. - (BOOL) fill: (id) variable;
  31. - findBest;
  32.  
  33. @end
  34.  
  35.  
  36. /* ————————————————————————————————————————————————————————————————————————————  */
  37.  
  38.  
  39. @interface Variable:Object
  40. {
  41. }
  42.  
  43. - (float) efficiency;
  44. - (BOOL) fillNext;
  45. - erase;
  46. - hilight;
  47. - unhilight;
  48.  
  49. @end