queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
QUESO::TransitionKernelFactory Class Referenceabstract

#include <TransitionKernelFactory.h>

Inheritance diagram for QUESO::TransitionKernelFactory:
QUESO::Factory< BaseTKGroup< GslVector, GslMatrix > > QUESO::TKFactoryLogitRandomWalk< DerivedTK > QUESO::TKFactoryMALA< DerivedTK > QUESO::TKFactoryRandomWalk< DerivedTK > QUESO::TKFactoryStochasticNewton< DerivedTK >

Public Member Functions

 TransitionKernelFactory (const std::string &name)
 
virtual ~TransitionKernelFactory ()
 
- Public Member Functions inherited from QUESO::Factory< BaseTKGroup< GslVector, GslMatrix > >
virtual ~Factory ()
 

Static Public Member Functions

static void set_vectorspace (const VectorSpace< GslVector, GslMatrix > &v)
 
static void set_dr_scales (const std::vector< double > &scales)
 
static void set_pdf_synchronizer (const ScalarFunctionSynchronizer< GslVector, GslMatrix > &synchronizer)
 
static void set_initial_cov_matrix (GslMatrix &cov_matrix)
 
static void set_options (const MhOptionsValues &options)
 
static void set_target_pdf (const BaseJointPdf< GslVector, GslMatrix > &target_pdf)
 
- Static Public Member Functions inherited from QUESO::Factory< BaseTKGroup< GslVector, GslMatrix > >
static SharedPtr< BaseTKGroup
< GslVector, GslMatrix >
>::Type 
build (const std::string &name)
 

Protected Member Functions

virtual SharedPtr< BaseTKGroup
< GslVector, GslMatrix >
>::Type 
build_tk ()=0
 
- Protected Member Functions inherited from QUESO::Factory< BaseTKGroup< GslVector, GslMatrix > >
 Factory (const std::string &name)
 

Static Protected Attributes

static const VectorSpace
< GslVector, GslMatrix > * 
m_vectorSpace = NULL
 
static const std::vector
< double > * 
m_dr_scales = NULL
 
static const
ScalarFunctionSynchronizer
< GslVector, GslMatrix > * 
m_pdf_synchronizer = NULL
 
static GslMatrixm_initial_cov_matrix = NULL
 
static const MhOptionsValuesm_options = NULL
 
static const BaseJointPdf
< GslVector, GslMatrix > * 
m_target_pdf = NULL
 

Private Member Functions

virtual SharedPtr< BaseTKGroup
< GslVector, GslMatrix >
>::Type 
create ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from QUESO::Factory< BaseTKGroup< GslVector, GslMatrix > >
static std::map< std::string,
Factory< BaseTKGroup
< GslVector, GslMatrix > > * > & 
factory_map ()
 

Detailed Description

TransitionKernelFactory class defintion.

Definition at line 41 of file TransitionKernelFactory.h.

Constructor & Destructor Documentation

QUESO::TransitionKernelFactory::TransitionKernelFactory ( const std::string &  name)
inline

Constructor. Takes the name to be mapped.

Definition at line 47 of file TransitionKernelFactory.h.

48  : Factory<BaseTKGroup<GslVector, GslMatrix> >(name)
49  {}
virtual QUESO::TransitionKernelFactory::~TransitionKernelFactory ( )
inlinevirtual

Destructor. (Empty.)

Definition at line 54 of file TransitionKernelFactory.h.

54 {}

Member Function Documentation

SharedPtr< BaseTKGroup< GslVector, GslMatrix > >::Type QUESO::TransitionKernelFactory::create ( )
inlineprivatevirtual

Create a Base class. Force this to be implemented later.

Implements QUESO::Factory< BaseTKGroup< GslVector, GslMatrix > >.

Definition at line 125 of file TransitionKernelFactory.h.

References build_tk(), m_dr_scales, m_initial_cov_matrix, m_options, m_pdf_synchronizer, m_target_pdf, and m_vectorSpace.

126 {
127  queso_require_msg(m_vectorSpace, "ERROR: must call set_vectorspace() before building tk!");
128  queso_require_msg(m_dr_scales, "ERROR: must call set_dr_scales() before building tk!");
129  queso_require_msg(m_pdf_synchronizer, "ERROR: must call set_pdf_synchronizer() before building tk!");
130  queso_require_msg(m_initial_cov_matrix, "ERROR: must call set_initial_cov_matrix() before building tk!");
131  queso_require_msg(m_options, "ERROR: must call set_options() before building tk!");
132  queso_require_msg(m_target_pdf, "ERROR: must call set_target_pdf() before building tk!");
133 
134  SharedPtr<BaseTKGroup<GslVector, GslMatrix> >::Type new_tk = this->build_tk();
135 
136  queso_assert(new_tk);
137 
138  return new_tk;
139 }
virtual SharedPtr< BaseTKGroup< GslVector, GslMatrix > >::Type build_tk()=0
static const BaseJointPdf< GslVector, GslMatrix > * m_target_pdf
static const MhOptionsValues * m_options
Definition of a shared pointer.
static const ScalarFunctionSynchronizer< GslVector, GslMatrix > * m_pdf_synchronizer
static const VectorSpace< GslVector, GslMatrix > * m_vectorSpace
static const std::vector< double > * m_dr_scales
static void QUESO::TransitionKernelFactory::set_dr_scales ( const std::vector< double > &  scales)
inlinestatic

Static method to set the vector of scale factor to scale a proposal covariance matrix by for the purpose of delayed rejection

Definition at line 68 of file TransitionKernelFactory.h.

References m_dr_scales.

Referenced by QUESO::MetropolisHastingsSG< P_V, P_M >::commonConstructor().

69  {
70  m_dr_scales = &scales;
71  }
static const std::vector< double > * m_dr_scales
static void QUESO::TransitionKernelFactory::set_initial_cov_matrix ( GslMatrix cov_matrix)
inlinestatic

Static method to set the initial proposal covariance matrix

Definition at line 84 of file TransitionKernelFactory.h.

References m_initial_cov_matrix.

Referenced by QUESO::MetropolisHastingsSG< P_V, P_M >::commonConstructor().

85  {
86  m_initial_cov_matrix = &cov_matrix;
87  }
static void QUESO::TransitionKernelFactory::set_options ( const MhOptionsValues options)
inlinestatic

Static method to set the options object. Useful for passing input file options to transition kernels.

Definition at line 93 of file TransitionKernelFactory.h.

References m_options.

Referenced by QUESO::MetropolisHastingsSG< P_V, P_M >::commonConstructor().

94  {
95  m_options = &options;
96  }
static const MhOptionsValues * m_options
static void QUESO::TransitionKernelFactory::set_pdf_synchronizer ( const ScalarFunctionSynchronizer< GslVector, GslMatrix > &  synchronizer)
inlinestatic

Static method to set the pdf synchronizer. Used by Stochastic Newton?

Definition at line 76 of file TransitionKernelFactory.h.

References m_pdf_synchronizer.

Referenced by QUESO::MetropolisHastingsSG< P_V, P_M >::commonConstructor().

77  {
78  m_pdf_synchronizer = &synchronizer;
79  }
static const ScalarFunctionSynchronizer< GslVector, GslMatrix > * m_pdf_synchronizer
static void QUESO::TransitionKernelFactory::set_target_pdf ( const BaseJointPdf< GslVector, GslMatrix > &  target_pdf)
inlinestatic

Static method to set the pdf we wish to draw samples from

Definition at line 101 of file TransitionKernelFactory.h.

References m_target_pdf.

Referenced by QUESO::MetropolisHastingsSG< P_V, P_M >::commonConstructor().

102  {
103  m_target_pdf = &target_pdf;
104  }
static const BaseJointPdf< GslVector, GslMatrix > * m_target_pdf
static void QUESO::TransitionKernelFactory::set_vectorspace ( const VectorSpace< GslVector, GslMatrix > &  v)
inlinestatic

Static method to set the vector space the transition kernel is defined on

Definition at line 59 of file TransitionKernelFactory.h.

References m_vectorSpace.

Referenced by QUESO::MetropolisHastingsSG< P_V, P_M >::commonConstructor().

60  {
61  m_vectorSpace = &v;
62  }
static const VectorSpace< GslVector, GslMatrix > * m_vectorSpace

Member Data Documentation

const ScalarFunctionSynchronizer< GslVector, GslMatrix > * QUESO::TransitionKernelFactory::m_pdf_synchronizer = NULL
staticprotected
const BaseJointPdf< GslVector, GslMatrix > * QUESO::TransitionKernelFactory::m_target_pdf = NULL
staticprotected
const VectorSpace< GslVector, GslMatrix > * QUESO::TransitionKernelFactory::m_vectorSpace = NULL
staticprotected

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

Generated on Tue Jun 5 2018 19:49:14 for queso-0.57.1 by  doxygen 1.8.5