|
latest version v1.9 - last update 10 Apr 2010 |
|
This function evaluates a multivariate gaussian with the form:
. More...
#include <ltiGaussian.h>


Classes | |
| class | parameters |
| the parameters for the class gaussian More... | |
Public Member Functions | |
| gaussian () | |
| gaussian (const T mean, const T variance) | |
| gaussian (const vector< T > &mean, const matrix< T > &covar) | |
| gaussian (const gaussian< T > &other) | |
| virtual | ~gaussian () |
| virtual const char * | getTypeName () const |
| bool | apply (const vector< T > &src, T &dest) const |
| T | operator() (const vector< T > &vct) |
| bool | apply (const T src, T &dest) const |
| T | operator() (const T x) |
| void | setMeanAndCovariance (const vector< T > &mean, const matrix< T > &covar) |
| void | setMeanAndVariance (const T mean, const T variance) |
| gaussian & | copy (const gaussian &other) |
| gaussian & | operator= (const gaussian &other) |
| virtual functor * | clone () const |
| const parameters & | getParameters () const |
| virtual bool | updateParameters () |
Protected Attributes | |
| matrix< T > | invCovariance |
| vector< T > | meanVct |
| T | norm |
| T | invVarianceH |
| T | mean |
This function evaluates a multivariate gaussian with the form:
.
The template value T is the type of the container elements (double or float).
| lti::gaussian< T >::gaussian | ( | ) |
default constructor
| lti::gaussian< T >::gaussian | ( | const T | mean, | |
| const T | variance | |||
| ) |
Construct a 1D gaussian with the given mean and variance.
Note that the second parameter is the variance and not the standard deviation.
| lti::gaussian< T >::gaussian | ( | const vector< T > & | mean, | |
| const matrix< T > & | covar | |||
| ) |
| lti::gaussian< T >::gaussian | ( | const gaussian< T > & | other | ) |
copy constructor
| other | the object to be copied |
| virtual lti::gaussian< T >::~gaussian | ( | ) | [virtual] |
destructor
| bool lti::gaussian< T >::apply | ( | const T | src, | |
| T & | dest | |||
| ) | const |
Computes the gaussian for the given scalar, and leave the result in the dest parameter.
This is a shortcut for the 1D case. If the mean and covariance given in the parameters have more the one dimension, the result will not be valid.
| src | input scalar | |
| dest | function value |
| bool lti::gaussian< T >::apply | ( | const vector< T > & | src, | |
| T & | dest | |||
| ) | const |
| virtual functor* lti::gaussian< T >::clone | ( | ) | const [virtual] |
returns a pointer to a clone of this functor.
Reimplemented from lti::mathFunction.
| gaussian& lti::gaussian< T >::copy | ( | const gaussian< T > & | other | ) |
copy data of "other" functor.
| other | the functor to be copied |
Reimplemented from lti::mathFunction.
| const parameters& lti::gaussian< T >::getParameters | ( | ) | const |
returns used parameters
Reimplemented from lti::mathFunction.
| virtual const char* lti::gaussian< T >::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("gaussian")
Reimplemented from lti::mathFunction.
| T lti::gaussian< T >::operator() | ( | const T | x | ) |
Alias for apply.
| x | input scalar |
| T lti::gaussian< T >::operator() | ( | const vector< T > & | vct | ) |
alias for apply
| vct | vector<T> with the source data. |
| gaussian& lti::gaussian< T >::operator= | ( | const gaussian< T > & | other | ) |
alias for copy member
| other | the functor to be copied |
Reimplemented from lti::mathFunction.
| void lti::gaussian< T >::setMeanAndCovariance | ( | const vector< T > & | mean, | |
| const matrix< T > & | covar | |||
| ) |
| void lti::gaussian< T >::setMeanAndVariance | ( | const T | mean, | |
| const T | variance | |||
| ) |
Shortcut to set a one dimensional gaussian with the mean value and the variance.
| virtual bool lti::gaussian< T >::updateParameters | ( | ) | [virtual] |
set functor's parameters.
This member makes a copy of theParam: the functor will keep its own copy of the parameters!
Reimplemented from lti::functor.
matrix<T> lti::gaussian< T >::invCovariance [protected] |
inverse of covariance matrix
T lti::gaussian< T >::invVarianceH [protected] |
inverse of -2 times the variance for the 1D case
T lti::gaussian< T >::mean [protected] |
mean value for the 1D case
vector<T> lti::gaussian< T >::meanVct [protected] |
mean vector
T lti::gaussian< T >::norm [protected] |
determinant of the covariance matrix