00001 // This is really -*- C++ -*- 00002 00003 #ifndef MetropolisHastings_h 00004 #define MetropolisHastings_h 00005 00006 #include <iostream> 00007 #include <iomanip> 00008 00009 using namespace std; 00010 00011 #include "Simulation.h" 00012 #include "LikelihoodComputation.h" 00013 #include "MCAlgorithm.h" 00014 00015 #include "Serializable.h" 00016 00017 00018 namespace BIE { 00019 00020 class MixturePrior; 00021 00022 //+ CLICLASS MetropolisHastings SUPER MCAlgorithm 00026 class MetropolisHastings : public MCAlgorithm 00027 { 00028 00029 public: 00030 00031 //+ CLICONSTR 00033 MetropolisHastings() : MCAlgorithm() {} 00034 00036 virtual void GetNewState(Simulation* sim, Chain* ch); 00037 00039 virtual void ComputeNewState(Simulation* sim, Chain* ch); 00040 00042 virtual double ComputeCurrentState(Simulation* sim, Chain *ch); 00043 00045 virtual double ComputeState(Simulation* sim, Chain *ch); 00046 00048 virtual bool Sweep(Simulation* sim, Chain *ch); 00049 00050 // AUTO GENERATED BY ../persistence/autopersist.py 00051 private: 00052 friend class boost::serialization::access; 00053 template<class Archive> 00054 void serialize(Archive & ar, const unsigned int version) { 00055 this->pre_serialize(ar, version); 00056 try { 00057 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(MCAlgorithm); 00058 BIE_CATCH_BOOST_SERIALIZATION_EXCEPTION; 00059 } 00060 this->post_serialize(ar, version); 00061 } 00062 00063 }; 00064 } // namespace BIE 00065 BIE_CLASS_TYPE_INFO(BIE::MetropolisHastings) 00066 BIE_CLASS_EXPORT_KEY(BIE::MetropolisHastings) 00067 #endif