|
latest version v1.9 - last update 10 Apr 2010 |
|
This class computes the mahalanobis distance. More...
#include <ltiMahalanobisDistance.h>


Public Member Functions | |
| mahalanobisDistance () | |
| mahalanobisDistance (const mahalanobisDistance &other) | |
| virtual | ~mahalanobisDistance () |
| virtual const char * | getTypeName () const |
| bool | apply (const dvector &p1, const dvector &p2, const dmatrix &coV, double &distance) const |
| double | apply (const dvector &p1, const dvector &p2, const dmatrix &coV) const |
| bool | apply (const dvector &p1, const dmatrix &cluster, double &distance) const |
| double | apply (const dvector &p1, const dmatrix &cluster) const |
| mahalanobisDistance & | copy (const mahalanobisDistance &other) |
| mahalanobisDistance & | operator= (const mahalanobisDistance &other) |
| virtual functor * | clone () const |
| const parameters & | getParameters () const |
This class computes the mahalanobis distance.
The distance can either be computed as distance between a point and a matrix with a distribution or direct from two points and a given covariance matrix, where one point is expected to be the mean of the distribution.
The mahalanobis distance is defined as follows:
where
is the covariance matrix of the distribution.
| lti::mahalanobisDistance::mahalanobisDistance | ( | ) |
default constructor
| lti::mahalanobisDistance::mahalanobisDistance | ( | const mahalanobisDistance & | other | ) |
copy constructor
| other | the object to be copied |
| virtual lti::mahalanobisDistance::~mahalanobisDistance | ( | ) | [virtual] |
destructor
computes the mahalanobis distance between the point p1 and the given distribution
| p1 | the point whose distance to the distribution is computed. | |
| cluster | the mean of the distribution . |
| bool lti::mahalanobisDistance::apply | ( | const dvector & | p1, | |
| const dmatrix & | cluster, | |||
| double & | distance | |||
| ) | const |
computes the mahalanobis distance between the point p1 and the given distribution
| p1 | the point whose distance to the distribution is computed. | |
| cluster | the distribution. | |
| distance | the mahalanobis distance. |
| double lti::mahalanobisDistance::apply | ( | const dvector & | p1, | |
| const dvector & | p2, | |||
| const dmatrix & | coV | |||
| ) | const |
computes the mahalanobis distance between the point p1 and the given distribution
| p1 | the point whose distance to the distribution is computed. | |
| p2 | the mean of the distribution . | |
| coV | the covarianz matrix of the distribution . |
| bool lti::mahalanobisDistance::apply | ( | const dvector & | p1, | |
| const dvector & | p2, | |||
| const dmatrix & | coV, | |||
| double & | distance | |||
| ) | const |
computes the mahalanobis distance between the point p1 and the given distribution
| p1 | the point whose distance to the distribution is computed. | |
| p2 | the mean of the distribution . | |
| coV | the covarianz matrix of the distribution . | |
| distance | the mahalanobis distance. |
| virtual functor* lti::mahalanobisDistance::clone | ( | ) | const [virtual] |
returns a pointer to a clone of this functor.
Implements lti::functor.
| mahalanobisDistance& lti::mahalanobisDistance::copy | ( | const mahalanobisDistance & | other | ) |
copy data of "other" functor.
| other | the functor to be copied |
Reimplemented from lti::functor.
| const parameters& lti::mahalanobisDistance::getParameters | ( | ) | const |
returns used parameters
Reimplemented from lti::functor.
| virtual const char* lti::mahalanobisDistance::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("mahalanobisDistance")
Reimplemented from lti::linearAlgebraFunctor.
| mahalanobisDistance& lti::mahalanobisDistance::operator= | ( | const mahalanobisDistance & | other | ) |