MCMC kernel that always accepts proposals. More...
#include <DummyKernel.h>
MCMC kernel that always accepts proposals.
This kernel simply accepts any proposal. It can be used to turn a MCMC method into a simple Monte Carlo method with the proposal density as its parameter distribution.
Definition at line 17 of file DummyKernel.h.
Public Member Functions | |
DummyKernel (boost::property_tree::ptree const &pt, std::shared_ptr< AbstractSamplingProblem > problem, std::shared_ptr< MCMCProposal > proposal) | |
~DummyKernel () | |
virtual 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. More... | |
virtual void | PrintStatus (std::string prefix) const override |
virtual std::vector< std::shared_ptr< SamplingState > > | Step (unsigned int const t, std::shared_ptr< SamplingState > prevState) override |
Public Member Functions inherited from muq::SamplingAlgorithms::TransitionKernel | |
TransitionKernel (boost::property_tree::ptree const &pt, std::shared_ptr< AbstractSamplingProblem > problem) | |
virtual | ~TransitionKernel ()=default |
virtual void | SetCommunicator (std::shared_ptr< parcer::Communicator > newcomm) |
virtual void | PreStep (unsigned int const t, std::shared_ptr< SamplingState > state) |
Allow the kernel to preprocess the current step. More... | |
virtual void | PrintStatus () const |
virtual void | SetBlockInd (int newBlockInd) |
virtual int | GetBlockInd () const |
virtual std::shared_ptr< AbstractSamplingProblem > const & | Problem () const |
Additional Inherited Members | |
Public Types inherited from muq::SamplingAlgorithms::TransitionKernel | |
typedef boost::function< std::shared_ptr< TransitionKernel >boost::property_tree::ptree, std::shared_ptr< AbstractSamplingProblem >)> | TransitionKernelConstructor |
typedef std::map< std::string, TransitionKernelConstructor > | TransitionKernelMap |
Static Public Member Functions inherited from muq::SamplingAlgorithms::TransitionKernel | |
static std::shared_ptr< TransitionKernel > | Construct (boost::property_tree::ptree const &pt, std::shared_ptr< AbstractSamplingProblem > problem) |
Static constructor for the transition kernel. More... | |
static std::shared_ptr< TransitionKernelMap > | GetTransitionKernelMap () |
DummyKernel::DummyKernel | ( | boost::property_tree::ptree const & | pt, |
std::shared_ptr< AbstractSamplingProblem > | problem, | ||
std::shared_ptr< MCMCProposal > | proposal | ||
) |
Definition at line 13 of file DummyKernel.cpp.
DummyKernel::~DummyKernel | ( | ) |
Definition at line 21 of file DummyKernel.cpp.
|
overridevirtual |
Allow the kernel to adapt given a new state.
By default this function does nothing but children can override it to adapt the kernel
[in] | t | The current step |
[in] | state | The current state |
Reimplemented from muq::SamplingAlgorithms::TransitionKernel.
Definition at line 23 of file DummyKernel.cpp.
References proposal.
|
overridevirtual |
Reimplemented from muq::SamplingAlgorithms::TransitionKernel.
Definition at line 42 of file DummyKernel.cpp.
References numCalls.
|
inlinevirtual |
Definition at line 26 of file DummyKernel.h.
References proposal.
|
overridevirtual |
[in] | t | The current step |
[in] | state | The current state |
Implements muq::SamplingAlgorithms::TransitionKernel.
Definition at line 27 of file DummyKernel.cpp.
References numCalls, muq::SamplingAlgorithms::TransitionKernel::problem, and proposal.
|
protected |
Definition at line 37 of file DummyKernel.h.
Referenced by PrintStatus(), and Step().
|
protected |
Definition at line 35 of file DummyKernel.h.
Referenced by PostStep(), Proposal(), and Step().