27 #include <queso/GslVector.h>
28 #include <queso/GslMatrix.h>
29 #include <queso/VectorSet.h>
30 #include <queso/GaussianLikelihoodScalarCovariance.h>
34 template<
class V,
class M>
37 const V & observations,
double covariance)
39 m_covariance(covariance)
43 template<
class V,
class M>
48 template<
class V,
class M>
52 V modelOutput(this->m_observations, 0, 0);
54 this->evaluateModel(domainVector, modelOutput);
56 modelOutput -= this->m_observations;
57 double norm2_squared = modelOutput.norm2Sq();
59 return -0.5 * norm2_squared / m_covariance;
GaussianLikelihoodScalarCovariance(const char *prefix, const VectorSet< V, M > &domainSet, const V &observations, double covariance)
Default constructor.
virtual ~GaussianLikelihoodScalarCovariance()
Destructor.
virtual double lnValue(const V &domainVector) const
Logarithm of the value of the scalar function.
A templated class for handling sets.
A class that represents a Gaussian likelihood with scalar covariance.
Base class for canned Gaussian likelihoods.