latest version v1.9 - last update 10 Apr 2010 |
the parameters for the class gaussian More...
#include <ltiGaussian.h>
Public Member Functions | |
parameters () | |
parameters (const parameters &other) | |
~parameters () | |
const char * | getTypeName () const |
parameters & | copy (const parameters &other) |
parameters & | operator= (const parameters &other) |
virtual functor::parameters * | clone () const |
virtual bool | write (ioHandler &handler, const bool complete) const |
virtual bool | read (ioHandler &handler, const bool complete) |
void | setMeanAndCovariance (const vector< T > &mu, const matrix< T > &covar) |
void | setMeanAndVariance (const T mu, const T sigma2) |
Public Attributes | |
vector< T > | mean |
matrix< T > | covariance |
the parameters for the class gaussian
lti::gaussian< T >::parameters::parameters | ( | void | ) | [inline] |
default constructor
Reimplemented from lti::mathFunction::parameters.
References lti::gaussian< T >::parameters::covariance, and lti::gaussian< T >::parameters::mean.
Referenced by lti::gaussian< T >::parameters::clone().
lti::gaussian< T >::parameters::parameters | ( | const parameters & | other | ) | [inline] |
copy constructor
other | the parameters object to be copied |
Reimplemented from lti::mathFunction::parameters.
References lti::gaussian< T >::parameters::copy().
lti::gaussian< T >::parameters::~parameters | ( | ) | [inline, virtual] |
destructor
Reimplemented from lti::mathFunction::parameters.
virtual functor::parameters* lti::gaussian< T >::parameters::clone | ( | ) | const [inline, virtual] |
returns a pointer to a clone of the parameters
Reimplemented from lti::mathFunction::parameters.
References lti::gaussian< T >::parameters::parameters().
parameters& lti::gaussian< T >::parameters::copy | ( | const parameters & | other | ) | [inline] |
copy the contents of a parameters object
other | the parameters object to be copied |
Reimplemented from lti::mathFunction::parameters.
References lti::mathFunction::parameters::copy(), lti::gaussian< T >::parameters::covariance, and lti::gaussian< T >::parameters::mean.
Referenced by lti::gaussian< T >::parameters::operator=(), and lti::gaussian< T >::parameters::parameters().
const char* lti::gaussian< T >::parameters::getTypeName | ( | void | ) | const [inline, virtual] |
returns name of this type
Reimplemented from lti::mathFunction::parameters.
parameters& lti::gaussian< T >::parameters::operator= | ( | const parameters & | other | ) | [inline] |
copy the contents of a parameters object
other | the parameters object to be copied |
Reimplemented from lti::mathFunction::parameters.
References lti::gaussian< T >::parameters::copy().
virtual bool lti::gaussian< T >::parameters::read | ( | ioHandler & | handler, | |
const bool | complete | |||
) | [inline, virtual] |
read the parameters from the given ioHandler
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from lti::mathFunction::parameters.
References lti::gaussian< T >::parameters::covariance, lti::gaussian< T >::parameters::mean, lti::ioHandler::readBegin(), and lti::ioHandler::readEnd().
void lti::gaussian< T >::parameters::setMeanAndCovariance | ( | const vector< T > & | mu, | |
const matrix< T > & | covar | |||
) | [inline] |
Set the mean and covariance.
References lti::gaussian< T >::parameters::covariance, and lti::gaussian< T >::parameters::mean.
void lti::gaussian< T >::parameters::setMeanAndVariance | ( | const T | mu, | |
const T | sigma2 | |||
) | [inline] |
For the one dimensional case, you can set the proper mean and variance values using this method, which resizes properly the mean and covariance attributes.
References lti::gaussian< T >::parameters::covariance, and lti::gaussian< T >::parameters::mean.
virtual bool lti::gaussian< T >::parameters::write | ( | ioHandler & | handler, | |
const bool | complete | |||
) | const [inline, virtual] |
write the parameters in the given ioHandler
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from lti::mathFunction::parameters.
References lti::gaussian< T >::parameters::covariance, and lti::gaussian< T >::parameters::mean.
matrix<T> lti::gaussian< T >::parameters::covariance |
Covariance matrix.
Square matrix with the same number of rows (or columns) than the dimension of the mean vector.
Default value: 3x3 identity matrix
Referenced by lti::gaussian< T >::parameters::copy(), lti::gaussian< T >::parameters::parameters(), lti::gaussian< T >::parameters::read(), lti::gaussian< T >::parameters::setMeanAndCovariance(), lti::gaussian< T >::parameters::setMeanAndVariance(), and lti::gaussian< T >::parameters::write().
vector<T> lti::gaussian< T >::parameters::mean |
Mean vector.
It must have the same dimension than the presented vectors.
Default value: vector<T>(3,T(0))
Referenced by lti::gaussian< T >::parameters::copy(), lti::gaussian< T >::parameters::parameters(), lti::gaussian< T >::parameters::read(), lti::gaussian< T >::parameters::setMeanAndCovariance(), lti::gaussian< T >::parameters::setMeanAndVariance(), and lti::gaussian< T >::parameters::write().