BIE |
/home/weinberg/src/BIE/include/PosteriorProb.h00001 // This is really -*- C++ -*- 00002 00003 00004 #ifndef PosteriorProb_h 00005 #define PosteriorProb_h 00006 00007 #include <iostream> 00008 #include <iomanip> 00009 using namespace std; 00010 00011 #include "Serializable.h" 00012 00013 00014 #include <BIEconfig.h> 00015 #include <LikelihoodComputation.h> 00016 #include <Simulation.h> 00017 #include <MixturePrior.h> 00018 00019 namespace BIE { 00020 00021 //+ CLICLASS PosteriorProb SUPER Simulation 00029 class PosteriorProb : public Simulation 00030 { 00031 00032 public: 00033 00035 enum Control { 00036 parallel, 00037 serial 00038 }; 00039 00041 static Control cntrl; 00042 00044 static Converge c; 00045 00046 //+ CLICONSTR int int BaseDataTree* Model* Integration* MixturePrior* LikelihoodComputation* 00048 PosteriorProb(int nmix, int ndim, 00049 BaseDataTree* d, 00050 Model* m, 00051 Integration* i, 00052 MixturePrior* mp, 00053 LikelihoodComputation *l); 00054 00056 ~PosteriorProb(); 00057 00058 //+ CLIMETHOD void Run 00060 void Run(); 00061 00062 //+ CLIMETHOD void Run string 00064 void Run(string); 00065 00066 //+ CLIMETHOD void setLevels int 00068 void setLevels(int Ndecend); 00069 00070 00085 //+ CLIMETHOD void SetControl int 00086 void SetControl(int); 00087 00088 //+ CLIMETHOD void Image string 00103 void Image(string filename); 00104 00105 //+ CLIMETHOD void Image string string 00113 void Image(string filename, string input); 00114 00115 //+ CLIMETHOD void SaveFrontier 00117 void SaveFrontier(); 00118 00119 //+ CLIMETHOD void NullFrontier 00121 void NullFrontier(); 00122 00123 protected: 00124 00126 void MCMethod(); 00127 00129 MixturePrior* _mprior; 00130 00132 void GetUserState(); 00133 00135 void ReadState(string); 00136 00139 00140 vector<double> mix_to_State(vector<double>&, vector<double>*&); 00142 void State_to_mix(vector<double>& s, vector<double>& w, vector<double>*& p); 00144 void ReportState(); 00146 void PrintState(); 00148 00151 bool GetImageDataUser(int &numx, int &numy, 00152 vector<double>& wght0, 00153 vector< vector<double> >& phi0, 00154 vector<char>& bwght, 00155 vector< vector<char> >& bphi, 00156 vector< vector<double> >& range 00157 ); 00158 00159 bool GetImageDataFile(string& input, 00160 int &numx, int &numy, 00161 vector<double>& wght0, 00162 vector< vector<double> >& phi0, 00163 vector<char>& bwght, 00164 vector< vector<char> >& bphi, 00165 vector< vector<double> >& range 00166 ); 00167 00168 00169 void ShareImageData(int &numx, int &numy, 00170 vector<double>& wght0, 00171 vector< vector<double> >& phi0, 00172 vector<char>& bwght, 00173 vector< vector<char> >& bphi, 00174 vector< vector<double> >& range 00175 ); 00177 00178 00179 // AUTO GENERATED BY ../persistence/autopersist.py 00180 protected: 00181 PosteriorProb() {} 00182 private: 00183 friend class boost::serialization::access; 00184 template<class Archive> 00185 void serialize(Archive & ar, const unsigned int version) { 00186 this->pre_serialize(ar, version); 00187 try { 00188 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Simulation); 00189 BIE_CATCH_BOOST_SERIALIZATION_EXCEPTION; 00190 } 00191 try { 00192 ar & BOOST_SERIALIZATION_NVP(cntrl); 00193 BIE_CATCH_BOOST_SERIALIZATION_EXCEPTION; 00194 } 00195 try { 00196 ar & BOOST_SERIALIZATION_NVP(_mprior); 00197 BIE_CATCH_BOOST_SERIALIZATION_EXCEPTION; 00198 } 00199 this->post_serialize(ar, version); 00200 } 00201 00202 }; 00203 00204 } 00205 BIE_CLASS_TYPE_INFO(BIE::PosteriorProb) 00206 BIE_CLASS_EXPORT_KEY(BIE::PosteriorProb) 00207 #endif Send suggestions, questions, and feedback to WEINBERG at ASTRO dot UMASS dot EDU. Documentation generated at Fri Mar 26 00:35:10 2010 by
|