queso-0.53.0
|
A class for handling concatenated PDFs. More...
#include <ConcatenatedJointPdf.h>
Public Member Functions | |
Constructor/Destructor methods | |
ConcatenatedJointPdf (const char *prefix, const BaseJointPdf< V, M > &density1, const BaseJointPdf< V, M > &density2, const VectorSet< V, M > &concatenatedDomain) | |
Constructor. More... | |
ConcatenatedJointPdf (const char *prefix, const std::vector< const BaseJointPdf< V, M > * > &densities, const VectorSet< V, M > &concatenatedDomain) | |
Constructor. More... | |
~ConcatenatedJointPdf () | |
Destructor. More... | |
Math methods | |
double | actualValue (const V &domainVector, const V *domainDirection, V *gradVector, M *hessianMatrix, V *hessianEffect) const |
Calculates the actual values of each density. More... | |
double | lnValue (const V &domainVector, const V *domainDirection, V *gradVector, M *hessianMatrix, V *hessianEffect) const |
Calculates the logarithm of the values of each density. More... | |
void | setNormalizationStyle (unsigned int value) const |
Sets the normalization style of all densities to value . More... | |
double | computeLogOfNormalizationFactor (unsigned int numSamples, bool updateFactorInternally) const |
Computes the logarithm of the normalization factor. More... | |
Public Member Functions inherited from QUESO::BaseJointPdf< V, M > | |
BaseJointPdf (const char *prefix, const VectorSet< V, M > &domainSet) | |
Default constructor. More... | |
virtual | ~BaseJointPdf () |
Destructor. More... | |
void | setLogOfNormalizationFactor (double value) const |
Sets a logarithmic value to be used in the normalization factor (stored in the protected attribute m_normalizationStyle.) More... | |
Public Member Functions inherited from QUESO::BaseScalarFunction< V, M > | |
BaseScalarFunction (const char *prefix, const VectorSet< V, M > &domainSet) | |
Default constructor. More... | |
virtual | ~BaseScalarFunction () |
Destructor. More... | |
const VectorSet< V, M > & | domainSet () const |
Access to the protected attribute m_domainSet: domain set of the scalar function. More... | |
Protected Attributes | |
std::vector< const BaseJointPdf< V, M > * > | m_densities |
Protected Attributes inherited from QUESO::BaseJointPdf< V, M > | |
unsigned int | m_normalizationStyle |
double | m_logOfNormalizationFactor |
Protected Attributes inherited from QUESO::BaseScalarFunction< V, M > | |
const BaseEnvironment & | m_env |
std::string | m_prefix |
const VectorSet< V, M > & | m_domainSet |
Domain set of the scalar function. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from QUESO::BaseJointPdf< V, M > | |
double | commonComputeLogOfNormalizationFactor (unsigned int numSamples, bool updateFactorInternally) const |
Common method (to the derived classes) to compute the logarithm of the normalization factor. More... | |
A class for handling concatenated PDFs.
This class allows the user to defines concatenated probability density distributions, i.e, two or more distinct PDFs can be concatenated into one single PDF. This class used, for instance, to concatenate priors from two or more RVs, where one of them has a uniform distribution whereas the other one(s) has a Gaussian distribution.
Definition at line 55 of file ConcatenatedJointPdf.h.
QUESO::ConcatenatedJointPdf< V, M >::ConcatenatedJointPdf | ( | const char * | prefix, |
const BaseJointPdf< V, M > & | density1, | ||
const BaseJointPdf< V, M > & | density2, | ||
const VectorSet< V, M > & | concatenatedDomain | ||
) |
Constructor.
Concatenates two PDFs: density1
and density2
into one vector PDF, given a prefix and the concatenated domain of such PDFs.
Definition at line 33 of file ConcatenatedJointPdf.C.
References QUESO::ConcatenatedJointPdf< V, M >::m_densities, queso_require_equal_to_msg, and QUESO::VectorSet< V, M >::vectorSpace().
QUESO::ConcatenatedJointPdf< V, M >::ConcatenatedJointPdf | ( | const char * | prefix, |
const std::vector< const BaseJointPdf< V, M > * > & | densities, | ||
const VectorSet< V, M > & | concatenatedDomain | ||
) |
Constructor.
Concatenates a sequence of PDFs, given by: std::vector<const BaseJointPdf<V,M>* >& densities
into one single PDF, given a prefix and the concatenated domain of such PDFs.
Definition at line 53 of file ConcatenatedJointPdf.C.
References QUESO::ConcatenatedJointPdf< V, M >::m_densities, queso_require_equal_to_msg, and QUESO::VectorSet< V, M >::vectorSpace().
QUESO::ConcatenatedJointPdf< V, M >::~ConcatenatedJointPdf | ( | ) |
|
virtual |
Calculates the actual values of each density.
The final actual value is the multiplication of all values calculated.
Implements QUESO::BaseJointPdf< V, M >.
Definition at line 89 of file ConcatenatedJointPdf.C.
References queso_require_equal_to_msg, and queso_require_msg.
|
virtual |
Computes the logarithm of the normalization factor.
This method calls the computeLogOfNormalizationFactor() for each one of the densities that have been concatenated.
Implements QUESO::BaseJointPdf< V, M >.
Definition at line 187 of file ConcatenatedJointPdf.C.
|
virtual |
Calculates the logarithm of the values of each density.
The final logarithm value is the addition of all values calculated.
Implements QUESO::BaseJointPdf< V, M >.
Definition at line 139 of file ConcatenatedJointPdf.C.
References queso_require_msg.
|
virtual |
Sets the normalization style of all densities to value
.
Reimplemented from QUESO::BaseJointPdf< V, M >.
Definition at line 79 of file ConcatenatedJointPdf.C.
|
protected |
Definition at line 103 of file ConcatenatedJointPdf.h.
Referenced by QUESO::ConcatenatedJointPdf< V, M >::ConcatenatedJointPdf().