#include <nn_index.h>
Inherited by cvflann::AutotunedIndex< Distance >, cvflann::CompositeIndex< Distance >, cvflann::HierarchicalClusteringIndex< Distance >, cvflann::Index< Distance >, cvflann::KDTreeIndex< Distance >, cvflann::KDTreeSingleIndex< Distance >, cvflann::KMeansIndex< Distance >, cvflann::LinearIndex< Distance >, and cvflann::LshIndex< Distance >.
Public Member Functions | |
| virtual | ~NNIndex () |
| virtual void | buildIndex ()=0 |
| Builds the index. | |
| virtual void | knnSearch (const Matrix< ElementType > &queries, Matrix< int > &indices, Matrix< DistanceType > &dists, int knn, const SearchParams ¶ms) |
| Perform k-nearest neighbor search. | |
| virtual int | radiusSearch (const Matrix< ElementType > &query, Matrix< int > &indices, Matrix< DistanceType > &dists, float radius, const SearchParams ¶ms) |
| Perform radius search. | |
| virtual void | saveIndex (FILE *stream)=0 |
| Saves the index to a stream. | |
| virtual void | loadIndex (FILE *stream)=0 |
| Loads the index from a stream. | |
| virtual size_t | size () const =0 |
| virtual size_t | veclen () const =0 |
| virtual int | usedMemory () const =0 |
| virtual flann_algorithm_t | getType () const =0 |
| virtual IndexParams | getParameters () const =0 |
| virtual void | findNeighbors (ResultSet< DistanceType > &result, const ElementType *vec, const SearchParams &searchParams)=0 |
| Method that searches for nearest-neighbours. | |
Nearest-neighbour index base class
| virtual cvflann::NNIndex< Distance >::~NNIndex | ( | ) | [virtual] |
| virtual void cvflann::NNIndex< Distance >::buildIndex | ( | ) | [pure virtual] |
Builds the index.
Implemented in cvflann::KMeansIndex< Distance >, cvflann::HierarchicalClusteringIndex< Distance >, cvflann::CompositeIndex< Distance >, cvflann::Index< Distance >, cvflann::Index< L1< ElementType > >, cvflann::Index< L2< ElementType > >, cvflann::KDTreeIndex< Distance >, cvflann::KDTreeSingleIndex< Distance >, cvflann::LshIndex< Distance >, cvflann::AutotunedIndex< Distance >, and cvflann::LinearIndex< Distance >.
| virtual void cvflann::NNIndex< Distance >::knnSearch | ( | const Matrix< ElementType > & | queries, |
| Matrix< int > & | indices, | ||
| Matrix< DistanceType > & | dists, | ||
| int | knn, | ||
| const SearchParams & | params | ||
| ) | [virtual] |
Perform k-nearest neighbor search.
| [in] | queries | The query points for which to find the nearest neighbors |
| [out] | indices | The indices of the nearest neighbors found |
| [out] | dists | Distances to the nearest neighbors found |
| [in] | knn | Number of nearest neighbors to return |
| [in] | params | Search parameters |
Reimplemented in cvflann::Index< Distance >, cvflann::Index< L1< ElementType > >, cvflann::Index< L2< ElementType > >, cvflann::KDTreeSingleIndex< Distance >, and cvflann::LshIndex< Distance >.
| virtual int cvflann::NNIndex< Distance >::radiusSearch | ( | const Matrix< ElementType > & | query, |
| Matrix< int > & | indices, | ||
| Matrix< DistanceType > & | dists, | ||
| float | radius, | ||
| const SearchParams & | params | ||
| ) | [virtual] |
Perform radius search.
| [in] | query | The query point |
| [out] | indices | The indinces of the neighbors found within the given radius |
| [out] | dists | The distances to the nearest neighbors found |
| [in] | radius | The radius used for search |
| [in] | params | Search parameters |
Reimplemented in cvflann::Index< Distance >, cvflann::Index< L1< ElementType > >, and cvflann::Index< L2< ElementType > >.
| virtual void cvflann::NNIndex< Distance >::saveIndex | ( | FILE * | stream | ) | [pure virtual] |
Saves the index to a stream.
| stream | The stream to save the index to |
Implemented in cvflann::KMeansIndex< Distance >, cvflann::HierarchicalClusteringIndex< Distance >, cvflann::Index< Distance >, cvflann::Index< L1< ElementType > >, cvflann::Index< L2< ElementType > >, cvflann::CompositeIndex< Distance >, cvflann::KDTreeSingleIndex< Distance >, cvflann::KDTreeIndex< Distance >, cvflann::LshIndex< Distance >, cvflann::AutotunedIndex< Distance >, and cvflann::LinearIndex< Distance >.
| virtual void cvflann::NNIndex< Distance >::loadIndex | ( | FILE * | stream | ) | [pure virtual] |
Loads the index from a stream.
| stream | The stream from which the index is loaded |
Implemented in cvflann::KMeansIndex< Distance >, cvflann::HierarchicalClusteringIndex< Distance >, cvflann::Index< Distance >, cvflann::Index< L1< ElementType > >, cvflann::Index< L2< ElementType > >, cvflann::CompositeIndex< Distance >, cvflann::KDTreeSingleIndex< Distance >, cvflann::KDTreeIndex< Distance >, cvflann::LshIndex< Distance >, cvflann::AutotunedIndex< Distance >, and cvflann::LinearIndex< Distance >.
| virtual size_t cvflann::NNIndex< Distance >::size | ( | ) | const [pure virtual] |
Implemented in cvflann::KMeansIndex< Distance >, cvflann::HierarchicalClusteringIndex< Distance >, cvflann::KDTreeSingleIndex< Distance >, cvflann::AutotunedIndex< Distance >, cvflann::Index< Distance >, cvflann::Index< L1< ElementType > >, cvflann::Index< L2< ElementType > >, cvflann::KDTreeIndex< Distance >, cvflann::LshIndex< Distance >, cvflann::CompositeIndex< Distance >, and cvflann::LinearIndex< Distance >.
| virtual size_t cvflann::NNIndex< Distance >::veclen | ( | ) | const [pure virtual] |
Implemented in cvflann::KMeansIndex< Distance >, cvflann::HierarchicalClusteringIndex< Distance >, cvflann::KDTreeSingleIndex< Distance >, cvflann::AutotunedIndex< Distance >, cvflann::KDTreeIndex< Distance >, cvflann::Index< Distance >, cvflann::Index< L1< ElementType > >, cvflann::Index< L2< ElementType > >, cvflann::LshIndex< Distance >, cvflann::CompositeIndex< Distance >, and cvflann::LinearIndex< Distance >.
| virtual int cvflann::NNIndex< Distance >::usedMemory | ( | ) | const [pure virtual] |
Implemented in cvflann::KMeansIndex< Distance >, cvflann::HierarchicalClusteringIndex< Distance >, cvflann::KDTreeSingleIndex< Distance >, cvflann::AutotunedIndex< Distance >, cvflann::Index< Distance >, cvflann::Index< L1< ElementType > >, cvflann::Index< L2< ElementType > >, cvflann::KDTreeIndex< Distance >, cvflann::LshIndex< Distance >, cvflann::CompositeIndex< Distance >, and cvflann::LinearIndex< Distance >.
| virtual flann_algorithm_t cvflann::NNIndex< Distance >::getType | ( | ) | const [pure virtual] |
Implemented in cvflann::HierarchicalClusteringIndex< Distance >, cvflann::KMeansIndex< Distance >, cvflann::AutotunedIndex< Distance >, cvflann::Index< Distance >, cvflann::Index< L1< ElementType > >, cvflann::Index< L2< ElementType > >, cvflann::KDTreeSingleIndex< Distance >, cvflann::KDTreeIndex< Distance >, cvflann::LshIndex< Distance >, cvflann::CompositeIndex< Distance >, and cvflann::LinearIndex< Distance >.
| virtual IndexParams cvflann::NNIndex< Distance >::getParameters | ( | ) | const [pure virtual] |
Implemented in cvflann::KMeansIndex< Distance >, cvflann::HierarchicalClusteringIndex< Distance >, cvflann::KDTreeSingleIndex< Distance >, cvflann::KDTreeIndex< Distance >, cvflann::Index< Distance >, cvflann::Index< L1< ElementType > >, cvflann::Index< L2< ElementType > >, cvflann::LshIndex< Distance >, cvflann::CompositeIndex< Distance >, cvflann::AutotunedIndex< Distance >, and cvflann::LinearIndex< Distance >.
| virtual void cvflann::NNIndex< Distance >::findNeighbors | ( | ResultSet< DistanceType > & | result, |
| const ElementType * | vec, | ||
| const SearchParams & | searchParams | ||
| ) | [pure virtual] |
Method that searches for nearest-neighbours.
Implemented in cvflann::KMeansIndex< Distance >, cvflann::HierarchicalClusteringIndex< Distance >, cvflann::KDTreeSingleIndex< Distance >, cvflann::Index< Distance >, cvflann::Index< L1< ElementType > >, cvflann::Index< L2< ElementType > >, cvflann::LshIndex< Distance >, cvflann::KDTreeIndex< Distance >, cvflann::CompositeIndex< Distance >, cvflann::AutotunedIndex< Distance >, and cvflann::LinearIndex< Distance >.