lshkit::metric::hamming< T > Struct Template Reference

Hamming distance. More...

#include <metric.h>

Inheritance diagram for lshkit::metric::hamming< T >:

lshkit::metric::basic_hamming List of all members.

Public Member Functions

 hamming (unsigned dim)
float operator() (const T *first1, const T *first2) const

Public Attributes

unsigned dim_

Detailed Description

template<typename T>
struct lshkit::metric::hamming< T >

Hamming distance.

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.


The documentation for this struct was generated from the following file:
Get LSHKIT at SourceForge.net. Fast, secure and Free Open Source software downloads doxygen