Public Types | Static Public Member Functions | List of all members
vpdt_norm_metric< F, typename vpdt_field_traits< F >::vector_type, typename vpdt_field_traits< F >::type_is_vector > Struct Template Reference

A metric in field F with vector (diagonal matrix) covariance. More...

#include <vpdt_norm_metric.h>

Public Types

typedef vpdt_field_traits< F >::vector_type covar_type
 the data type used for the metric tensor. More...
 
typedef vpdt_field_traits< F >::scalar_type T
 the data type used for scalars. More...
 
typedef vpdt_field_traits< F >::vector_type vector
 the data type used for vectors. More...
 
typedef vpdt_field_traits< F >::matrix_type matrix
 the data type used for matrices. More...
 

Static Public Member Functions

static T distance (const F &pt1, const F &pt2, const covar_type &c)
 Compute the Mahalanobis distance between two points. More...
 
static T sqr_distance (const F &pt1, const F &pt2, const covar_type &c)
 Compute the square Mahalanobis distance between two points. More...
 
static T sqr_distance_deriv (const F &pt1, const F &pt2, const covar_type &c, vector &g)
 Compute the square Mahalanobis distance and also the derivative g wrt pt1. More...
 
static void compute_covar (matrix &covar, const F &, const covar_type &c)
 Compute the covariance matrix (metric tensor) at a point. More...
 
static T covar_det (const F &pt, const covar_type &c)
 Compute the determinant of the covariance matrix (metric tensor) at a point. More...
 

Detailed Description

template<class F>
struct vpdt_norm_metric< F, typename vpdt_field_traits< F >::vector_type, typename vpdt_field_traits< F >::type_is_vector >

A metric in field F with vector (diagonal matrix) covariance.

In this case each dimension is independent

Definition at line 93 of file vpdt_norm_metric.h.

Member Typedef Documentation

◆ covar_type

template<class F >
typedef vpdt_field_traits<F>::vector_type vpdt_norm_metric< F, typename vpdt_field_traits< F >::vector_type, typename vpdt_field_traits< F >::type_is_vector >::covar_type

the data type used for the metric tensor.

Definition at line 97 of file vpdt_norm_metric.h.

◆ matrix

template<class F >
typedef vpdt_field_traits<F>::matrix_type vpdt_norm_metric< F, typename vpdt_field_traits< F >::vector_type, typename vpdt_field_traits< F >::type_is_vector >::matrix

the data type used for matrices.

Definition at line 103 of file vpdt_norm_metric.h.

◆ T

template<class F >
typedef vpdt_field_traits<F>::scalar_type vpdt_norm_metric< F, typename vpdt_field_traits< F >::vector_type, typename vpdt_field_traits< F >::type_is_vector >::T

the data type used for scalars.

Definition at line 99 of file vpdt_norm_metric.h.

◆ vector

template<class F >
typedef vpdt_field_traits<F>::vector_type vpdt_norm_metric< F, typename vpdt_field_traits< F >::vector_type, typename vpdt_field_traits< F >::type_is_vector >::vector

the data type used for vectors.

Definition at line 101 of file vpdt_norm_metric.h.

Member Function Documentation

◆ compute_covar()

template<class F >
static void vpdt_norm_metric< F, typename vpdt_field_traits< F >::vector_type, typename vpdt_field_traits< F >::type_is_vector >::compute_covar ( matrix covar,
const F &  ,
const covar_type c 
)
inlinestatic

Compute the covariance matrix (metric tensor) at a point.

Note
this metric is independent of the point

Definition at line 147 of file vpdt_norm_metric.h.

◆ covar_det()

template<class F >
static T vpdt_norm_metric< F, typename vpdt_field_traits< F >::vector_type, typename vpdt_field_traits< F >::type_is_vector >::covar_det ( const F &  pt,
const covar_type c 
)
inlinestatic

Compute the determinant of the covariance matrix (metric tensor) at a point.

Note
this metric is independent of the point

Definition at line 162 of file vpdt_norm_metric.h.

◆ distance()

template<class F >
static T vpdt_norm_metric< F, typename vpdt_field_traits< F >::vector_type, typename vpdt_field_traits< F >::type_is_vector >::distance ( const F &  pt1,
const F &  pt2,
const covar_type c 
)
inlinestatic

Compute the Mahalanobis distance between two points.

Definition at line 106 of file vpdt_norm_metric.h.

◆ sqr_distance()

template<class F >
static T vpdt_norm_metric< F, typename vpdt_field_traits< F >::vector_type, typename vpdt_field_traits< F >::type_is_vector >::sqr_distance ( const F &  pt1,
const F &  pt2,
const covar_type c 
)
inlinestatic

Compute the square Mahalanobis distance between two points.

Definition at line 112 of file vpdt_norm_metric.h.

◆ sqr_distance_deriv()

template<class F >
static T vpdt_norm_metric< F, typename vpdt_field_traits< F >::vector_type, typename vpdt_field_traits< F >::type_is_vector >::sqr_distance_deriv ( const F &  pt1,
const F &  pt2,
const covar_type c,
vector g 
)
inlinestatic

Compute the square Mahalanobis distance and also the derivative g wrt pt1.

Definition at line 127 of file vpdt_norm_metric.h.


The documentation for this struct was generated from the following file: