公有成员 | 保护成员 | 保护属性

CMinkowskiMetric类参考


详细描述

class MinkowskiMetric

The Minkowski metric is one general class of metrics for a $\displaystyle R^{n}$ feature space also referred as the $\displaystyle L_{k} $ norm.

\[ \displaystyle d(\bf{x},\bf{x'}) = (\sum_{i=1}^{n} |\bf{x_{i}}-\bf{x'_{i}}|^{k})^{\frac{1}{k}} \quad x,x' \in R^{n} \]

special cases:

  1. $\displaystyle L_{1} $ norm: Manhattan distance
    参见:
    CManhattanMetric
  2. $\displaystyle L_{2} $ norm: Euclidean distance
    参见:
    CEuclidianDistance
    Note that the Minkowski distance tends to the Chebyshew distance for increasing $k$.
参见:
Wikipedia: Distance

在文件MinkowskiMetric.h40行定义。

继承图,类CMinkowskiMetric
Inheritance graph
[图例]

所有成员的列表。

公有成员

 CMinkowskiMetric (float64_t k)
 CMinkowskiMetric (CSimpleFeatures< float64_t > *l, CSimpleFeatures< float64_t > *r, float64_t k)
virtual ~CMinkowskiMetric ()
virtual bool init (CFeatures *l, CFeatures *r)
virtual void cleanup ()
virtual EDistanceType get_distance_type ()
virtual const char * get_name () const

保护成员

virtual float64_t compute (int32_t idx_a, int32_t idx_b)

保护属性

float64_t k

构造及析构函数文档

constructor

参数:
kparameter k

在文件MinkowskiMetric.cpp20行定义。

constructor

参数:
lfeatures of left-hand side
rfeatures of right-hand side
kparameter k

在文件MinkowskiMetric.cpp25行定义。

~CMinkowskiMetric (  ) [virtual]

在文件MinkowskiMetric.cpp32行定义。


成员函数文档

void cleanup (  ) [virtual]

cleanup distance

实现了CDistance

在文件MinkowskiMetric.cpp44行定义。

float64_t compute ( int32_t  idx_a,
int32_t  idx_b 
) [protected, virtual]

compute distance for features a and b idx_{a,b} denote the index of the feature vectors in the corresponding feature object

实现了CDistance

在文件MinkowskiMetric.cpp48行定义。

virtual EDistanceType get_distance_type (  ) [virtual]

get distance type we are

返回:
distance type MINKOWSKI

实现了CDistance

在文件MinkowskiMetric.h72行定义。

virtual const char* get_name (  ) const [virtual]

get name of the distance

返回:
name Minkowski-Metric

实现了CSGObject

在文件MinkowskiMetric.h78行定义。

bool init ( CFeatures l,
CFeatures r 
) [virtual]

constructor

参数:
lfeatures of left-hand side
rfeatures of right-hand side

重载CSimpleDistance< float64_t >

在文件MinkowskiMetric.cpp37行定义。


成员数据文档

float64_t k [protected]

parameter k

在文件MinkowskiMetric.h88行定义。


该类的文档由以下文件生成:

SHOGUN Machine Learning Toolbox - Documentation