KJB
|
#include <sample_step.h>
Public Types | |
typedef Abstract_gibbs_step < Model > | Parent |
typedef Parent::Target_distribution | Target_distribution |
typedef Parent::Proposer | Proposer |
typedef Parent::Get_dimension | Get_dimension |
Public Types inherited from Abstract_gibbs_step< Model > | |
typedef Model_evaluator< Model > ::Type | Target_distribution |
typedef Gibbs_model_proposer < Model >::Type | Proposer |
typedef Model_dimension< Model > ::Type | Get_dimension |
Public Member Functions | |
Basic_gibbs_step (const Target_distribution &log_target, const Proposer &proposer, const Get_dimension &get_dimension) | |
Initializes target and proposer functors (or functions) to the given arguments. More... | |
virtual const Target_distribution & | get_log_target () const |
Copy-constructor. More... | |
virtual const Proposer & | get_proposer () const |
Returns a reference to the proposal mechanism. Returned object must comply with the GibbsModelProposer concept. More... | |
virtual const Get_dimension & | get_dimension_function () const |
Returns a reference to a function that is used to obtain the dimension of the model. See Model_dimension for more info. More... | |
virtual | ~Basic_gibbs_step () |
Public Member Functions inherited from Abstract_gibbs_step< Model > | |
BOOST_CONCEPT_ASSERT ((BaseModel< Model >)) | |
virtual Step_log< Model > | operator() (Model &m, double lt_m) const |
Runs a step of Gibbs on a model m. More... | |
virtual | ~Abstract_gibbs_step () |
Protected Attributes | |
Target_distribution | m_log_target |
Proposer | m_proposer |
Get_dimension | m_get_dimension |
Model | The model type. Must comply with BaseModel concept. |
Basic_gibbs_step is a functor that runs a single step of metropolis hastings on a model.
This class is a subclass of the abstract class Abstract_gibbs_step. It implements the get_log_target and get_proposer member functions in the obvious way: it returns references to private members of the correct types. These members are initialized from references received in the constructor.
typedef Parent::Get_dimension Basic_gibbs_step< Model >::Get_dimension |
typedef Abstract_gibbs_step<Model> Basic_gibbs_step< Model >::Parent |
typedef Parent::Proposer Basic_gibbs_step< Model >::Proposer |
typedef Parent::Target_distribution Basic_gibbs_step< Model >::Target_distribution |
|
inline |
Initializes target and proposer functors (or functions) to the given arguments.
log_target | Target_distribution object used to initialize internal target distribution used in operator(). |
proposer | Proposer object used to initialize internal proposer used in operator(). |
|
inlinevirtual |
|
inlinevirtual |
Returns a reference to a function that is used to obtain the dimension of the model. See Model_dimension for more info.
Implements Abstract_gibbs_step< Model >.
|
inlinevirtual |
|
inlinevirtual |
Returns a reference to the proposal mechanism. Returned object must comply with the GibbsModelProposer concept.
Implements Abstract_gibbs_step< Model >.
|
protected |
|
protected |
|
protected |