Definition at line 21 of file CanberraWordDistance.h.
Public Member Functions | |
CCanberraWordDistance () | |
CCanberraWordDistance (CStringFeatures< WORD > *l, CStringFeatures< WORD > *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 (INT &dsize, DREAL *&dweights) |
virtual EFeatureClass | get_feature_class () |
virtual EFeatureType | get_feature_type () |
template<> | |
EFeatureType | get_feature_type () |
template<> | |
EFeatureType | get_feature_type () |
template<> | |
EFeatureType | get_feature_type () |
template<> | |
EFeatureType | get_feature_type () |
template<> | |
EFeatureType | get_feature_type () |
template<> | |
EFeatureType | get_feature_type () |
template<> | |
EFeatureType | get_feature_type () |
DREAL | distance (INT idx_a, INT idx_b) |
void | get_distance_matrix (DREAL **dst, INT *m, INT *n) |
virtual DREAL * | get_distance_matrix_real (int &m, int &n, DREAL *target) |
virtual SHORTREAL * | get_distance_matrix_shortreal (int &m, int &n, SHORTREAL *target) |
bool | load (CHAR *fname) |
bool | save (CHAR *fname) |
CFeatures * | get_lhs () |
CFeatures * | get_rhs () |
virtual void | remove_lhs () |
takes all necessary steps if the lhs is removed from distance matrix | |
virtual void | remove_rhs () |
takes all necessary steps if the rhs is removed from distance matrix | |
bool | get_precompute_matrix () |
virtual void | set_precompute_matrix (bool flag) |
Static Public Attributes | |
static CParallel | parallel |
static CIO | io |
static CVersion | version |
Protected Member Functions | |
DREAL | compute (INT idx_a, INT idx_b) |
void | do_precompute_matrix () |
matrix precomputation | |
Protected Attributes | |
INT | dictionary_size |
DREAL * | dictionary_weights |
SHORTREAL * | precomputed_matrix |
bool | precompute_matrix |
CFeatures * | lhs |
feature vectors to occur on left hand side | |
CFeatures * | rhs |
feature vectors to occur on right hand side |
CCanberraWordDistance::CCanberraWordDistance | ( | ) |
default constructor
Definition at line 18 of file CanberraWordDistance.cpp.
CCanberraWordDistance::CCanberraWordDistance | ( | CStringFeatures< WORD > * | l, | |
CStringFeatures< WORD > * | 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 38 of file CanberraWordDistance.cpp.
init distance
l | features of left-hand side | |
r | features of right-hand side |
Reimplemented from CStringDistance< ST >.
Definition at line 45 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 54 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 59 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.
get dictionary weights
dsize | size of the dictionary | |
dweights | dictionary weights are stored in here |
Definition at line 77 of file CanberraWordDistance.h.
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 64 of file CanberraWordDistance.cpp.
virtual EFeatureClass CStringDistance< ST >::get_feature_class | ( | ) | [virtual, inherited] |
get feature class the distance can deal with
Implements CDistance.
Definition at line 48 of file StringDistance.h.
virtual EFeatureType CStringDistance< ST >::get_feature_type | ( | ) | [virtual, inherited] |
get feature type the distance can deal with
Implements CDistance.
EFeatureType CStringDistance< DREAL >::get_feature_type | ( | ) | [virtual, inherited] |
get feature type the DREAL distance can deal with
Implements CDistance.
Definition at line 61 of file StringDistance.h.
EFeatureType CStringDistance< ULONG >::get_feature_type | ( | ) | [virtual, inherited] |
get feature type the ULONG distance can deal with
Implements CDistance.
Definition at line 67 of file StringDistance.h.
EFeatureType CStringDistance< INT >::get_feature_type | ( | ) | [virtual, inherited] |
get feature type the INT distance can deal with
Implements CDistance.
Definition at line 73 of file StringDistance.h.
EFeatureType CStringDistance< WORD >::get_feature_type | ( | ) | [virtual, inherited] |
get feature type the WORD distance can deal with
Implements CDistance.
Definition at line 79 of file StringDistance.h.
EFeatureType CStringDistance< SHORT >::get_feature_type | ( | ) | [virtual, inherited] |
get feature type the SHORT distance can deal with
Implements CDistance.
Definition at line 85 of file StringDistance.h.
EFeatureType CStringDistance< BYTE >::get_feature_type | ( | ) | [virtual, inherited] |
get feature type the BYTE distance can deal with
Implements CDistance.
Definition at line 91 of file StringDistance.h.
EFeatureType CStringDistance< CHAR >::get_feature_type | ( | ) | [virtual, inherited] |
get feature type the CHAR distance can deal with
Implements CDistance.
Definition at line 97 of file StringDistance.h.
get distance function for lhs feature vector a and rhs feature vector b
idx_a | feature vector a at idx_a | |
idx_b | feature vector b at idx_b |
Definition at line 45 of file Distance.h.
get distance matrix
dst | distance matrix is stored in here | |
m | dimension m of matrix is stored in here | |
n | dimension n of matrix is stored in here |
Definition at line 143 of file Distance.cpp.
DREAL * CDistance::get_distance_matrix_real | ( | int & | m, | |
int & | n, | |||
DREAL * | target | |||
) | [virtual, inherited] |
get distance matrix real
m | dimension m | |
n | dimension n | |
target | target matrix |
Definition at line 278 of file Distance.cpp.
SHORTREAL * CDistance::get_distance_matrix_shortreal | ( | int & | m, | |
int & | n, | |||
SHORTREAL * | target | |||
) | [virtual, inherited] |
get distance matrix short real
m | dimension m | |
n | dimension n | |
target | target matrix |
Definition at line 210 of file Distance.cpp.
bool CDistance::load | ( | CHAR * | fname | ) | [inherited] |
load distance matrix from file
fname | filename to load from |
Definition at line 69 of file Distance.cpp.
bool CDistance::save | ( | CHAR * | fname | ) | [inherited] |
save distance matrix to file
fname | filename to save to |
Definition at line 74 of file Distance.cpp.
CFeatures* CDistance::get_lhs | ( | ) | [inherited] |
get left-hand side features used in distance matrix
Definition at line 157 of file Distance.h.
CFeatures* CDistance::get_rhs | ( | ) | [inherited] |
get right-hand side features used in distance matrix
Definition at line 163 of file Distance.h.
void CDistance::remove_lhs | ( | ) | [virtual, inherited] |
takes all necessary steps if the lhs is removed from distance matrix
Definition at line 105 of file Distance.cpp.
void CDistance::remove_rhs | ( | ) | [virtual, inherited] |
takes all necessary steps if the rhs is removed from distance matrix
takes all necessary steps if the rhs is removed from kernel
Definition at line 112 of file Distance.cpp.
bool CDistance::get_precompute_matrix | ( | ) | [inherited] |
FIXME: precompute matrix should be dropped, handling should be via customdistance
Definition at line 209 of file Distance.h.
virtual void CDistance::set_precompute_matrix | ( | bool | flag | ) | [virtual, inherited] |
FIXME: precompute matrix should be dropped, handling should be via customdistance
flag | if precompute_matrix |
Definition at line 216 of file Distance.h.
void CDistance::do_precompute_matrix | ( | ) | [protected, inherited] |
INT CCanberraWordDistance::dictionary_size [protected] |
size of the dictionary
Definition at line 91 of file CanberraWordDistance.h.
DREAL* CCanberraWordDistance::dictionary_weights [protected] |
dictionary weights
Definition at line 93 of file CanberraWordDistance.h.
SHORTREAL* CDistance::precomputed_matrix [protected, inherited] |
FIXME: precompute matrix should be dropped, handling should be via customdistance
Definition at line 240 of file Distance.h.
bool CDistance::precompute_matrix [protected, inherited] |
FIXME: precompute matrix should be dropped, handling should be via customdistance
Definition at line 245 of file Distance.h.
CFeatures* CDistance::lhs [protected, inherited] |
CFeatures* CDistance::rhs [protected, inherited] |
CParallel CSGObject::parallel [static, inherited] |
Definition at line 105 of file SGObject.h.
CIO CSGObject::io [static, inherited] |
Definition at line 106 of file SGObject.h.
CVersion CSGObject::version [static, inherited] |
Definition at line 107 of file SGObject.h.