
Definition at line 21 of file CanberraWordDistance.h.
Public Member Functions | |
| CCanberraWordDistance () | |
| CCanberraWordDistance (CStringFeatures< uint16_t > *l, CStringFeatures< uint16_t > *r) | |
| virtual | ~CCanberraWordDistance () |
| virtual bool | init (CFeatures *l, CFeatures *r) |
| virtual void | cleanup () |
| bool | load_init (FILE *src) |
| bool | save_init (FILE *dest) |
| virtual EDistanceType | get_distance_type () |
| virtual const char * | get_name () |
| 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 |
| CCanberraWordDistance::CCanberraWordDistance | ( | ) |
default constructor
Definition at line 18 of file CanberraWordDistance.cpp.
| CCanberraWordDistance::CCanberraWordDistance | ( | CStringFeatures< uint16_t > * | l, | |
| CStringFeatures< uint16_t > * | r | |||
| ) |
constructor
| l | features of left-hand side | |
| r | features of right-hand side |
Definition at line 27 of file CanberraWordDistance.cpp.
| CCanberraWordDistance::~CCanberraWordDistance | ( | ) | [virtual] |
Definition at line 39 of file CanberraWordDistance.cpp.
init distance
| l | features of left-hand side | |
| r | features of right-hand side |
Reimplemented from CStringDistance< uint16_t >.
Definition at line 46 of file CanberraWordDistance.cpp.
| void CCanberraWordDistance::cleanup | ( | ) | [virtual] |
| bool CCanberraWordDistance::load_init | ( | FILE * | src | ) | [virtual] |
load init data from file
| src | file to load from |
Implements CDistance.
Definition at line 55 of file CanberraWordDistance.cpp.
| bool CCanberraWordDistance::save_init | ( | FILE * | dest | ) | [virtual] |
save init data to file
| dest | file to save to |
Implements CDistance.
Definition at line 60 of file CanberraWordDistance.cpp.
| virtual EDistanceType CCanberraWordDistance::get_distance_type | ( | ) | [virtual] |
get distance type we are
Implements CDistance.
Definition at line 64 of file CanberraWordDistance.h.
| virtual const char* CCanberraWordDistance::get_name | ( | ) | [virtual] |
get name of the distance
Implements CDistance.
Definition at line 70 of file CanberraWordDistance.h.
| void CCanberraWordDistance::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 77 of file CanberraWordDistance.h.
| float64_t CCanberraWordDistance::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 65 of file CanberraWordDistance.cpp.
int32_t CCanberraWordDistance::dictionary_size [protected] |
size of the dictionary
Definition at line 91 of file CanberraWordDistance.h.
float64_t* CCanberraWordDistance::dictionary_weights [protected] |
dictionary weights
Definition at line 93 of file CanberraWordDistance.h.