class CanberraMetric
The Canberra distance sums up the dissimilarity (ratios) between feature dimensions of two data points.
A summation element has range [0,1]. Note that
and
.
Definition at line 35 of file CanberraMetric.h.

Public Member Functions | |
| CCanberraMetric () | |
| CCanberraMetric (CSimpleFeatures< float64_t > *l, CSimpleFeatures< float64_t > *r) | |
| virtual | ~CCanberraMetric () |
| virtual bool | init (CFeatures *l, CFeatures *r) |
| virtual void | cleanup () |
| virtual EDistanceType | get_distance_type () |
| virtual const char * | get_name () const |
Protected Member Functions | |
| virtual float64_t | compute (int32_t idx_a, int32_t idx_b) |
| CCanberraMetric | ( | ) |
default constructor
Definition at line 20 of file CanberraMetric.cpp.
| CCanberraMetric | ( | CSimpleFeatures< float64_t > * | l, | |
| CSimpleFeatures< float64_t > * | r | |||
| ) |
constructor
| l | features of left-hand side | |
| r | features of right-hand side |
Definition at line 25 of file CanberraMetric.cpp.
| ~CCanberraMetric | ( | ) | [virtual] |
Definition at line 31 of file CanberraMetric.cpp.
| void cleanup | ( | ) | [virtual] |
cleanup distance
Implements CSimpleDistance< float64_t >.
Definition at line 43 of file CanberraMetric.cpp.
| 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
Implements CDistance.
Definition at line 47 of file CanberraMetric.cpp.
| virtual EDistanceType get_distance_type | ( | ) | [virtual] |
get distance type we are
Implements CSimpleDistance< float64_t >.
Definition at line 64 of file CanberraMetric.h.
| virtual const char* get_name | ( | ) | const [virtual] |
get name of the distance
Reimplemented from CSimpleDistance< float64_t >.
Definition at line 70 of file CanberraMetric.h.
init distance
| l | features of left-hand side | |
| r | features of right-hand side |
Reimplemented from CSimpleDistance< float64_t >.
Definition at line 36 of file CanberraMetric.cpp.