3 #include "../point/pointgauss.h"
4 #include "../point/matrix.h"
16 std::vector<double> temp(d);
17 for (
size_t i=0; i<d; ++i)
19 sort(temp.begin(), temp.end());
20 this->
logSqrt = accumulate(temp.begin(), temp.end(), d*log(2*
M_PI)/2);
29 std::vector<double> temp(d);
30 for (
size_t i=0; i<d; ++i)
32 sort(temp.begin(), temp.end());
33 double qf = accumulate(temp.begin(), temp.end(), .0);
44 std::vector<double> temp(d);
45 for (
size_t i=0; i<d; ++i)
47 sort(temp.begin(), temp.end());
48 double qf = accumulate(temp.begin(), temp.end(), .0);
60 for (
size_t i=0; i<d; ++i)
virtual double density(Point const &x) const
Evaluates the density of the multivariate normal distribution at the given point x.
virtual double squaredMahalanobis(Point const &x) const
PointGauss(Point const &m, Matrix const &cov)
static Matrix ltInverse(Matrix const <)
Weighted matrix of arbitrary dimension.
Weighted point of arbitrary dimension.
virtual double nll(Point const &x) const
Computes the negative log-likelihood of the density at the given point x.