KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Attributes | List of all members
Basic_gibbs_step< Model > Class Template Reference

#include <sample_step.h>

Inheritance diagram for Basic_gibbs_step< Model >:
Abstract_gibbs_step< Model >

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_distributionget_log_target () const
 Copy-constructor. More...
 
virtual const Proposerget_proposer () const
 Returns a reference to the proposal mechanism. Returned object must comply with the GibbsModelProposer concept. More...
 
virtual const Get_dimensionget_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
 

Detailed Description

template<typename Model>
class Basic_gibbs_step< Model >

Template Parameters
ModelThe 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.

Member Typedef Documentation

template<typename Model >
typedef Parent::Get_dimension Basic_gibbs_step< Model >::Get_dimension
template<typename Model >
typedef Abstract_gibbs_step<Model> Basic_gibbs_step< Model >::Parent
template<typename Model >
typedef Parent::Proposer Basic_gibbs_step< Model >::Proposer
template<typename Model >
typedef Parent::Target_distribution Basic_gibbs_step< Model >::Target_distribution

Constructor & Destructor Documentation

template<typename Model >
Basic_gibbs_step< Model >::Basic_gibbs_step ( const Target_distribution log_target,
const Proposer proposer,
const Get_dimension get_dimension 
)
inline

Initializes target and proposer functors (or functions) to the given arguments.

Parameters
log_targetTarget_distribution object used to initialize internal target distribution used in operator().
proposerProposer object used to initialize internal proposer used in operator().
template<typename Model >
virtual Basic_gibbs_step< Model >::~Basic_gibbs_step ( )
inlinevirtual

Member Function Documentation

template<typename Model >
virtual const Get_dimension& Basic_gibbs_step< Model >::get_dimension_function ( ) const
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 >.

template<typename Model >
virtual const Target_distribution& Basic_gibbs_step< Model >::get_log_target ( ) const
inlinevirtual

Copy-constructor.

Assignment

Implements Abstract_gibbs_step< Model >.

template<typename Model >
virtual const Proposer& Basic_gibbs_step< Model >::get_proposer ( ) const
inlinevirtual

Returns a reference to the proposal mechanism. Returned object must comply with the GibbsModelProposer concept.

Implements Abstract_gibbs_step< Model >.

Member Data Documentation

template<typename Model >
Get_dimension Basic_gibbs_step< Model >::m_get_dimension
protected
template<typename Model >
Target_distribution Basic_gibbs_step< Model >::m_log_target
protected
template<typename Model >
Proposer Basic_gibbs_step< Model >::m_proposer
protected

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