This class represents a multivariate Gaussian (Normal) distribution. More...
#include <Gaussian.h>
Classes  
struct  GaussianStruct 
Public Member Functions  
Gaussian *  clone () const 
Creates a clone of the object. The clone method is cheap since it only copies a pointer. A deep clone will only be created if the original object is modified. More...  
Gaussian (int dim)  
Constructs a (multivariate) Gaussian with specific dimensionality but leaves mean and covariance unspecified. More...  
Gaussian (const arma::vec &mean, const arma::mat &cov)  
Constructs a (multivariate) Gaussian with specified mean and covariance. More...  
Gaussian (const Gaussian &orig)  
Copy constructor. More...  
const arma::mat &  getCovariance () const 
Returns the covariance matrix of the Gaussian. More...  
double  getDensity (const arma::vec &v, double max_mah_dist=0) const 
Calculates the density of the Gaussian at point v. More...  
double  getDensity (const Gaussian &npdf, double max_mah_dist=0) const 
bool  getExpectedValue (arma::vec &v) const 
Returns the expected value E[x] of the Gaussian, which corresponds to its mean. More...  
double  getLikelihood (const PDF &pdf) const 
double  getMaxDensity () const 
Calculates the maximum density of the Gaussian, i.e., the density at the mean. More...  
const arma::vec &  getMean () const 
Returns the mean of the Gaussian. More...  
Gaussian &  operator= (const Gaussian &other) 
Assignment operator. The operation is cheap since it only copies a pointer. A deep clone will only be created if the original object is modified. More...  
void  setCovariance (const arma::mat &cov) 
Sets the covariance of the Gaussian. More...  
void  setMean (const arma::vec &mu) 
Sets the mean of the Gaussian. More...  
std::string  toString (const std::string &indent="") const 
Represents the Gaussian as a string for easier console output. More...  
virtual  ~Gaussian () 
Destructor. More...  
Public Member Functions inherited from pbl::PDF  
int  dimensions () const 
virtual bool  getExpectedValue (std::string &v) const 
PDF (int dimensions, PDFType type)  
PDF (const PDF &orig)  
PDFType  type () const 
virtual  ~PDF () 
Protected Member Functions  
void  cloneStruct () 
double  getDensity (const arma::vec &v1, const arma::vec &v2, const arma::mat &S, double max_mah_dist=0) const 
Protected Attributes  
GaussianStruct *  ptr_ 
Protected Attributes inherited from pbl::PDF  
int  dimensions_ 
PDFType  type_ 
Additional Inherited Members  
Public Types inherited from pbl::PDF  
enum  PDFType { GAUSSIAN, MIXTURE, UNIFORM, DISCRETE, EXACT, HYBRID, UNKNOWN } 
This class represents a multivariate Gaussian (Normal) distribution.
Definition at line 51 of file Gaussian.h.
Gaussian::Gaussian  (  int  dim  ) 
Constructs a (multivariate) Gaussian with specific dimensionality but leaves mean and covariance unspecified.
dim  The dimensionality of the Gaussian 
Definition at line 42 of file Gaussian.cpp.
Constructs a (multivariate) Gaussian with specified mean and covariance.
Definition at line 45 of file Gaussian.cpp.
Gaussian::Gaussian  (  const Gaussian &  orig  ) 
Copy constructor.
Definition at line 48 of file Gaussian.cpp.

virtual 
Destructor.
Definition at line 54 of file Gaussian.cpp.

virtual 
Creates a clone of the object. The clone method is cheap since it only copies a pointer. A deep clone will only be created if the original object is modified.
Implements pbl::PDF.
Definition at line 80 of file Gaussian.cpp.

protected 
Definition at line 84 of file Gaussian.cpp.
const arma::mat & Gaussian::getCovariance  (  )  const 
Returns the covariance matrix of the Gaussian.
Definition at line 186 of file Gaussian.cpp.
double Gaussian::getDensity  (  const arma::vec &  v, 
double  max_mah_dist = 0 

)  const 
Calculates the density of the Gaussian at point v.
v  The point to calculate the density for 
max_mah_dist 
Definition at line 106 of file Gaussian.cpp.
double Gaussian::getDensity  (  const Gaussian &  npdf, 
double  max_mah_dist = 0 

)  const 
Definition at line 111 of file Gaussian.cpp.

protected 
Definition at line 128 of file Gaussian.cpp.

virtual 
Returns the expected value E[x] of the Gaussian, which corresponds to its mean.
v  The returned expected value 
Reimplemented from pbl::PDF.
Definition at line 122 of file Gaussian.cpp.

virtual 
Implements pbl::PDF.
Definition at line 91 of file Gaussian.cpp.

virtual 
Calculates the maximum density of the Gaussian, i.e., the density at the mean.
Implements pbl::PDF.
Definition at line 117 of file Gaussian.cpp.
const arma::vec & Gaussian::getMean  (  )  const 
Returns the mean of the Gaussian.
Definition at line 181 of file Gaussian.cpp.
Assignment operator. The operation is cheap since it only copies a pointer. A deep clone will only be created if the original object is modified.
Definition at line 64 of file Gaussian.cpp.
void Gaussian::setCovariance  (  const arma::mat &  cov  ) 
Sets the covariance of the Gaussian.
cov  The covariance matrix of the Gaussian 
Definition at line 171 of file Gaussian.cpp.
void Gaussian::setMean  (  const arma::vec &  mu  ) 
Sets the mean of the Gaussian.
mu  The mean of the Gaussian 
Definition at line 161 of file Gaussian.cpp.

virtual 
Represents the Gaussian as a string for easier console output.
Implements pbl::PDF.
Definition at line 191 of file Gaussian.cpp.

protected 
Definition at line 167 of file Gaussian.h.