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.
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:
在文件EuclidianDistance.h第43行定义。
公有成员 | |
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.cpp第19行定义。
CEuclidianDistance | ( | CSimpleFeatures< float64_t > * | l, | |
CSimpleFeatures< float64_t > * | r | |||
) |
constructor
l | features of left-hand side | |
r | features of right-hand side |
在文件EuclidianDistance.cpp第25行定义。
~CEuclidianDistance | ( | ) | [virtual] |
在文件EuclidianDistance.cpp第32行定义。
void cleanup | ( | ) | [virtual] |
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.cpp第48行定义。
virtual bool get_disable_sqrt | ( | ) | [virtual] |
disable application of sqrt on matrix computation the matrix can then also be named norm squared
在文件EuclidianDistance.h第91行定义。
virtual EDistanceType get_distance_type | ( | ) | [virtual] |
virtual EFeatureType get_feature_type | ( | ) | [virtual] |
virtual const char* get_name | ( | ) | const [virtual] |
init distance
l | features of left-hand side | |
r | features of right-hand side |
在文件EuclidianDistance.cpp第37行定义。
virtual void set_disable_sqrt | ( | bool | state | ) | [virtual] |
disable application of sqrt on matrix computation the matrix can then also be named norm squared
state | new disable_sqrt |
在文件EuclidianDistance.h第98行定义。
bool disable_sqrt [protected] |
if application of sqrt on matrix computation is disabled
在文件EuclidianDistance.h第111行定义。
applied scaling factor
在文件EuclidianDistance.h第109行定义。