
Public Member Functions | |
| CMinkowskiMetric (float64_t k) | |
| CMinkowskiMetric (CRealFeatures *l, CRealFeatures *r, float64_t k) | |
| virtual | ~CMinkowskiMetric () |
| virtual bool | init (CFeatures *l, CFeatures *r) |
| virtual void | cleanup () |
| virtual bool | load_init (FILE *src) |
| virtual bool | save_init (FILE *dest) |
| virtual EDistanceType | get_distance_type () |
| virtual const char * | get_name () |
Protected Member Functions | |
| virtual float64_t | compute (int32_t idx_a, int32_t idx_b) |
Protected Attributes | |
| float64_t | k |
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 38 of file MinkowskiMetric.h.
| CMinkowskiMetric::CMinkowskiMetric | ( | float64_t | k | ) |
| CMinkowskiMetric::CMinkowskiMetric | ( | CRealFeatures * | l, | |
| CRealFeatures * | r, | |||
| float64_t | k | |||
| ) |
constructor
| l | features of left-hand side | |
| r | features of right-hand side | |
| k | parameter k |
Definition at line 23 of file MinkowskiMetric.cpp.
| CMinkowskiMetric::~CMinkowskiMetric | ( | ) | [virtual] |
Definition at line 30 of file MinkowskiMetric.cpp.
| void CMinkowskiMetric::cleanup | ( | ) | [virtual] |
| float64_t CMinkowskiMetric::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 56 of file MinkowskiMetric.cpp.
| virtual EDistanceType CMinkowskiMetric::get_distance_type | ( | ) | [virtual] |
get distance type we are
Implements CDistance.
Definition at line 84 of file MinkowskiMetric.h.
| virtual const char* CMinkowskiMetric::get_name | ( | ) | [virtual] |
get name of the distance
Implements CDistance.
Definition at line 90 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 35 of file MinkowskiMetric.cpp.
| bool CMinkowskiMetric::load_init | ( | FILE * | src | ) | [virtual] |
load init data from file
| src | file to load from |
Implements CDistance.
Definition at line 46 of file MinkowskiMetric.cpp.
| bool CMinkowskiMetric::save_init | ( | FILE * | dest | ) | [virtual] |
save init data to file
| dest | file to save to |
Implements CDistance.
Definition at line 51 of file MinkowskiMetric.cpp.
float64_t CMinkowskiMetric::k [protected] |
Definition at line 100 of file MinkowskiMetric.h.