#include <sketch.h>
| Public Member Functions | |
| WeightedHammingHelper (unsigned chunks) | |
| Constructor. | |
| void | update (const CHUNK *in, const float *asym) | 
| Update the information of the query point. | |
| float | distTo (const CHUNK *in) | 
| Calculate the distance between the saved query point to an incoming point. | |
| Static Public Attributes | |
| static const unsigned | CHUNK_BIT = sizeof(CHUNK) * 8 | 
A helper class to accelerate weighted hamming distance calculation by using a lookup table. Weighted hamming distance is used in asymmetric distance evaluation between a sketch and a query point. A instance of this class holds the information of a single query point, and can be used to estimate the distance from the query point to different sketches in the database. The construction of such a helper instance is costly, so once constructed, you need to use it as many times as possible to lower the amortized cost.
| lshkit::WeightedHammingHelper< CHUNK >::WeightedHammingHelper | ( | unsigned | chunks | ) |  [inline] | 
Constructor.
| chunks | number of chunks in sketch. | 
| void lshkit::WeightedHammingHelper< CHUNK >::update | ( | const CHUNK * | in, | |
| const float * | asym | |||
| ) |  [inline] | 
Update the information of the query point.
| in | sketch of the query point. | |
| asym | weights, the output of Sketch::apply. | 
