lshkit::Tail< LSH > Class Template Reference

The modulo operation on hash values. More...

#include <composite.h>

List of all members.

Public Types

typedef LSH Super
 The base LSH class.
typedef Super::Domain Domain

Public Member Functions

template<typename RNG>
void reset (const Parameter &param, RNG &rng)
template<typename RNG>
 Tail (const Parameter &param, RNG &rng)
unsigned getRange () const
unsigned operator() (Domain obj) const
template<class Archive>
void serialize (Archive &ar, const unsigned int version)

Protected Attributes

LSH lsh_
unsigned range_

Classes

struct  Parameter


Detailed Description

template<typename LSH>
class lshkit::Tail< LSH >

The modulo operation on hash values.

The mod of an LSH function by some value N is usually still locality sensitive. This can be used to limit the hash value of certain LSH, so that the hash value can be used to index a fixed-sized hash table.

Let LSH be the original class, and N be the divisor, then the parameter type is defined as

      struct Parameter {
          unsigned range;     // the divisor.
          ...                 // the original parameters are inherited.
      };
The domain is the same as the original LSH and the range is always N.


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