MUQ  0.4.3
muq::SamplingAlgorithms::MIDummyKernel Class Reference

Dummy kernel for Multiindex MC methods. More...

#include <MIDummyKernel.h>

Inheritance diagram for muq::SamplingAlgorithms::MIDummyKernel:

Detailed Description

Dummy kernel for Multiindex MC methods.

This kernel simply accepts any proposal. It can be used to turn a MLMCMC/MIMCMC method into a Multilevel/Multiindex Monte Carlo method with the proposal density as its parameter distribution.

Definition at line 16 of file MIDummyKernel.h.

Public Member Functions

 MIDummyKernel (boost::property_tree::ptree const &pt, std::shared_ptr< AbstractSamplingProblem > problem, std::shared_ptr< MCMCProposal > proposal, std::shared_ptr< MCMCProposal > coarse_proposal, std::shared_ptr< MIInterpolation > proposalInterpolation, std::shared_ptr< SingleChainMCMC > coarse_chain)
 
 ~MIDummyKernel ()
 
virtual std::shared_ptr< MCMCProposalProposal ()
 
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, TransitionKernelConstructorTransitionKernelMap
 
- Static Public Member Functions inherited from muq::SamplingAlgorithms::TransitionKernel
static std::shared_ptr< TransitionKernelConstruct (boost::property_tree::ptree const &pt, std::shared_ptr< AbstractSamplingProblem > problem)
 Static constructor for the transition kernel. More...
 
static std::shared_ptr< TransitionKernelMapGetTransitionKernelMap ()
 

Constructor & Destructor Documentation

◆ MIDummyKernel()

MIDummyKernel::MIDummyKernel ( boost::property_tree::ptree const &  pt,
std::shared_ptr< AbstractSamplingProblem problem,
std::shared_ptr< MCMCProposal proposal,
std::shared_ptr< MCMCProposal coarse_proposal,
std::shared_ptr< MIInterpolation proposalInterpolation,
std::shared_ptr< SingleChainMCMC coarse_chain 
)

Definition at line 13 of file MIDummyKernel.cpp.

◆ ~MIDummyKernel()

MIDummyKernel::~MIDummyKernel ( )

Definition at line 27 of file MIDummyKernel.cpp.

Member Function Documentation

◆ PostStep()

void MIDummyKernel::PostStep ( unsigned int const  t,
std::vector< std::shared_ptr< SamplingState >> const &  state 
)
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

Parameters
[in]tThe current step
[in]stateThe current state

Reimplemented from muq::SamplingAlgorithms::TransitionKernel.

Definition at line 29 of file MIDummyKernel.cpp.

References proposal.

◆ PrintStatus()

void MIDummyKernel::PrintStatus ( std::string  prefix) const
overridevirtual

Reimplemented from muq::SamplingAlgorithms::TransitionKernel.

Definition at line 60 of file MIDummyKernel.cpp.

References numCalls.

◆ Proposal()

virtual std::shared_ptr<MCMCProposal> muq::SamplingAlgorithms::MIDummyKernel::Proposal ( )
inlinevirtual

Definition at line 28 of file MIDummyKernel.h.

References proposal.

◆ Step()

std::vector< std::shared_ptr< SamplingState > > MIDummyKernel::Step ( unsigned int const  t,
std::shared_ptr< SamplingState prevState 
)
overridevirtual
Parameters
[in]tThe current step
[in]stateThe current state

Implements muq::SamplingAlgorithms::TransitionKernel.

Definition at line 33 of file MIDummyKernel.cpp.

References coarse_chain, coarse_proposal, numCalls, muq::SamplingAlgorithms::TransitionKernel::problem, proposal, and proposalInterpolation.

Member Data Documentation

◆ coarse_chain

std::shared_ptr<SingleChainMCMC> muq::SamplingAlgorithms::MIDummyKernel::coarse_chain
protected

Definition at line 40 of file MIDummyKernel.h.

Referenced by Step().

◆ coarse_proposal

std::shared_ptr<MCMCProposal> muq::SamplingAlgorithms::MIDummyKernel::coarse_proposal
protected

Definition at line 38 of file MIDummyKernel.h.

Referenced by Step().

◆ numCalls

unsigned int muq::SamplingAlgorithms::MIDummyKernel::numCalls = 0
protected

Definition at line 42 of file MIDummyKernel.h.

Referenced by PrintStatus(), and Step().

◆ proposal

std::shared_ptr<MCMCProposal> muq::SamplingAlgorithms::MIDummyKernel::proposal
protected

Definition at line 37 of file MIDummyKernel.h.

Referenced by PostStep(), Proposal(), and Step().

◆ proposalInterpolation

std::shared_ptr<MIInterpolation> muq::SamplingAlgorithms::MIDummyKernel::proposalInterpolation
protected

Definition at line 39 of file MIDummyKernel.h.

Referenced by Step().


The documentation for this class was generated from the following files: