00001 #ifndef BeliefForest_H 00002 #define BeliefForest_H 00003 00004 #include "MObjectUser.h" 00005 #include "Belief.h" 00006 #include "MathLib.h" 00007 #include <vector> 00008 00009 using namespace std; 00010 using namespace momdp; 00011 00012 namespace momdp 00013 { 00014 class MObject; 00015 class BeliefTreeNode; 00016 class PointBasedAlgorithm; 00017 class MOMDP; 00018 class Sample; 00019 class BeliefCache; 00020 00021 00022 struct SampleRootEdge 00023 { 00024 double sampleRootProb; 00025 BeliefTreeNode* sampleRoot; 00026 }; 00027 00028 class BeliefForest 00029 { 00030 private: 00031 vector <BeliefCache *> *beliefCacheSet; 00032 Sample* sampleEngine; 00033 SharedPointer<MOMDP> problem; 00034 00035 public: 00036 00037 BeliefForest(); 00038 virtual ~BeliefForest(void); 00039 00040 virtual void forcedDelete(SharedPointer<Belief> pointer); 00041 00042 void setup(SharedPointer<MOMDP> problem, Sample* _sampleEngine, vector <BeliefCache *> *_beliefCacheSet); 00043 00044 00045 belief_vector obsVar_bvec; // starting belief for observed variable 00046 /* belief_vector unobsVar_bvec; // starting belief for unobserved variable */ 00047 void print(); 00048 00049 vector<SampleRootEdge*> sampleRootEdges; // actual root nodes used in sampling 00050 double lbVal, ubVal; // bounds at this dummy root node 00051 00052 bool isExpanded(void) const { return !( sampleRootEdges.empty() ); } 00053 unsigned int getGlobalRootNumSampleroots(void) const { return sampleRootEdges.size(); } 00054 void globalRootPrepare(); 00055 00056 }; 00057 00058 } 00059 00060 00061 #endif 00062