Public Member Functions | Private Attributes | Friends | List of all members
BFL::Gaussian Class Reference

Class representing Gaussian (or normal density) More...

#include <gaussian.h>

Inheritance diagram for BFL::Gaussian:
Inheritance graph
[legend]

Public Member Functions

virtual GaussianClone () const
 Clone function. More...
 
virtual MatrixWrapper::SymmetricMatrix CovarianceGet () const
 Get the Covariance Matrix E[(x - E[x])^2] of the Analytic pdf. More...
 
void CovarianceSet (const MatrixWrapper::SymmetricMatrix &cov)
 Set the Covariance Matrix. More...
 
virtual MatrixWrapper::ColumnVector ExpectedValueGet () const
 Get the expected value E[x] of the pdf. More...
 
void ExpectedValueSet (const MatrixWrapper::ColumnVector &mu)
 Set the Expected Value. More...
 
 Gaussian (const MatrixWrapper::ColumnVector &Mu, const MatrixWrapper::SymmetricMatrix &Sigma)
 Constructor. More...
 
 Gaussian (int dimension=0)
 constructor with only dimensions or nothing More...
 
virtual Probability ProbabilityGet (const MatrixWrapper::ColumnVector &input) const
 Get the probability of a certain argument. More...
 
bool SampleFrom (vector< Sample< MatrixWrapper::ColumnVector > > &list_samples, const int num_samples, int method=DEFAULT, void *args=NULL) const
 
virtual bool SampleFrom (Sample< MatrixWrapper::ColumnVector > &one_sample, int method=DEFAULT, void *args=NULL) const
 
virtual ~Gaussian ()
 Default Copy Constructor will do. More...
 
- Public Member Functions inherited from BFL::BFL::Pdf< MatrixWrapper::ColumnVector >
unsigned int DimensionGet () const
 Get the dimension of the argument. More...
 
virtual void DimensionSet (unsigned int dim)
 Set the dimension of the argument. More...
 
 Pdf (unsigned int dimension=0)
 Constructor. More...
 
virtual bool SampleFrom (vector< Sample< MatrixWrapper::ColumnVector > > &list_samples, const unsigned int num_samples, int method=DEFAULT, void *args=NULL) const
 Draw multiple samples from the Pdf (overloaded) More...
 
virtual bool SampleFrom (Sample< MatrixWrapper::ColumnVector > &one_sample, int method=DEFAULT, void *args=NULL) const
 Draw 1 sample from the Pdf: More...
 
virtual ~Pdf ()
 Destructor. More...
 

Private Attributes

ColumnVector _diff
 
Matrix _Low_triangle
 
MatrixWrapper::ColumnVector _Mu
 
ColumnVector _samples
 
ColumnVector _sampleValue
 
MatrixWrapper::SymmetricMatrix _Sigma
 
bool _Sigma_changed
 
MatrixWrapper::SymmetricMatrix _Sigma_inverse
 
double _sqrt_pow
 
ColumnVector _tempColumn
 

Friends

std::ostream & operator<< (std::ostream &os, const Gaussian &g)
 output stream for Gaussian More...
 

Detailed Description

Class representing Gaussian (or normal density)

Definition at line 27 of file gaussian.h.

Constructor & Destructor Documentation

◆ Gaussian() [1/2]

BFL::Gaussian::Gaussian ( const MatrixWrapper::ColumnVector &  Mu,
const MatrixWrapper::SymmetricMatrix &  Sigma 
)

Constructor.

Parameters
MuMean Vector of the Gaussian
SigmaCovariance Matrix of the Gaussian

◆ Gaussian() [2/2]

BFL::Gaussian::Gaussian ( int  dimension = 0)

constructor with only dimensions or nothing

Definition at line 46 of file gaussian.cpp.

◆ ~Gaussian()

BFL::Gaussian::~Gaussian ( )
virtual

Default Copy Constructor will do.

Destructor

Definition at line 60 of file gaussian.cpp.

Member Function Documentation

◆ Clone()

Gaussian * BFL::Gaussian::Clone ( ) const
virtual

Clone function.

Implements BFL::BFL::Pdf< MatrixWrapper::ColumnVector >.

Definition at line 70 of file gaussian.cpp.

◆ CovarianceGet()

SymmetricMatrix BFL::Gaussian::CovarianceGet ( ) const
virtual

Get the Covariance Matrix E[(x - E[x])^2] of the Analytic pdf.

