Gaia
gaia2::KullbackLeiblerDistance Class Reference

This class computes the symmetric Kullback-Leibler distance of a given Region. More...

#include <kullbackleiblerdistance.h>

Inheritance diagram for gaia2::KullbackLeiblerDistance:
gaia2::DistanceFunction

Public Member Functions

 KullbackLeiblerDistance (const PointLayout &layout, const ParameterMap &params)
 
Real operator() (const Point &p1, const Point &p2, int seg1, int seg2) const
 This function computes the distance between the two given points. More...
 
- Public Member Functions inherited from gaia2::DistanceFunction
 DistanceFunction (const PointLayout &layout, const ParameterMap &params)
 
const PointLayoutlayout () const
 
const RegioncheckFixedLength (const Region &region) const
 Checks that the given Region only contains fixed-length descriptors and throws an exception if not. More...
 

Protected Attributes

int _meanIdx
 
int _covIdx
 
int _icovIdx
 
int _meanIdxEnd
 
int _covIdxEnd
 
int _icovIdxEnd
 
- Protected Attributes inherited from gaia2::DistanceFunction
PointLayout _layout
 
ParameterMap _params
 
Region _region
 

Additional Inherited Members

- Public Attributes inherited from gaia2::DistanceFunction
QString name
 Name for the metric, usually the key that was used to instantiate it from the factory.
 
QStringList validParams
 List of valid parameters this analyzer accepts. More...
 

Detailed Description

This class computes the symmetric Kullback-Leibler distance of a given Region.

Parameters
descriptorNamethe name of the descriptor for which you want to compute the KL-distance. This descriptor needs to have 3 sub-descriptors: mean, cov, and icov. (representing, resp., the mean of the frames, the covariance matrix, and the inverse of the covariance matrix.

Member Function Documentation

Real KullbackLeiblerDistance::operator() ( const Point p1,
const Point p2,
int  seg1,
int  seg2 
) const
virtual

This function computes the distance between the two given points.

It needs to be implemented in each subclass. It takes as optional arguments the number of the segments on which to operate.

Implements gaia2::DistanceFunction.

References gaia2::traceMatrixProduct(), and gaia2::traceMatrixProductMean().


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