37 #ifndef PROBLIB_GAUSSIAN_H_ 38 #define PROBLIB_GAUSSIAN_H_ 150 std::string
toString(
const std::string& indent =
"")
const;
173 #define CHECK_INITIALIZED assert_msg(ptr_, "Gaussian was not yet initialized.") bool getExpectedValue(arma::vec &v) const
Returns the expected value E[x] of the Gaussian, which corresponds to its mean.
virtual ~Gaussian()
Destructor.
This class represents a multi-variate Gaussian (Normal) distribution.
arma_inline const Op< T1, op_mean > mean(const Base< typename T1::elem_type, T1 > &X, const uword dim=0)
Gaussian & operator=(const Gaussian &other)
Assignment operator. The operation is cheap since it only copies a pointer. A deep clone will only be...
double getMaxDensity() const
Calculates the maximum density of the Gaussian, i.e., the density at the mean.
const arma::mat & getCovariance() const
Returns the covariance matrix of the Gaussian.
void setMean(const arma::vec &mu)
Sets the mean of the Gaussian.
const arma::vec & getMean() const
Returns the mean of the Gaussian.
GaussianStruct(const GaussianStruct &orig)
double getLikelihood(const PDF &pdf) const
Gaussian(int dim)
Constructs a (multi-variate) Gaussian with specific dimensionality but leaves mean and covariance uns...
const Op< T1, op_cov > cov(const Base< typename T1::elem_type, T1 > &X, const uword norm_type=0)
GaussianStruct(const arma::vec &mu, const arma::mat &cov)
double getDensity(const arma::vec &v, double max_mah_dist=0) const
Calculates the density of the Gaussian at point v.
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.
void setCovariance(const arma::mat &cov)
Sets the covariance of the Gaussian.
std::string toString(const std::string &indent="") const
Represents the Gaussian as a string for easier console output.