Get first order statistic (Covariance) of this AnalyticPdf

Returns
The Covariance of the Pdf (a SymmetricMatrix of dim DIMENSION)
Todo:
extend this more general to n-th order statistic
Bug:
Discrete pdfs should not be able to use this!

Reimplemented from BFL::BFL::Pdf< MatrixWrapper::ColumnVector >.

Definition at line 187 of file gaussian.cpp.

◆ CovarianceSet()

void BFL::Gaussian::CovarianceSet ( const MatrixWrapper::SymmetricMatrix &  cov)

Set the Covariance Matrix.

Set the Covariance Matrix

Parameters
covThe new Covariance matrix

Definition at line 204 of file gaussian.cpp.

◆ ExpectedValueGet()

ColumnVector BFL::Gaussian::ExpectedValueGet ( ) const
virtual

Get the expected value E[x] of the pdf.

Get low order statistic (Expected Value) of this AnalyticPdf

Returns
The Expected Value of the Pdf (a ColumnVector with DIMENSION rows)
Note
No set functions here! This can be useful for analytic functions, but not for sample based representations!
For certain discrete Pdfs, this function has no meaning, what is the average between yes and no?

Reimplemented from BFL::BFL::Pdf< MatrixWrapper::ColumnVector >.

Definition at line 181 of file gaussian.cpp.

◆ ExpectedValueSet()

void BFL::Gaussian::ExpectedValueSet ( const MatrixWrapper::ColumnVector &  mu)

Set the Expected Value.

Set the Expected Value

Parameters
muThe new Expected Value

Definition at line 193 of file gaussian.cpp.

◆ ProbabilityGet()

Probability BFL::Gaussian::ProbabilityGet ( const MatrixWrapper::ColumnVector &  input) const
virtual

Get the probability of a certain argument.

Parameters
inputT argument of the Pdf
Returns
the probability value of the argument

Reimplemented from BFL::BFL::Pdf< MatrixWrapper::ColumnVector >.

Definition at line 75 of file gaussian.cpp.

◆ SampleFrom() [1/2]

bool BFL::Gaussian::SampleFrom ( vector< Sample< MatrixWrapper::ColumnVector > > &  list_samples,
const int  num_samples,
int  method = DEFAULT,
void *  args = NULL 
) const

◆ SampleFrom() [2/2]

virtual bool BFL::Gaussian::SampleFrom ( Sample< MatrixWrapper::ColumnVector > &  one_sample,
int  method = DEFAULT,
void *  args = NULL 
) const
virtual

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const Gaussian g 
)
friend

output stream for Gaussian

Definition at line 62 of file gaussian.cpp.

Member Data Documentation

◆ _diff

ColumnVector BFL::Gaussian::_diff
mutableprivate

Definition at line 37 of file gaussian.h.

◆ _Low_triangle

Matrix BFL::Gaussian::_Low_triangle
mutableprivate

Definition at line 42 of file gaussian.h.

◆ _Mu

MatrixWrapper::ColumnVector BFL::Gaussian::_Mu
private

Definition at line 30 of file gaussian.h.

◆ _samples

ColumnVector BFL::Gaussian::_samples
mutableprivate

Definition at line 40 of file gaussian.h.

◆ _sampleValue

ColumnVector BFL::Gaussian::_sampleValue
mutableprivate

Definition at line 41 of file gaussian.h.

◆ _Sigma

MatrixWrapper::SymmetricMatrix BFL::Gaussian::_Sigma
private

Definition at line 31 of file gaussian.h.

◆ _Sigma_changed

bool BFL::Gaussian::_Sigma_changed
mutableprivate

Definition at line 34 of file gaussian.h.

◆ _Sigma_inverse

MatrixWrapper::SymmetricMatrix BFL::Gaussian::_Sigma_inverse
mutableprivate

Definition at line 35 of file gaussian.h.

◆ _sqrt_pow

double BFL::Gaussian::_sqrt_pow
mutableprivate

Definition at line 36 of file gaussian.h.

◆ _tempColumn

ColumnVector BFL::Gaussian::_tempColumn
mutableprivate

Definition at line 38 of file gaussian.h.


The documentation for this class was generated from the following files:


bfl
Author(s): Klaas Gadeyne, Wim Meeussen, Tinne Delaet and many others. See web page for a full contributor list. ROS package maintained by Wim Meeussen.
autogenerated on Mon Feb 28 2022 21:56:34