latest version v1.9 - last update 10 Apr 2010 |
this class generates either one point from a given covarianceMatrix and centre or it generates a given number of points according to these parameters. More...
#include <ltiMultivariateGaussian.h>
Classes | |
class | parameters |
the parameters for the class multivariateGaussian More... | |
Public Member Functions | |
multivariateGaussian () | |
multivariateGaussian (const multivariateGaussian &other) | |
virtual | ~multivariateGaussian () |
virtual const char * | getTypeName () const |
bool | apply (const dvector &mean, const dmatrix &covarianceMatrix, dvector &dest) const |
bool | apply (const dvector &mean, const dmatrix &covarianceMatrix, const int &number, dmatrix &dest) const |
bool | apply (std::list< dvector > &mean, std::list< dmatrix > &covarianceMatrix, std::list< int > &numbers, std::list< dmatrix > &dest) const |
bool | apply (std::list< dvector > &mean, std::list< dmatrix > &covarianceMatrix, std::list< int > &numbers, dmatrix &dest) const |
double | draw () const |
dmatrix | draw (const int &number) const |
multivariateGaussian & | copy (const multivariateGaussian &other) |
multivariateGaussian & | operator= (const multivariateGaussian &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
Protected Attributes | |
gaussianDistribution * | gaussFunc |
jacobi< double > * | eigenFunc |
luDecomposition< double > * | detFunc |
this class generates either one point from a given covarianceMatrix and centre or it generates a given number of points according to these parameters.
The points are drawn from a gaussian distribution
The apply methods expect the parameters directly, the parameters for the draw method must be set in the parameter class
Only draw(const int& number) is implemented. draw() is only reimplemented to make sure that the function of the parent class isn't used. This function return always 0. To draw only one point use draw(const int& number) with number=1
lti::multivariateGaussian::multivariateGaussian | ( | ) |
default constructor
lti::multivariateGaussian::multivariateGaussian | ( | const multivariateGaussian & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::multivariateGaussian::~multivariateGaussian | ( | ) | [virtual] |
destructor
bool lti::multivariateGaussian::apply | ( | std::list< dvector > & | mean, | |
std::list< dmatrix > & | covarianceMatrix, | |||
std::list< int > & | numbers, | |||
dmatrix & | dest | |||
) | const |
Apply.
mean | list of dvector with the centres. | |
covarianceMatrix | list of dmatrix with the covariances | |
numbers | list of int with the number of points to create in each cluster | |
dest | dmatrix with the resulting points in its rows |
bool lti::multivariateGaussian::apply | ( | std::list< dvector > & | mean, | |
std::list< dmatrix > & | covarianceMatrix, | |||
std::list< int > & | numbers, | |||
std::list< dmatrix > & | dest | |||
) | const |
Apply.
mean | list of dvectors with the centres. | |
covarianceMatrix | list of dmatrix with the covariances | |
numbers | list of int with the number of points to create in each cluster | |
dest | list of dmatrix with the resulting points in its rows a one dmatrix for each cluster |
bool lti::multivariateGaussian::apply | ( | const dvector & | mean, | |
const dmatrix & | covarianceMatrix, | |||
const int & | number, | |||
dmatrix & | dest | |||
) | const |
creates either one cluster of a set of clusters with the given number of points the covarianceMatrix .
mean | dvector with the centre. | |
covarianceMatrix | dmatrix with the covariances | |
number | int with the number of points to create | |
dest | dmatrix with the resulting points in its rows |
bool lti::multivariateGaussian::apply | ( | const dvector & | mean, | |
const dmatrix & | covarianceMatrix, | |||
dvector & | dest | |||
) | const |
computes one point from a gaussian distribution with the given parameters.
The resulting point is left in dest operates on the given parameter.
mean | dvector with the centre. | |
covarianceMatrix | dmatrix with the covariances | |
dest | dvector with the resulting point |
virtual functor* lti::multivariateGaussian::clone | ( | ) | const [virtual] |
returns a pointer to a clone of this functor.
Reimplemented from lti::continuousRandomDistribution.
multivariateGaussian& lti::multivariateGaussian::copy | ( | const multivariateGaussian & | other | ) |
copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::continuousRandomDistribution.
dmatrix lti::multivariateGaussian::draw | ( | const int & | number | ) | const |
computes a number of points with the parameters set in the parameters object
number | int with the number of points to create |
double lti::multivariateGaussian::draw | ( | ) | const [virtual] |
In this context this method doesn't make any sense, so it returns 0.Don't use.
Use draw(const int& number) instead and set number equal to one; this returns also only one point in a Matrix with only one row This function was reimplented, because the function is implemented in the parent class, and this function can't be used at this place.
Reimplemented from lti::continuousRandomDistribution.
const parameters& lti::multivariateGaussian::getParameters | ( | ) | const |
returns used parameters
Reimplemented from lti::functor.
virtual const char* lti::multivariateGaussian::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("multivariateGaussian")
Reimplemented from lti::continuousRandomDistribution.
multivariateGaussian& lti::multivariateGaussian::operator= | ( | const multivariateGaussian & | other | ) |
luDecomposition<double>* lti::multivariateGaussian::detFunc [protected] |
compute determinate
jacobi<double>* lti::multivariateGaussian::eigenFunc [protected] |
get the eigenvalues and eigenvectors
gaussianDistribution* lti::multivariateGaussian::gaussFunc [protected] |
random functor used for generation of points