MUQ  0.4.3
MHProposal.h
Go to the documentation of this file.
1 #ifndef MHPROPOSAL_H_
2 #define MHPROPOSAL_H_
3 
5 
7 
8 namespace muq {
9  namespace SamplingAlgorithms {
10 
20  class MHProposal : public MCMCProposal {
21  public:
22 
23  MHProposal(boost::property_tree::ptree const& pt,
24  std::shared_ptr<AbstractSamplingProblem> prob);
25 
26  MHProposal(boost::property_tree::ptree const& pt,
27  std::shared_ptr<AbstractSamplingProblem> prob,
28  std::shared_ptr<muq::Modeling::GaussianBase> proposalIn);
29 
30  virtual ~MHProposal() = default;
31 
32  protected:
33 
35  std::shared_ptr<muq::Modeling::GaussianBase> proposal;
36 
37  virtual std::shared_ptr<SamplingState> Sample(std::shared_ptr<SamplingState> const& currentState) override;
38 
39  virtual double LogDensity(std::shared_ptr<SamplingState> const& currState,
40  std::shared_ptr<SamplingState> const& propState) override;
41 
42 
43  };
44 
45  } // namespace SamplingAlgoirthms
46 } // namespace muq
47 
48 #endif
std::shared_ptr< AbstractSamplingProblem > prob
Definition: MCMCProposal.h:81
Implementation of the classic Random Walk Metropolis proposal.
Definition: MHProposal.h:20
virtual double LogDensity(std::shared_ptr< SamplingState > const &currState, std::shared_ptr< SamplingState > const &propState) override
Definition: MHProposal.cpp:48
MHProposal(boost::property_tree::ptree const &pt, std::shared_ptr< AbstractSamplingProblem > prob, std::shared_ptr< muq::Modeling::GaussianBase > proposalIn)
virtual std::shared_ptr< SamplingState > Sample(std::shared_ptr< SamplingState > const &currentState) override
Definition: MHProposal.cpp:33
std::shared_ptr< muq::Modeling::GaussianBase > proposal
The proposal distribution.
Definition: MHProposal.h:35
MHProposal(boost::property_tree::ptree const &pt, std::shared_ptr< AbstractSamplingProblem > prob)