lshkit::MultiProbeLshIndex< KEY > Class Template Reference

Multi-Probe LSH index. More...

#include <mplsh.h>

Inheritance diagram for lshkit::MultiProbeLshIndex< KEY >:

lshkit::LshIndex< LSH, KEY > List of all members.

Public Types

typedef LshIndex< MultiProbeLsh,
KEY > 
Super
typedef Super::Parameter Parameter
typedef Super::Domain Domain
typedef KEY Key

Public Member Functions

 MultiProbeLshIndex ()
 Constructor.
template<typename Engine>
void init (const Parameter &param, Engine &engine, unsigned L)
 Initialize MPLSH.
void load (std::istream &ar)
 Load the index from stream.
void save (std::ostream &ar)
 Save to the index to stream.
template<typename SCANNER>
void query (Domain obj, unsigned T, SCANNER &scanner)
 Query for K-NNs.
template<typename SCANNER>
void query_recall (Domain obj, float recall, SCANNER &scanner) const
 Query for K-NNs, try to achieve the given recall by adaptive probing.

Detailed Description

template<typename KEY>
class lshkit::MultiProbeLshIndex< KEY >

Multi-Probe LSH index.


Member Typedef Documentation

template<typename KEY>
typedef Super::Parameter lshkit::MultiProbeLshIndex< KEY >::Parameter

Super::Parameter is the same as MultiProbeLsh::Parameter

Reimplemented from lshkit::LshIndex< LSH, KEY >.


Member Function Documentation

template<typename KEY>
template<typename Engine>
void lshkit::MultiProbeLshIndex< KEY >::init ( const Parameter param,
Engine &  engine,
unsigned  L 
) [inline]

Initialize MPLSH.

Parameters:
param parameters.
engine random number generator (if you are not sure about what to use, then pass DefaultRng.
accessor object accessor (same as in LshIndex).
L number of hash tables maintained.

template<typename KEY>
template<typename SCANNER>
void lshkit::MultiProbeLshIndex< KEY >::query ( Domain  obj,
unsigned  T,
SCANNER &  scanner 
) [inline]

Query for K-NNs.

Parameters:
obj the query object.
scanner 

template<typename KEY>
template<typename SCANNER>
void lshkit::MultiProbeLshIndex< KEY >::query_recall ( Domain  obj,
float  recall,
SCANNER &  scanner 
) const [inline]

Query for K-NNs, try to achieve the given recall by adaptive probing.

There's a special requirement for the scanner type used in adaptive query. It should support the following method to return the current K-NNs:

const Topk<KEY> &topk () const;


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