cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE > Class Template Reference

#include <autotuned_index.h>

Inheritance diagram for cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >:
Inheritance graph
[legend]

List of all members.

Classes

struct  CostData

Public Member Functions

 AutotunedIndex (const Matrix< ELEM_TYPE > &inputData, const AutotunedIndexParams &params=AutotunedIndexParams())
virtual void buildIndex ()
virtual void findNeighbors (ResultSet< ELEM_TYPE > &result, const ELEM_TYPE *vec, const SearchParams &searchParams)
const IndexParams * getParameters () const
virtual flann_algorithm_t getType () const
virtual void loadIndex (FILE *stream)
virtual void saveIndex (FILE *stream)
virtual size_t size () const
virtual int usedMemory () const
virtual size_t veclen () const
virtual ~AutotunedIndex ()

Private Types

typedef pair< CostData,
KDTreeIndexParams
KDTreeCostData
typedef pair< CostData,
KMeansIndexParams
KMeansCostData

Private Member Functions

IndexParams * estimateBuildParams ()
float estimateSearchParams (SearchParams &searchParams)
void evaluate_kdtree (CostData &cost, const KDTreeIndexParams &kdtree_params)
void evaluate_kmeans (CostData &cost, const KMeansIndexParams &kmeans_params)
KDTreeCostData optimizeKDTree ()
KMeansCostData optimizeKMeans ()

Private Attributes

NNIndex< ELEM_TYPE > * bestIndex
IndexParams * bestParams
SearchParams bestSearchParams
const Matrix< ELEM_TYPE > dataset
Matrix< int > gt_matches
const AutotunedIndexParamsindex_params
Matrix< ELEM_TYPE > sampledDataset
float speedup
Matrix< ELEM_TYPE > testDataset

Detailed Description

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
class cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >

Definition at line 72 of file autotuned_index.h.


Member Typedef Documentation

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
typedef pair<CostData, KDTreeIndexParams> cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::KDTreeCostData [private]

Definition at line 227 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
typedef pair<CostData, KMeansIndexParams> cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::KMeansCostData [private]

Definition at line 228 of file autotuned_index.h.


Constructor & Destructor Documentation

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::AutotunedIndex ( const Matrix< ELEM_TYPE > &  inputData,
const AutotunedIndexParams params = AutotunedIndexParams() 
) [inline]

Definition at line 97 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
virtual cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::~AutotunedIndex (  )  [inline, virtual]

Definition at line 104 of file autotuned_index.h.


Member Function Documentation

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
virtual void cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::buildIndex (  )  [inline, virtual]

Method responsible with building the index.

Implements cvflann::NNIndex< ELEM_TYPE >.

Definition at line 117 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
IndexParams* cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::estimateBuildParams (  )  [inline, private]

Chooses the best nearest-neighbor algorithm and estimates the optimal parameters to use when building the index (for a given precision). Returns a dictionary with the optimal parameters.

Definition at line 484 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
float cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::estimateSearchParams ( SearchParams &  searchParams  )  [inline, private]

Estimates the search time parameters needed to get the desired precision. Precondition: the index is built Postcondition: the searchParams will have the optimum params set, also the speedup obtained over linear search.

Definition at line 544 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
void cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::evaluate_kdtree ( CostData cost,
const KDTreeIndexParams kdtree_params 
) [inline, private]

Definition at line 257 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
void cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::evaluate_kmeans ( CostData cost,
const KMeansIndexParams kmeans_params 
) [inline, private]

Definition at line 231 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
virtual void cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::findNeighbors ( ResultSet< ELEM_TYPE > &  result,
const ELEM_TYPE *  vec,
const SearchParams &  searchParams 
) [inline, virtual]

Method that searches for nearest-neighbors

Implements cvflann::NNIndex< ELEM_TYPE >.

Definition at line 168 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
const IndexParams* cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::getParameters (  )  const [inline, virtual]

Returns the parameters used for the index

Implements cvflann::NNIndex< ELEM_TYPE >.

Definition at line 179 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
virtual flann_algorithm_t cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::getType (  )  const [inline, virtual]

Algorithm name

Implements cvflann::NNIndex< ELEM_TYPE >.

Definition at line 212 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
virtual void cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::loadIndex ( FILE *  stream  )  [inline, virtual]

Loads the index from a stream

Implements cvflann::NNIndex< ELEM_TYPE >.

Definition at line 155 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
KDTreeCostData cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::optimizeKDTree (  )  [inline, private]

Definition at line 411 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
KMeansCostData cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::optimizeKMeans (  )  [inline, private]

Definition at line 331 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
virtual void cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::saveIndex ( FILE *  stream  )  [inline, virtual]

Saves the index to a stream

Implements cvflann::NNIndex< ELEM_TYPE >.

Definition at line 145 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
virtual size_t cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::size (  )  const [inline, virtual]

Number of features in this index.

Implements cvflann::NNIndex< ELEM_TYPE >.

Definition at line 188 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
virtual int cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::usedMemory (  )  const [inline, virtual]

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

Implements cvflann::NNIndex< ELEM_TYPE >.

Definition at line 204 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
virtual size_t cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::veclen (  )  const [inline, virtual]

The length of each vector in this index.

Implements cvflann::NNIndex< ELEM_TYPE >.

Definition at line 196 of file autotuned_index.h.


Member Data Documentation

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
NNIndex<ELEM_TYPE>* cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::bestIndex [private]

Definition at line 74 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
IndexParams* cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::bestParams [private]

Definition at line 76 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
SearchParams cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::bestSearchParams [private]

Definition at line 77 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
const Matrix<ELEM_TYPE> cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::dataset [private]

The dataset used by this index

Definition at line 88 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
Matrix<int> cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::gt_matches [private]

Definition at line 81 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
const AutotunedIndexParams& cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::index_params [private]

Index parameters

Definition at line 93 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
Matrix<ELEM_TYPE> cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::sampledDataset [private]

Definition at line 79 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
float cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::speedup [private]

Definition at line 83 of file autotuned_index.h.

template<typename ELEM_TYPE, typename DIST_TYPE = typename DistType<ELEM_TYPE>::type>
Matrix<ELEM_TYPE> cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::testDataset [private]

Definition at line 80 of file autotuned_index.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines


opencv2
Author(s): Gary Bradski and many others. See web page for a full contributor list. ROS package maintained by James Bowman.
autogenerated on Fri Jan 11 10:00:49 2013