MUQ  0.4.3
muq::SamplingAlgorithms::MCMCProposal Class Referenceabstract

#include <MCMCProposal.h>

Inheritance diagram for muq::SamplingAlgorithms::MCMCProposal:

Detailed Description

Definition at line 36 of file MCMCProposal.h.

Public Types

typedef std::function< std::shared_ptr< MCMCProposal >boost::property_tree::ptree, std::shared_ptr< AbstractSamplingProblem >)> MCMCProposalConstructor
 
typedef std::map< std::string, MCMCProposalConstructorMCMCProposalMap
 

Public Member Functions

 MCMCProposal (boost::property_tree::ptree const &pt, std::shared_ptr< AbstractSamplingProblem > const &probIn)
 
virtual ~MCMCProposal ()=default
 
virtual void Adapt (unsigned int const t, std::vector< std::shared_ptr< SamplingState >> const &state)
 Adapt the proposal after each step. More...
 
virtual std::shared_ptr< SamplingStateSample (std::shared_ptr< SamplingState > const &currentState)=0
 
virtual double LogDensity (std::shared_ptr< SamplingState > const &currState, std::shared_ptr< SamplingState > const &propState)=0
 
void SetCommunicator (std::shared_ptr< parcer::Communicator > newcomm)
 
virtual void SetBlockInd (int newBlockInd)
 
virtual int GetBlockInd () const
 

Static Public Member Functions

static std::shared_ptr< MCMCProposalConstruct (boost::property_tree::ptree const &pt, std::shared_ptr< AbstractSamplingProblem > const &probIn)
 Static constructor for the transition kernel. More...
 
static std::shared_ptr< MCMCProposalMapGetMCMCProposalMap ()
 

Member Typedef Documentation

◆ MCMCProposalConstructor

typedef std::function<std::shared_ptr<MCMCProposal>boost::property_tree::ptree,std::shared_ptr<AbstractSamplingProblem>)> muq::SamplingAlgorithms::MCMCProposal::MCMCProposalConstructor

Definition at line 53 of file MCMCProposal.h.

◆ MCMCProposalMap

Definition at line 54 of file MCMCProposal.h.

Constructor & Destructor Documentation

◆ MCMCProposal()

MCMCProposal::MCMCProposal ( boost::property_tree::ptree const &  pt,
std::shared_ptr< AbstractSamplingProblem > const &  probIn 
)

Definition at line 7 of file MCMCProposal.cpp.

◆ ~MCMCProposal()

virtual muq::SamplingAlgorithms::MCMCProposal::~MCMCProposal ( )
virtualdefault

Member Function Documentation

◆ Adapt()

virtual void muq::SamplingAlgorithms::MCMCProposal::Adapt ( unsigned int const  t,
std::vector< std::shared_ptr< SamplingState >> const &  state 
)
inlinevirtual

Adapt the proposal after each step.

By default this function does nothing but children can override it to adapt the proposal

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

Reimplemented in muq::SamplingAlgorithms::ParallelAMProposal, and muq::SamplingAlgorithms::AMProposal.

Definition at line 63 of file MCMCProposal.h.

◆ Construct()

std::shared_ptr< MCMCProposal > MCMCProposal::Construct ( boost::property_tree::ptree const &  pt,
std::shared_ptr< AbstractSamplingProblem > const &  probIn 
)
static

Static constructor for the transition kernel.

Parameters
[in]ptThe options for the MCMC kernel
Returns
The MCMC proposal

Definition at line 12 of file MCMCProposal.cpp.

References GetMCMCProposalMap(), and prob.

Referenced by muq::SamplingAlgorithms::DRKernel::CreateProposals(), muq::SamplingAlgorithms::MixtureProposal::GetProposals(), and muq::SamplingAlgorithms::DefaultComponentFactory::Proposal().

◆ GetBlockInd()

virtual int muq::SamplingAlgorithms::MCMCProposal::GetBlockInd ( ) const
inlinevirtual

Definition at line 76 of file MCMCProposal.h.

References blockInd.

◆ GetMCMCProposalMap()

std::shared_ptr< MCMCProposal::MCMCProposalMap > MCMCProposal::GetMCMCProposalMap ( )
static

Definition at line 34 of file MCMCProposal.cpp.

Referenced by Construct().

◆ LogDensity()

◆ Sample()

◆ SetBlockInd()

virtual void muq::SamplingAlgorithms::MCMCProposal::SetBlockInd ( int  newBlockInd)
inlinevirtual

Definition at line 75 of file MCMCProposal.h.

References blockInd.

◆ SetCommunicator()

void MCMCProposal::SetCommunicator ( std::shared_ptr< parcer::Communicator >  newcomm)

Definition at line 47 of file MCMCProposal.cpp.

References comm.

Member Data Documentation

◆ blockInd

◆ comm

std::shared_ptr<parcer::Communicator> muq::SamplingAlgorithms::MCMCProposal::comm
protected

◆ prob


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