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

CEuclidianDistance类参考


详细描述

class EuclidianDistance

The familiar Euclidian distance for real valued features computes the square root of the sum of squared disparity between the corresponding feature dimensions of two data points.

\[\displaystyle d({\bf x},{\bf x'})= \sqrt{\sum_{i=0}^{n}|{\bf x_i}-{\bf x'_i}|^2} \]

This special case of Minkowski metric is invariant to an arbitrary translation or rotation in feature space.

The Euclidian Squared distance does not take the square root:

\[\displaystyle d({\bf x},{\bf x'})= \sum_{i=0}^{n}|{\bf x_i}-{\bf x'_i}|^2 \]

参见:
CMinkowskiMetric
Wikipedia: Distance in Euclidean space

在文件EuclidianDistance.h43行定义。

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

所有成员的列表。

公有成员

 CEuclidianDistance ()
 CEuclidianDistance (CSimpleFeatures< float64_t > *l, CSimpleFeatures< float64_t > *r)
virtual ~CEuclidianDistance ()
virtual bool init (CFeatures *l, CFeatures *r)
virtual void cleanup ()
virtual EDistanceType get_distance_type ()
virtual EFeatureType get_feature_type ()
virtual const char * get_name () const
virtual bool get_disable_sqrt ()
virtual void set_disable_sqrt (bool state)

保护成员

virtual float64_t compute (int32_t idx_a, int32_t idx_b)

保护属性

float64_t scale
bool disable_sqrt

构造及析构函数文档

default constructor

在文件EuclidianDistance.cpp19行定义。

constructor

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

在文件EuclidianDistance.cpp25行定义。

~CEuclidianDistance (  ) [virtual]

在文件EuclidianDistance.cpp32行定义。


成员函数文档

void cleanup (  ) [virtual]

cleanup distance

实现了CDistance

在文件EuclidianDistance.cpp44行定义。

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

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

实现了CDistance

在文件EuclidianDistance.cpp48行定义。

virtual bool get_disable_sqrt (  ) [virtual]

disable application of sqrt on matrix computation the matrix can then also be named norm squared

返回:
if application of sqrt is disabled

在文件EuclidianDistance.h91行定义。

virtual EDistanceType get_distance_type (  ) [virtual]

get distance type we are

返回:
distance type EUCLIDIAN

实现了CDistance

在文件EuclidianDistance.h72行定义。

virtual EFeatureType get_feature_type (  ) [virtual]

get feature type the distance can deal with

返回:
feature type DREAL

重载CRealDistance

在文件EuclidianDistance.h78行定义。

virtual const char* get_name (  ) const [virtual]

get name of the distance

返回:
name Euclidian

实现了CSGObject

在文件EuclidianDistance.h84行定义。

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

init distance

参数:
lfeatures of left-hand side
rfeatures of right-hand side
返回:
if init was successful

重载CRealDistance

在文件EuclidianDistance.cpp37行定义。

virtual void set_disable_sqrt ( bool  state ) [virtual]

disable application of sqrt on matrix computation the matrix can then also be named norm squared

参数:
statenew disable_sqrt

在文件EuclidianDistance.h98行定义。


成员数据文档

bool disable_sqrt [protected]

if application of sqrt on matrix computation is disabled

在文件EuclidianDistance.h111行定义。

float64_t scale [protected]

applied scaling factor

在文件EuclidianDistance.h109行定义。


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

SHOGUN Machine Learning Toolbox - Documentation