MUQ  0.4.3
MCSampleProposal.h
Go to the documentation of this file.
1 
2 
9 class MCSampleProposal : public MCMCProposal {
10 public:
11  MCSampleProposal(boost::property_tree::ptree const& pt,
12  std::shared_ptr<AbstractSamplingProblem> prob,
13  std::shared_ptr<Distribution> dist
14  )
15  : MCMCProposal(pt, prob),
16  dist(dist)
17  {}
18 
19  std::shared_ptr<SamplingState> Sample(std::shared_ptr<SamplingState> const& currentState) override {
20  return std::make_shared<SamplingState>(dist->Sample());
21  }
22 
23  double LogDensity(std::shared_ptr<SamplingState> const& currState,
24  std::shared_ptr<SamplingState> const& propState) override {
25  return 0.0;
26  }
27 
28 
29 private:
30  std::shared_ptr<Distribution> dist;
31 };
Proposal density intended for Monte Carlo methods.
std::shared_ptr< SamplingState > Sample(std::shared_ptr< SamplingState > const &currentState) override
std::shared_ptr< Distribution > dist
MCSampleProposal(boost::property_tree::ptree const &pt, std::shared_ptr< AbstractSamplingProblem > prob, std::shared_ptr< Distribution > dist)
double LogDensity(std::shared_ptr< SamplingState > const &currState, std::shared_ptr< SamplingState > const &propState) override