Public Member Functions | |
bivariate_gaussian (vector2 const &mu, matrix2 const &sigma) | |
vector2 const & | get_mu () const |
matrix2 const & | get_sigma () const |
double | operator() (vector2 const &p) const |
double | operator() (double x, double y) const |
Static Private Member Functions | |
static matrix2 | compute_inverse_cholesky (matrix2 const &m) |
Private Attributes | |
matrix2 | _cholesky |
vector2 | _mu |
matrix2 | _sigma |
This class represents a simple 2-d Gaussian (Normal) distribution, defined by a mean vector 'mu' and a covariance matrix 'sigma'.
Definition at line 98 of file gaussian.cpp.
bivariate_gaussian::bivariate_gaussian | ( | vector2 const & | mu, |
matrix2 const & | sigma | ||
) | [inline] |
Construct from a mean vector and covariance matrix.
Definition at line 126 of file gaussian.cpp.
static matrix2 bivariate_gaussian::compute_inverse_cholesky | ( | matrix2 const & | m | ) | [inline, static, private] |
This evaluates the inverse of the Cholesky factorization of a 2x2 matrix; it's just a shortcut in evaluating the density.
Definition at line 136 of file gaussian.cpp.
vector2 const& bivariate_gaussian::get_mu | ( | ) | const [inline] |
Definition at line 101 of file gaussian.cpp.
matrix2 const& bivariate_gaussian::get_sigma | ( | ) | const [inline] |
Definition at line 103 of file gaussian.cpp.
double bivariate_gaussian::operator() | ( | vector2 const & | p | ) | const [inline] |
Evaluate the density of the distribution at a point defined by a two-element vector.
Definition at line 108 of file gaussian.cpp.
double bivariate_gaussian::operator() | ( | double | x, |
double | y | ||
) | const [inline] |
Evaluate the density of the distribution at an (x, y) point.
Definition at line 116 of file gaussian.cpp.
matrix2 bivariate_gaussian::_cholesky [private] |
Definition at line 151 of file gaussian.cpp.
vector2 bivariate_gaussian::_mu [private] |
Definition at line 149 of file gaussian.cpp.
matrix2 bivariate_gaussian::_sigma [private] |
Definition at line 150 of file gaussian.cpp.