class MinkowskiMetric
The Minkowski metric is one general class of metrics for a
feature space also referred as the
norm.
special cases:
norm: Manhattan distance
norm: Euclidean distance
.Definition at line 40 of file MinkowskiMetric.h.

Public Member Functions | |
| CMinkowskiMetric () | |
| 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 |
Protected Member Functions | |
| virtual float64_t | compute (int32_t idx_a, int32_t idx_b) |
Protected Attributes | |
| float64_t | k |
| CMinkowskiMetric | ( | ) |
default constructor
Definition at line 23 of file MinkowskiMetric.cpp.
| CMinkowskiMetric | ( | float64_t | k | ) |
| CMinkowskiMetric | ( | CSimpleFeatures< float64_t > * | l, | |
| CSimpleFeatures< float64_t > * | r, | |||
| float64_t | k | |||
| ) |
constructor
| l | features of left-hand side | |
| r | features of right-hand side | |
| k | parameter k |
Definition at line 35 of file MinkowskiMetric.cpp.
| ~CMinkowskiMetric | ( | ) | [virtual] |
Definition at line 44 of file MinkowskiMetric.cpp.
| void cleanup | ( | ) | [virtual] |
cleanup distance
Implements CSimpleDistance< float64_t >.
Definition at line 54 of file MinkowskiMetric.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 58 of file MinkowskiMetric.cpp.
| virtual EDistanceType get_distance_type | ( | ) | [virtual] |
get distance type we are
Implements CSimpleDistance< float64_t >.
Definition at line 75 of file MinkowskiMetric.h.
| virtual const char* get_name | ( | ) | const [virtual] |
get name of the distance
Reimplemented from CSimpleDistance< float64_t >.
Definition at line 81 of file MinkowskiMetric.h.
constructor
| l | features of left-hand side | |
| r | features of right-hand side |
Reimplemented from CSimpleDistance< float64_t >.
Definition at line 49 of file MinkowskiMetric.cpp.
parameter k
Definition at line 94 of file MinkowskiMetric.h.