#include <Gaussian.h>
Public Member Functions | |
Gaussian () | |
Default Constructor. | |
Gaussian (DCol m, DMat &c) | |
Complete Constructor. | |
Gaussian (const Gaussian &g) | |
Copy Constructor. | |
int | dim () |
Gets the dimension. | |
void | operator= (const Gaussian &g) |
Operator =. | |
DCol | expectedValue () |
Returns the expected value. | |
DCol | expectedValue (const int n) |
Returns the first n elements of the expected value. | |
Decimal | covariance (int row, int col) |
Returns the (row-th, col-th) element of the covariance matrix. | |
DMat & | covariance () |
Returns the covariance matrix as a vector of vector with the appropriate size. | |
DMat | covariance (const int n) const |
Returns the covariance matrix of the first n elements of the random vector. | |
Decimal | evaluate (DCol p) |
Returns the the value of the pdf in the given position. | |
Gaussian | marginalize (int n) |
Returns a Gaussian marginalized to the first n random variables. | |
void | printCovInv () |
Print the invese of the covariance. | |
virtual string | print () |
Returns the the value of the pdf in the given position. | |
Protected Member Functions | |
void | _computeCovInv () |
Protected Attributes | |
DCol | _mean |
DMat | _cov |
DMat | _covInv |
bool | _covInvComputed |
MipBaselib::Gaussian::Gaussian | ( | ) |
Default Constructor.
Complete Constructor.
[in] | m | Mean, default (0 0)'. |
[in] | &c | Pointer to a covariance matrix, default (1 0; 0 1) when c==NULL. |
MipBaselib::Gaussian::Gaussian | ( | const Gaussian & | g | ) |
void MipBaselib::Gaussian::_computeCovInv | ( | ) | [protected] |
int MipBaselib::Gaussian::dim | ( | ) |
Gets the dimension.
void MipBaselib::Gaussian::operator= | ( | const Gaussian & | g | ) |
DCol MipBaselib::Gaussian::expectedValue | ( | ) | [virtual] |
DCol MipBaselib::Gaussian::expectedValue | ( | const int | n | ) |
Returns the first n elements of the expected value.
[in] | n | Number of requested elements. |
Decimal MipBaselib::Gaussian::covariance | ( | int | row, | |
int | col | |||
) | [virtual] |
Returns the (row-th, col-th) element of the covariance matrix.
[in] | row | Requested row. |
[in] | col | Requested column. |
Implements MipBaselib::PDF.
DMat & MipBaselib::Gaussian::covariance | ( | ) |
Returns the covariance matrix as a vector of vector with the appropriate size.
DMat MipBaselib::Gaussian::covariance | ( | const int | n | ) | const |
Returns the covariance matrix of the first n elements of the random vector.
Returns the the value of the pdf in the given position.
[in] | col | Requested position. |
Implements MipBaselib::PDF.
Gaussian MipBaselib::Gaussian::marginalize | ( | int | n | ) |
Returns a Gaussian marginalized to the first n random variables.
[in] | n | Requested number of components. |
void MipBaselib::Gaussian::printCovInv | ( | ) |
Print the invese of the covariance.
[in] | col | Requested position. |
string MipBaselib::Gaussian::print | ( | ) | [virtual] |
Returns the the value of the pdf in the given position.
[in] | col | Requested position. |
Reimplemented in MipBaselib::GaussianComponent.
DCol MipBaselib::Gaussian::_mean [protected] |
DMat MipBaselib::Gaussian::_cov [protected] |
DMat MipBaselib::Gaussian::_covInv [protected] |
bool MipBaselib::Gaussian::_covInvComputed [protected] |