Public Member Functions | |
CTanimotoDistance () | |
CTanimotoDistance (CRealFeatures *l, CRealFeatures *r) | |
virtual | ~CTanimotoDistance () |
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) |
The Tanimoto distance/coefficient (extended Jaccard coefficient) is obtained by extending the cosine similarity.
Definition at line 33 of file TanimotoDistance.h.
CTanimotoDistance::CTanimotoDistance | ( | ) |
default constructor
Definition at line 18 of file TanimotoDistance.cpp.
CTanimotoDistance::CTanimotoDistance | ( | CRealFeatures * | l, | |
CRealFeatures * | r | |||
) |
constructor
l | features of left-hand side | |
r | features of right-hand side |
Definition at line 23 of file TanimotoDistance.cpp.
CTanimotoDistance::~CTanimotoDistance | ( | ) | [virtual] |
Definition at line 29 of file TanimotoDistance.cpp.
void CTanimotoDistance::cleanup | ( | ) | [virtual] |
float64_t CTanimotoDistance::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 55 of file TanimotoDistance.cpp.
virtual EDistanceType CTanimotoDistance::get_distance_type | ( | ) | [virtual] |
get distance type we are
Implements CDistance.
Definition at line 76 of file TanimotoDistance.h.
virtual const char* CTanimotoDistance::get_name | ( | ) | [virtual] |
get name of the distance
Implements CDistance.
Definition at line 82 of file TanimotoDistance.h.
init distance
l | features of left-hand side | |
r | features of right-hand side |
Reimplemented from CSimpleDistance< float64_t >.
Definition at line 34 of file TanimotoDistance.cpp.
bool CTanimotoDistance::load_init | ( | FILE * | src | ) | [virtual] |
load init data from file
src | file to load from |
Implements CDistance.
Definition at line 45 of file TanimotoDistance.cpp.
bool CTanimotoDistance::save_init | ( | FILE * | dest | ) | [virtual] |
save init data to file
dest | file to save to |
Implements CDistance.
Definition at line 50 of file TanimotoDistance.cpp.