#include <autotuned_index.h>

Classes | |
| struct | CostData |
Public Member Functions | |
| AutotunedIndex (const Matrix< ELEM_TYPE > &inputData, const AutotunedIndexParams ¶ms=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 AutotunedIndexParams & | index_params |
| Matrix< ELEM_TYPE > | sampledDataset |
| float | speedup |
| Matrix< ELEM_TYPE > | testDataset |
Definition at line 72 of file autotuned_index.h.
typedef pair<CostData, KDTreeIndexParams> cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::KDTreeCostData [private] |
Definition at line 227 of file autotuned_index.h.
typedef pair<CostData, KMeansIndexParams> cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::KMeansCostData [private] |
Definition at line 228 of file autotuned_index.h.
| 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.
| virtual cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::~AutotunedIndex | ( | ) | [inline, virtual] |
Definition at line 104 of file autotuned_index.h.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| KDTreeCostData cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::optimizeKDTree | ( | ) | [inline, private] |
Definition at line 411 of file autotuned_index.h.
| KMeansCostData cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::optimizeKMeans | ( | ) | [inline, private] |
Definition at line 331 of file autotuned_index.h.
| 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.
| 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.
| 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.
| 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.
NNIndex<ELEM_TYPE>* cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::bestIndex [private] |
Definition at line 74 of file autotuned_index.h.
IndexParams* cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::bestParams [private] |
Definition at line 76 of file autotuned_index.h.
SearchParams cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::bestSearchParams [private] |
Definition at line 77 of file autotuned_index.h.
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.
Matrix<int> cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::gt_matches [private] |
Definition at line 81 of file autotuned_index.h.
const AutotunedIndexParams& cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::index_params [private] |
Index parameters
Definition at line 93 of file autotuned_index.h.
Matrix<ELEM_TYPE> cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::sampledDataset [private] |
Definition at line 79 of file autotuned_index.h.
float cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::speedup [private] |
Definition at line 83 of file autotuned_index.h.
Matrix<ELEM_TYPE> cvflann::AutotunedIndex< ELEM_TYPE, DIST_TYPE >::testDataset [private] |
Definition at line 80 of file autotuned_index.h.