8 namespace pt = boost::property_tree;
13 DummyKernel::DummyKernel(boost::property_tree::ptree
const& pt,
14 std::shared_ptr<AbstractSamplingProblem> problem,
15 std::shared_ptr<MCMCProposal> proposal)
27 std::vector<std::shared_ptr<SamplingState>>
DummyKernel::Step(
unsigned int const t, std::shared_ptr<SamplingState> prevState){
33 std::shared_ptr<SamplingState> prop =
proposal->Sample(prevState);
36 if (
problem->numBlocksQOI > 0) {
37 prop->meta[
"QOI"] =
problem->QOI();
39 return std::vector<std::shared_ptr<SamplingState>>(1, prop);
44 std::stringstream msg;
45 msg << prefix <<
"Dummy kernel was called " <<
numCalls <<
" times";
47 std::cout << msg.str() << std::endl;
std::shared_ptr< MCMCProposal > proposal
virtual void PostStep(unsigned int const t, std::vector< std::shared_ptr< SamplingState >> const &state) override
Allow the kernel to adapt given a new state.
virtual std::vector< std::shared_ptr< SamplingState > > Step(unsigned int const t, std::shared_ptr< SamplingState > prevState) override
Defines the transition kernel used by an MCMC algorithm.
std::shared_ptr< AbstractSamplingProblem > problem
The sampling problem that evaluates/samples the target distribution.
virtual void PrintStatus() const