RobWorkProject  24.5.15-
Public Member Functions | List of all members
MahalanobisMetric< T > Class Template Reference

Mahalanobis distance metric for vector types. More...

#include <MetricFactory.hpp>

Inherits Metric< T >.

Public Member Functions

 MahalanobisMetric (const BaseM &omega)
 Constructs Mahalanobis metric object with the specified weights. More...
 
- Public Member Functions inherited from Metric< T >
virtual ~Metric ()
 Destructor.
 
scalar_type distance (const value_type &q) const
 The distance from the zero element to q.
 
scalar_type distance (const value_type &a, const value_type &b) const
 The distance from element a to b. More...
 
int size () const
 The dimension of elements on which this metric operates. More...
 

Additional Inherited Members

- Public Types inherited from Metric< T >
typedef T value_type
 The type of element on which the metric operates.
 
typedef T::value_type scalar_type
 The type of the scalar.
 
typedef rw::core::Ptr< Metric< T > > Ptr
 A pointer to a Metric<T>.
 
typedef rw::core::Ptr< const Metric< T > > CPtr
 A pointer to a const Metric<T>.
 
- Protected Member Functions inherited from Metric< T >
 Metric ()
 Protected constructor called by subclassed.
 
 Metric (const Metric &)
 Disable copying of superclass.
 
Metricoperator= (const Metric &)
 Disable assignment of superclass.
 

Detailed Description

template<class T>
class rw::math::MahalanobisMetric< T >

Mahalanobis distance metric for vector types.

The Mahalonabis distance between two vectors \(\mathbf{a}\) and \(\mathbf{b}\) both in \(\mathbb{R}^n\) are defined as \(d=\sqrt{(\mathbf{a}-\mathbf{b})^T \mathbf{\Omega} (\mathbf{a}-\mathbf{b})}\) where \(\mathbf{\Omega}\in \mathbb{R}^{n\times n}\).

Constructor & Destructor Documentation

◆ MahalanobisMetric()

MahalanobisMetric ( const BaseM &  omega)
inline

Constructs Mahalanobis metric object with the specified weights.

Parameters
omega[in] the weights \(\mathbf{\Omega}\)

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