00001 /* 00002 * Parallel state space search library 00003 * 00004 * Jonathan A. Booth 00005 * Sun Mar 2 22:34:13 CST 2003 00006 */ 00007 00008 #ifndef __UIUC_CHARM_SERIALTREE_H 00009 #define __UIUC_CHARM_SERIALTREE_H 00010 00011 #include <charm++.h> 00012 #include "cklibs/problem.h" 00013 00014 // The serial tree performs a serial, depth-first, depth-bounded search. 00015 // The reason it includes depth-bounded is because it shouldn't ever be 00016 // called in a situation where it isn't depth bounded in this library. 00017 // This could be crappy design, if it wasn't ment exclusivly for use 00018 // with the search lib. 00019 class SerialTree { 00020 public: 00021 problem *Solution; 00022 int SolutionHeight; 00023 CkQ<problem *> Children; 00024 int Expanded; 00025 00026 private: 00027 void ChildSearch(problem *current, int heightLeft); 00028 void Search(problem *current, int heightLeft); 00029 00030 public: 00031 SerialTree(problem *start, int height = 1); 00032 ~SerialTree(); 00033 }; 00034 00035 #endif /* __UIUC_CHARM_SERIALTREE_H */