class HammingWordDistance
Definition at line 25 of file HammingWordDistance.h.

Public Member Functions | |
| CHammingWordDistance (bool use_sign) | |
| CHammingWordDistance (CStringFeatures< uint16_t > *l, CStringFeatures< uint16_t > *r, bool use_sign) | |
| virtual | ~CHammingWordDistance () |
| 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 |
| bool | use_sign |
| CHammingWordDistance | ( | bool | use_sign | ) |
constructor
| use_sign | if sign shall be used |
Definition at line 20 of file HammingWordDistance.cpp.
| CHammingWordDistance | ( | CStringFeatures< uint16_t > * | l, | |
| CStringFeatures< uint16_t > * | r, | |||
| bool | use_sign | |||
| ) |
constructor
| l | features of left-hand side | |
| r | features of right-hand side | |
| use_sign | if sign shall be used |
Definition at line 29 of file HammingWordDistance.cpp.
| ~CHammingWordDistance | ( | ) | [virtual] |
Definition at line 41 of file HammingWordDistance.cpp.
| 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
Implements CDistance.
Definition at line 58 of file HammingWordDistance.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 71 of file HammingWordDistance.h.
| virtual EDistanceType get_distance_type | ( | ) | [virtual] |
get distance type we are
Implements CDistance.
Definition at line 58 of file HammingWordDistance.h.
| virtual const char* get_name | ( | ) | const [virtual] |
get name of the distance
Implements CSGObject.
Definition at line 64 of file HammingWordDistance.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 HammingWordDistance.cpp.
int32_t dictionary_size [protected] |
size of the dictionary
Definition at line 85 of file HammingWordDistance.h.
float64_t* dictionary_weights [protected] |
dictionary weights
Definition at line 87 of file HammingWordDistance.h.
bool use_sign [protected] |
if sign shall be used
Definition at line 89 of file HammingWordDistance.h.