Classes | Public Types | Public Member Functions | List of all members
cvflann::AutotunedIndex< Distance > Class Template Reference

#include <autotuned_index.h>

Inherits cvflann::NNIndex< Distance >.

Public Types

typedef Distance::ElementType ElementType
 
typedef Distance::ResultType DistanceType
 

Public Member Functions

 AutotunedIndex (const Matrix< ElementType > &inputData, const IndexParams &params=AutotunedIndexParams(), Distance d=Distance())
 
 AutotunedIndex (const AutotunedIndex &)
 
AutotunedIndexoperator= (const AutotunedIndex &)
 
virtual ~AutotunedIndex ()
 
virtual void buildIndex ()
 
virtual void saveIndex (FILE *stream)
 
virtual void loadIndex (FILE *stream)
 
virtual void findNeighbors (ResultSet< DistanceType > &result, const ElementType *vec, const SearchParams &searchParams)
 
IndexParams getParameters () const
 
SearchParams getSearchParameters () const
 
float getSpeedup () const
 
virtual size_t size () const
 
virtual size_t veclen () const
 
virtual int usedMemory () const
 
virtual flann_algorithm_t getType () const
 
virtual void knnSearch (const Matrix< ElementType > &queries, Matrix< int > &indices, Matrix< DistanceType > &dists, int knn, const SearchParams &params)
 Perform k-nearest neighbor search. More...
 
virtual int radiusSearch (const Matrix< ElementType > &query, Matrix< int > &indices, Matrix< DistanceType > &dists, float radius, const SearchParams &params)
 Perform radius search. More...
 

Member Typedef Documentation

template<typename Distance>
typedef Distance::ElementType cvflann::AutotunedIndex< Distance >::ElementType
template<typename Distance>
typedef Distance::ResultType cvflann::AutotunedIndex< Distance >::DistanceType

Constructor & Destructor Documentation

template<typename Distance>
cvflann::AutotunedIndex< Distance >::AutotunedIndex ( const Matrix< ElementType > &  inputData,
const IndexParams params = AutotunedIndexParams(),
Distance  d = Distance() 
)
template<typename Distance>
cvflann::AutotunedIndex< Distance >::AutotunedIndex ( const AutotunedIndex< Distance > &  )
template<typename Distance>
virtual cvflann::AutotunedIndex< Distance >::~AutotunedIndex ( )
virtual

Member Function Documentation

template<typename Distance>
AutotunedIndex& cvflann::AutotunedIndex< Distance >::operator= ( const AutotunedIndex< Distance > &  )
template<typename Distance>
virtual void cvflann::AutotunedIndex< Distance >::buildIndex ( )
virtual

Method responsible with building the index.

Implements cvflann::NNIndex< Distance >.

template<typename Distance>
virtual void cvflann::AutotunedIndex< Distance >::saveIndex ( FILE *  stream)
virtual

Saves the index to a stream

Implements cvflann::NNIndex< Distance >.

template<typename Distance>
virtual void cvflann::AutotunedIndex< Distance >::loadIndex ( FILE *  stream)
virtual

Loads the index from a stream

Implements cvflann::NNIndex< Distance >.

template<typename Distance>
virtual void cvflann::AutotunedIndex< Distance >::findNeighbors ( ResultSet< DistanceType > &  result,
const ElementType vec,
const SearchParams searchParams 
)
virtual

Method that searches for nearest-neighbors

Implements cvflann::NNIndex< Distance >.

template<typename Distance>
IndexParams cvflann::AutotunedIndex< Distance >::getParameters ( ) const
virtual
Returns
The index parameters

Implements cvflann::NNIndex< Distance >.

template<typename Distance>
SearchParams cvflann::AutotunedIndex< Distance >::getSearchParameters ( ) const
template<typename Distance>
float cvflann::AutotunedIndex< Distance >::getSpeedup ( ) const
template<typename Distance>
virtual size_t cvflann::AutotunedIndex< Distance >::size ( ) const
virtual

Number of features in this index.

Implements cvflann::NNIndex< Distance >.

template<typename Distance>
virtual size_t cvflann::AutotunedIndex< Distance >::veclen ( ) const
virtual

The length of each vector in this index.

Implements cvflann::NNIndex< Distance >.

template<typename Distance>
virtual int cvflann::AutotunedIndex< Distance >::usedMemory ( ) const
virtual

The amount of memory (in bytes) this index uses.

Implements cvflann::NNIndex< Distance >.

template<typename Distance>
virtual flann_algorithm_t cvflann::AutotunedIndex< Distance >::getType ( ) const
virtual

Algorithm name

Implements cvflann::NNIndex< Distance >.

template<typename Distance>
virtual void cvflann::NNIndex< Distance >::knnSearch ( const Matrix< ElementType > &  queries,
Matrix< int > &  indices,
Matrix< DistanceType > &  dists,
int  knn,
const SearchParams params 
)
virtualinherited

Perform k-nearest neighbor search.

Parameters
[in]queriesThe query points for which to find the nearest neighbors
[out]indicesThe indices of the nearest neighbors found
[out]distsDistances to the nearest neighbors found
[in]knnNumber of nearest neighbors to return
[in]paramsSearch parameters

Reimplemented in cvflann::Index< Distance >, cvflann::Index< cv::L2< ElementType > >, cvflann::Index< cv::L1< ElementType > >, cvflann::KDTreeSingleIndex< Distance >, and cvflann::LshIndex< Distance >.

template<typename Distance>
virtual int cvflann::NNIndex< Distance >::radiusSearch ( const Matrix< ElementType > &  query,
Matrix< int > &  indices,
Matrix< DistanceType > &  dists,
float  radius,
const SearchParams params 
)
virtualinherited

Perform radius search.

Parameters
[in]queryThe query point
[out]indicesThe indinces of the neighbors found within the given radius
[out]distsThe distances to the nearest neighbors found
[in]radiusThe radius used for search
[in]paramsSearch parameters
Returns
Number of neighbors found

Reimplemented in cvflann::Index< Distance >, cvflann::Index< cv::L2< ElementType > >, and cvflann::Index< cv::L1< ElementType > >.


The documentation for this class was generated from the following file: