queso-0.56.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Attributes | Private Member Functions | List of all members
QUESO::TransitionKernelFactory Class Referenceabstract

#include <TransitionKernelFactory.h>

Inheritance diagram for QUESO::TransitionKernelFactory:
Inheritance graph
[legend]
Collaboration diagram for QUESO::TransitionKernelFactory:
Collaboration graph
[legend]

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

virtual SharedPtr<BaseTKGroup<GslVector, GslMatrix> >::Type QUESO::TransitionKernelFactory::build_tk ( )
protectedpure virtual
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, m_vectorSpace, queso_assert, and queso_require_msg.

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 }
static const ScalarFunctionSynchronizer< GslVector, GslMatrix > * m_pdf_synchronizer
static const MhOptionsValues * m_options
static const BaseJointPdf< GslVector, GslMatrix > * m_target_pdf
#define queso_assert(asserted)
Definition: asserts.h:132
virtual SharedPtr< BaseTKGroup< GslVector, GslMatrix > >::Type build_tk()=0
#define queso_require_msg(asserted, msg)
Definition: asserts.h:69
static const std::vector< double > * m_dr_scales
static const VectorSpace< GslVector, GslMatrix > * m_vectorSpace
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 std::vector< double > * QUESO::TransitionKernelFactory::m_dr_scales = NULL
staticprotected

Definition at line 110 of file TransitionKernelFactory.h.

Referenced by create(), and set_dr_scales().

GslMatrix * QUESO::TransitionKernelFactory::m_initial_cov_matrix = NULL
staticprotected

Definition at line 112 of file TransitionKernelFactory.h.

Referenced by create(), and set_initial_cov_matrix().

const MhOptionsValues * QUESO::TransitionKernelFactory::m_options = NULL
staticprotected

Definition at line 113 of file TransitionKernelFactory.h.

Referenced by create(), and set_options().

const ScalarFunctionSynchronizer< GslVector, GslMatrix > * QUESO::TransitionKernelFactory::m_pdf_synchronizer = NULL
staticprotected

Definition at line 111 of file TransitionKernelFactory.h.

Referenced by create(), and set_pdf_synchronizer().

const BaseJointPdf< GslVector, GslMatrix > * QUESO::TransitionKernelFactory::m_target_pdf = NULL
staticprotected

Definition at line 114 of file TransitionKernelFactory.h.

Referenced by create(), and set_target_pdf().

const VectorSpace< GslVector, GslMatrix > * QUESO::TransitionKernelFactory::m_vectorSpace = NULL
staticprotected

Definition at line 109 of file TransitionKernelFactory.h.

Referenced by create(), and set_vectorspace().


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

Generated on Tue Nov 29 2016 10:53:14 for queso-0.56.0 by  doxygen 1.8.5