queso-0.53.0
Public Member Functions | Private Attributes | List of all members
QUESO::GaussianLikelihoodScalarCovariance< V, M > Class Template Reference

A class that represents a Gaussian likelihood with scalar covariance. More...

#include <GaussianLikelihoodScalarCovariance.h>

Inheritance diagram for QUESO::GaussianLikelihoodScalarCovariance< V, M >:
Inheritance graph
[legend]
Collaboration diagram for QUESO::GaussianLikelihoodScalarCovariance< V, M >:
Collaboration graph
[legend]

Public Member Functions

virtual double actualValue (const V &domainVector, const V *domainDirection, V *gradVector, M *hessianMatrix, V *hessianEffect) const
 Actual value of the scalar function. More...
 
virtual double lnValue (const V &domainVector, const V *domainDirection, V *gradVector, M *hessianMatrix, V *hessianEffect) const
 Logarithm of the value of the scalar function. More...
 
Constructor/Destructor methods.
 GaussianLikelihoodScalarCovariance (const char *prefix, const VectorSet< V, M > &domainSet, const V &observations, double covariance)
 Default constructor. More...
 
virtual ~GaussianLikelihoodScalarCovariance ()
 Destructor. More...
 
- Public Member Functions inherited from QUESO::BaseGaussianLikelihood< V, M >
virtual void evaluateModel (const V &domainVector, const V *domainDirection, V &modelOutput, V *gradVector, M *hessianMatrix, V *hessianEffect) const =0
 Evaluates the user's model at the point domainVector. More...
 
 BaseGaussianLikelihood (const char *prefix, const VectorSet< V, M > &domainSet, const V &observations)
 Default constructor. More...
 
virtual ~BaseGaussianLikelihood ()
 Destructor. 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...
 

Private Attributes

double m_covariance
 

Additional Inherited Members

- Protected Attributes inherited from QUESO::BaseGaussianLikelihood< V, M >
const V & m_observations
 
- Protected Attributes inherited from QUESO::BaseScalarFunction< V, M >
const BaseEnvironmentm_env
 
std::string m_prefix
 
const VectorSet< V, M > & m_domainSet
 Domain set of the scalar function. More...
 

Detailed Description

template<class V = GslVector, class M = GslMatrix>
class QUESO::GaussianLikelihoodScalarCovariance< V, M >

A class that represents a Gaussian likelihood with scalar covariance.

Definition at line 43 of file GaussianLikelihoodScalarCovariance.h.

Constructor & Destructor Documentation

template<class V , class M >
QUESO::GaussianLikelihoodScalarCovariance< V, M >::GaussianLikelihoodScalarCovariance ( const char *  prefix,
const VectorSet< V, M > &  domainSet,
const V &  observations,
double  covariance 
)

Default constructor.

Instantiates a Gaussian likelihood function, given a prefix, its domain, a set of observations and a scalar covariance matrix. The scalar 'covariance matrix' is just passed as a double.

Definition at line 35 of file GaussianLikelihoodScalarCovariance.C.

38  : BaseGaussianLikelihood<V, M>(prefix, domainSet, observations),
39  m_covariance(covariance)
40 {
41 }
const VectorSet< V, M > & domainSet() const
Access to the protected attribute m_domainSet: domain set of the scalar function. ...
template<class V , class M >
QUESO::GaussianLikelihoodScalarCovariance< V, M >::~GaussianLikelihoodScalarCovariance ( )
virtual

Destructor.

Definition at line 44 of file GaussianLikelihoodScalarCovariance.C.

45 {
46 }

Member Function Documentation

template<class V , class M >
double QUESO::GaussianLikelihoodScalarCovariance< V, M >::actualValue ( const V &  domainVector,
const V *  domainDirection,
V *  gradVector,
M *  hessianMatrix,
V *  hessianEffect 
) const
virtual

Actual value of the scalar function.

Implements QUESO::BaseScalarFunction< V, M >.

Definition at line 50 of file GaussianLikelihoodScalarCovariance.C.

53 {
54  return std::exp(this->lnValue(domainVector, domainDirection, gradVector,
55  hessianMatrix, hessianEffect));
56 }
virtual double lnValue(const V &domainVector, const V *domainDirection, V *gradVector, M *hessianMatrix, V *hessianEffect) const
Logarithm of the value of the scalar function.
template<class V , class M >
double QUESO::GaussianLikelihoodScalarCovariance< V, M >::lnValue ( const V &  domainVector,
const V *  domainDirection,
V *  gradVector,
M *  hessianMatrix,
V *  hessianEffect 
) const
virtual

Logarithm of the value of the scalar function.

Implements QUESO::BaseScalarFunction< V, M >.

Definition at line 60 of file GaussianLikelihoodScalarCovariance.C.

63 {
64  V modelOutput(this->m_observations, 0, 0); // At least it's not a copy
65 
66  this->evaluateModel(domainVector, domainDirection, modelOutput, gradVector,
67  hessianMatrix, hessianEffect);
68 
69  modelOutput -= this->m_observations; // Compute misfit
70  double norm2_squared = modelOutput.norm2Sq(); // Compute square of 2-norm
71 
72  return -0.5 * norm2_squared / m_covariance;
73 }
virtual void evaluateModel(const V &domainVector, const V *domainDirection, V &modelOutput, V *gradVector, M *hessianMatrix, V *hessianEffect) const =0
Evaluates the user&#39;s model at the point domainVector.

Member Data Documentation

template<class V = GslVector, class M = GslMatrix>
double QUESO::GaussianLikelihoodScalarCovariance< V, M >::m_covariance
private

Definition at line 70 of file GaussianLikelihoodScalarCovariance.h.


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

Generated on Thu Jun 11 2015 13:52:35 for queso-0.53.0 by  doxygen 1.8.5