class ManhattanWordDistance
Definition at line 23 of file ManhattanWordDistance.h.
Public Member Functions | |
CManhattanWordDistance () | |
CManhattanWordDistance (CStringFeatures< uint16_t > *l, CStringFeatures< uint16_t > *r) | |
virtual | ~CManhattanWordDistance () |
virtual bool | init (CFeatures *l, CFeatures *r) |
virtual void | cleanup () |
virtual EDistanceType | get_distance_type () |
virtual const char * | get_name () const |
void | get_dictionary (int32_t &dsize, float64_t *&dweights) |
Protected Member Functions | |
float64_t | compute (int32_t idx_a, int32_t idx_b) |
Protected Attributes | |
int32_t | dictionary_size |
float64_t * | dictionary_weights |
default constructor
Definition at line 20 of file ManhattanWordDistance.cpp.
CManhattanWordDistance | ( | CStringFeatures< uint16_t > * | l, | |
CStringFeatures< uint16_t > * | r | |||
) |
constructor
l | features of left-hand side | |
r | features of right-hand side |
Definition at line 29 of file ManhattanWordDistance.cpp.
~CManhattanWordDistance | ( | ) | [virtual] |
Definition at line 41 of file ManhattanWordDistance.cpp.
void cleanup | ( | ) | [virtual] |
float64_t compute | ( | int32_t | idx_a, | |
int32_t | idx_b | |||
) | [protected, virtual] |
compute distance function 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 ManhattanWordDistance.cpp.
void get_dictionary | ( | int32_t & | dsize, | |
float64_t *& | dweights | |||
) |
get dictionary weights
dsize | size of the dictionary | |
dweights | dictionary weights are stored in here |
Definition at line 65 of file ManhattanWordDistance.h.
virtual EDistanceType get_distance_type | ( | ) | [virtual] |
get distance type we are
Implements CDistance.
Definition at line 52 of file ManhattanWordDistance.h.
virtual const char* get_name | ( | ) | const [virtual] |
get name of the distance
Implements CSGObject.
Definition at line 58 of file ManhattanWordDistance.h.
init distance
l | features of left-hand side | |
r | features of right-hand side |
Reimplemented from CStringDistance< uint16_t >.
Definition at line 48 of file ManhattanWordDistance.cpp.
int32_t dictionary_size [protected] |
size of the dictionary
Definition at line 79 of file ManhattanWordDistance.h.
float64_t* dictionary_weights [protected] |
dictionary weights
Definition at line 81 of file ManhattanWordDistance.h.