Inheritance diagram for lshkit::metric::hamming< T >:
Public Member Functions
|hamming (unsigned dim)|
|float||operator() (const T *first1, const T *first2) const|
Take the hamming distance between two bit-vectors, represented as arrays of some basic type. The parameter dim is the size of the bit-vectors in terms of the number of basic types. For example, if we use uchar_t as basic type, then the dim of a 256-bit vector is 256/8 = 32.