lshkit::ForestIndex< LSH, KEY > Class Template Reference

LSH Forest index. More...

#include <forest.h>

List of all members.

Public Types

typedef LSH::Parameter Parameter
typedef LSH::Domain Domain
typedef KEY Key

Public Member Functions

template<typename Engine>
void init (const Parameter &param, Engine &engine, unsigned L, unsigned depth)
 Initialize the LSH Forest index.
template<typename ACCESSOR>
void insert (Key key, ACCESSOR &acc)
 Insert a point to the forest.
template<typename SCANNER>
void query (Domain val, unsigned M, SCANNER &scanner) const
 Query for K-NNs.

Friends

struct Tree

Classes

struct  Tree


Detailed Description

template<typename LSH, typename KEY>
class lshkit::ForestIndex< LSH, KEY >

LSH Forest index.

Parameters:
LSH LSH class.
KEY key type.


Member Function Documentation

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

Initialize the LSH Forest index.

Parameters:
param LSH parameters.
engine random number generator.
L number of trees in the forest.
depth maximal depth of the forest.

template<typename LSH, typename KEY>
template<typename ACCESSOR>
void lshkit::ForestIndex< LSH, KEY >::insert ( Key  key,
ACCESSOR &  acc 
) [inline]

Insert a point to the forest.

Parameters:
key The key to be inserted.
acc The accessor to retrieve the data corresponding to keys.
We might need to rebalance the trees, so an accessor is needed to retrieve data points.

template<typename LSH, typename KEY>
template<typename SCANNER>
void lshkit::ForestIndex< LSH, KEY >::query ( Domain  val,
unsigned  M,
SCANNER &  scanner 
) const [inline]

Query for K-NNs.

Parameters:
val the query object.
M lower bound of the total number of points to scan.
scanner the functional object to passed keys to.


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