queso-0.57.1
|
This base class allows the representation of a transition kernel. More...
#include <Algorithm.h>
Public Member Functions | |
Constructor/Destructor methods | |
BaseTKGroup () | |
Default constructor. More... | |
BaseTKGroup (const char *prefix, const VectorSpace< V, M > &vectorSpace, const std::vector< double > &scales) | |
Constructor. More... | |
virtual | ~BaseTKGroup () |
Destructor. More... | |
Statistical/Mathematical methods | |
virtual bool | symmetric () const =0 |
Whether or not the matrix is symmetric. See template specialization. More... | |
virtual const BaseVectorRV< V, M > & | rv (unsigned int stageId) const =0 |
Gaussian increment property to construct a transition kernel. See template specialization. More... | |
virtual const BaseVectorRV< V, M > & | rv (const std::vector< unsigned int > &stageIds)=0 |
Gaussian increment property to construct a transition kernel. See template specialization. More... | |
virtual const BaseVectorRV< V, M > & | rv (const V &position) const =0 |
Constructs transition kernel pdf based on internal m_stageId variable. More... | |
Misc methods | |
const BaseEnvironment & | env () const |
QUESO's environment. More... | |
const V & | preComputingPosition (unsigned int stageId) const |
Pre-computing position; access to protected attribute *m_preComputingPositions[stageId]. More... | |
virtual bool | setPreComputingPosition (const V &position, unsigned int stageId) |
Sets the pre-computing positions m_preComputingPositions [stageId] with a new vector of size position . More... | |
virtual void | clearPreComputingPositions () |
Clears the pre-computing positions m_preComputingPositions [stageId]. More... | |
virtual unsigned int | set_dr_stage (unsigned int stageId) |
Does nothing. Subclasses may re-implement. Returns the current stage id. More... | |
virtual void | updateTK () |
virtual bool | covMatrixIsDirty ()=0 |
virtual void | cleanCovMatrix ()=0 |
I/O methods | |
virtual void | print (std::ostream &os) const |
TODO: Prints the transition kernel. More... | |
Protected Attributes | |
const EmptyEnvironment * | m_emptyEnv |
const BaseEnvironment & | m_env |
std::string | m_prefix |
const VectorSpace< V, M > * | m_vectorSpace |
std::vector< double > | m_scales |
std::vector< const V * > | m_preComputingPositions |
std::vector< BaseVectorRV< V, M > * > | m_rvs |
unsigned int | m_stageId |
This base class allows the representation of a transition kernel.
The transition kernel is a conditional distribution function that represents the probability of moving from a point \( x \in R^n \) to a point in the set \( A \in B \), where \( B \) is a Borel set over \( R^n \). Since it is a distribution function, \( P(x,R^n)=1 \), where it is permitted that the chain can make a transition from the point \( x \) to \( x \), that is \( P(x, {x}) \) is not necessarily zero.
Definition at line 32 of file Algorithm.h.
QUESO::BaseTKGroup< V, M >::BaseTKGroup | ( | ) |
Default constructor.
Definition at line 33 of file TKGroup.C.
QUESO::BaseTKGroup< V, M >::BaseTKGroup | ( | const char * | prefix, |
const VectorSpace< V, M > & | vectorSpace, | ||
const std::vector< double > & | scales | ||
) |
Constructor.
Definition at line 47 of file TKGroup.C.
References QUESO::BaseTKGroup< V, M >::m_scales.
|
virtual |
Destructor.
Definition at line 67 of file TKGroup.C.
|
pure virtual |
Performs whatever cleanup is needed (usually just resetting an internal bool flag) after the covariance matrix was modified.
After this method is called, covMatrixIsDirty should return true
.
Implemented in QUESO::TransformedScaledCovMatrixTKGroup< V, M >, QUESO::MetropolisAdjustedLangevinTK< V, M >, QUESO::ScaledCovMatrixTKGroup< V, M >, and QUESO::HessianCovMatricesTKGroup< V, M >.
|
virtual |
Clears the pre-computing positions m_preComputingPositions
[stageId].
Reimplemented in QUESO::TransformedScaledCovMatrixTKGroup< V, M >, QUESO::MetropolisAdjustedLangevinTK< V, M >, QUESO::ScaledCovMatrixTKGroup< V, M >, and QUESO::HessianCovMatricesTKGroup< V, M >.
Definition at line 111 of file TKGroup.C.
Referenced by QUESO::HessianCovMatricesTKGroup< V, M >::clearPreComputingPositions(), QUESO::ScaledCovMatrixTKGroup< V, M >::clearPreComputingPositions(), QUESO::MetropolisAdjustedLangevinTK< V, M >::clearPreComputingPositions(), and QUESO::TransformedScaledCovMatrixTKGroup< V, M >::clearPreComputingPositions().
|
pure virtual |
This method determines whether or not the user has 'dirtied' the covariance matrix, thereby necessitating an AM reset.
Should return true if the cov matrix was modified in such a way to affect the Adaptive Metropolis sample covariance calculation.
Implemented in QUESO::TransformedScaledCovMatrixTKGroup< V, M >, QUESO::MetropolisAdjustedLangevinTK< V, M >, QUESO::ScaledCovMatrixTKGroup< V, M >, and QUESO::HessianCovMatricesTKGroup< V, M >.
const BaseEnvironment & QUESO::BaseTKGroup< V, M >::env | ( | ) | const |
const V & QUESO::BaseTKGroup< V, M >::preComputingPosition | ( | unsigned int | stageId | ) | const |
Pre-computing position; access to protected attribute *m_preComputingPositions[stageId].
Definition at line 87 of file TKGroup.C.
|
virtual |
TODO: Prints the transition kernel.
Reimplemented in QUESO::TransformedScaledCovMatrixTKGroup< V, M >, QUESO::MetropolisAdjustedLangevinTK< V, M >, QUESO::ScaledCovMatrixTKGroup< V, M >, and QUESO::HessianCovMatricesTKGroup< V, M >.
Definition at line 133 of file TKGroup.C.
Referenced by QUESO::HessianCovMatricesTKGroup< V, M >::print(), QUESO::ScaledCovMatrixTKGroup< V, M >::print(), QUESO::MetropolisAdjustedLangevinTK< V, M >::print(), and QUESO::TransformedScaledCovMatrixTKGroup< V, M >::print().
|
pure virtual |
Gaussian increment property to construct a transition kernel. See template specialization.
Implemented in QUESO::TransformedScaledCovMatrixTKGroup< V, M >, QUESO::HessianCovMatricesTKGroup< V, M >, QUESO::ScaledCovMatrixTKGroup< V, M >, and QUESO::MetropolisAdjustedLangevinTK< V, M >.
|
pure virtual |
Gaussian increment property to construct a transition kernel. See template specialization.
Implemented in QUESO::TransformedScaledCovMatrixTKGroup< V, M >, QUESO::HessianCovMatricesTKGroup< V, M >, QUESO::ScaledCovMatrixTKGroup< V, M >, and QUESO::MetropolisAdjustedLangevinTK< V, M >.
|
pure virtual |
Constructs transition kernel pdf based on internal m_stageId
variable.
Implemented in QUESO::MetropolisAdjustedLangevinTK< V, M >, QUESO::TransformedScaledCovMatrixTKGroup< V, M >, QUESO::HessianCovMatricesTKGroup< V, M >, and QUESO::ScaledCovMatrixTKGroup< V, M >.
|
virtual |
Does nothing. Subclasses may re-implement. Returns the current stage id.
Reimplemented in QUESO::TransformedScaledCovMatrixTKGroup< V, M >, QUESO::ScaledCovMatrixTKGroup< V, M >, and QUESO::HessianCovMatricesTKGroup< V, M >.
Definition at line 125 of file TKGroup.C.
|
virtual |
Sets the pre-computing positions m_preComputingPositions
[stageId] with a new vector of size position
.
Reimplemented in QUESO::TransformedScaledCovMatrixTKGroup< V, M >, QUESO::MetropolisAdjustedLangevinTK< V, M >, QUESO::ScaledCovMatrixTKGroup< V, M >, and QUESO::HessianCovMatricesTKGroup< V, M >.
Definition at line 98 of file TKGroup.C.
Referenced by QUESO::HessianCovMatricesTKGroup< V, M >::setPreComputingPosition(), QUESO::ScaledCovMatrixTKGroup< V, M >::setPreComputingPosition(), QUESO::MetropolisAdjustedLangevinTK< V, M >::setPreComputingPosition(), and QUESO::TransformedScaledCovMatrixTKGroup< V, M >::setPreComputingPosition().
|
pure virtual |
Whether or not the matrix is symmetric. See template specialization.
Implemented in QUESO::TransformedScaledCovMatrixTKGroup< V, M >, QUESO::HessianCovMatricesTKGroup< V, M >, QUESO::ScaledCovMatrixTKGroup< V, M >, and QUESO::MetropolisAdjustedLangevinTK< V, M >.
|
inlinevirtual |
|
protected |
|
protected |
Definition at line 128 of file TKGroup.h.
Referenced by QUESO::HessianCovMatricesTKGroup< V, M >::HessianCovMatricesTKGroup(), QUESO::MetropolisAdjustedLangevinTK< V, M >::MetropolisAdjustedLangevinTK(), QUESO::ScaledCovMatrixTKGroup< V, M >::ScaledCovMatrixTKGroup(), and QUESO::TransformedScaledCovMatrixTKGroup< V, M >::TransformedScaledCovMatrixTKGroup().
|
protected |
Definition at line 132 of file TKGroup.h.
Referenced by QUESO::HessianCovMatricesTKGroup< V, M >::HessianCovMatricesTKGroup(), QUESO::MetropolisAdjustedLangevinTK< V, M >::MetropolisAdjustedLangevinTK(), QUESO::ScaledCovMatrixTKGroup< V, M >::ScaledCovMatrixTKGroup(), and QUESO::TransformedScaledCovMatrixTKGroup< V, M >::TransformedScaledCovMatrixTKGroup().
|
protected |
|
protected |
Definition at line 133 of file TKGroup.h.
Referenced by QUESO::HessianCovMatricesTKGroup< V, M >::HessianCovMatricesTKGroup(), QUESO::MetropolisAdjustedLangevinTK< V, M >::MetropolisAdjustedLangevinTK(), QUESO::ScaledCovMatrixTKGroup< V, M >::ScaledCovMatrixTKGroup(), and QUESO::TransformedScaledCovMatrixTKGroup< V, M >::TransformedScaledCovMatrixTKGroup().
|
protected |
Definition at line 131 of file TKGroup.h.
Referenced by QUESO::BaseTKGroup< V, M >::BaseTKGroup(), QUESO::HessianCovMatricesTKGroup< V, M >::HessianCovMatricesTKGroup(), QUESO::MetropolisAdjustedLangevinTK< V, M >::MetropolisAdjustedLangevinTK(), QUESO::ScaledCovMatrixTKGroup< V, M >::ScaledCovMatrixTKGroup(), and QUESO::TransformedScaledCovMatrixTKGroup< V, M >::TransformedScaledCovMatrixTKGroup().
|
protected |
|
protected |