#include <flann.hpp>
Public Types | |
typedef Distance::ResultType | DistanceType |
typedef Distance::ElementType | ElementType |
typedef NNIndex< Distance > | IndexType |
Public Member Functions | |
void | addPoints (const Matrix< ElementType > &points, float rebuild_threshold=2) |
void | buildIndex () |
void | buildIndex (const Matrix< ElementType > &points) |
IndexParams | getParameters () const |
ElementType * | getPoint (size_t point_id) |
flann_algorithm_t | getType () const |
Index (const IndexParams ¶ms, Distance distance=Distance()) | |
Index (const Matrix< ElementType > &features, const IndexParams ¶ms, Distance distance=Distance()) | |
Index (const Index &other) | |
int | knnSearch (const Matrix< ElementType > &queries, Matrix< size_t > &indices, Matrix< DistanceType > &dists, size_t knn, const SearchParams ¶ms) const |
Perform k-nearest neighbor search. | |
int | knnSearch (const Matrix< ElementType > &queries, Matrix< int > &indices, Matrix< DistanceType > &dists, size_t knn, const SearchParams ¶ms) const |
int | knnSearch (const Matrix< ElementType > &queries, std::vector< std::vector< size_t > > &indices, std::vector< std::vector< DistanceType > > &dists, size_t knn, const SearchParams ¶ms) const |
Perform k-nearest neighbor search. | |
int | knnSearch (const Matrix< ElementType > &queries, std::vector< std::vector< int > > &indices, std::vector< std::vector< DistanceType > > &dists, size_t knn, const SearchParams ¶ms) const |
Index & | operator= (Index other) |
int | radiusSearch (const Matrix< ElementType > &queries, Matrix< size_t > &indices, Matrix< DistanceType > &dists, float radius, const SearchParams ¶ms) const |
Perform radius search. | |
int | radiusSearch (const Matrix< ElementType > &queries, Matrix< int > &indices, Matrix< DistanceType > &dists, float radius, const SearchParams ¶ms) const |
int | radiusSearch (const Matrix< ElementType > &queries, std::vector< std::vector< size_t > > &indices, std::vector< std::vector< DistanceType > > &dists, float radius, const SearchParams ¶ms) const |
Perform radius search. | |
int | radiusSearch (const Matrix< ElementType > &queries, std::vector< std::vector< int > > &indices, std::vector< std::vector< DistanceType > > &dists, float radius, const SearchParams ¶ms) const |
size_t | removedCount () const |
void | removePoint (size_t point_id) |
void | save (std::string filename) |
size_t | size () const |
size_t | sizeAtBuild () const |
int | usedMemory () const |
size_t | veclen () const |
virtual | ~Index () |
Private Member Functions | |
IndexType * | load_saved_index (const Matrix< ElementType > &dataset, const std::string &filename, Distance distance) |
void | swap (Index &other) |
Private Attributes | |
IndexParams | index_params_ |
bool | loaded_ |
IndexType * | nnIndex_ |
typedef Distance::ResultType rtflann::Index< Distance >::DistanceType |
typedef Distance::ElementType rtflann::Index< Distance >::ElementType |
typedef NNIndex<Distance> rtflann::Index< Distance >::IndexType |
rtflann::Index< Distance >::Index | ( | const IndexParams & | params, |
Distance | distance = Distance() |
||
) | [inline] |
rtflann::Index< Distance >::Index | ( | const Matrix< ElementType > & | features, |
const IndexParams & | params, | ||
Distance | distance = Distance() |
||
) | [inline] |
rtflann::Index< Distance >::Index | ( | const Index< Distance > & | other | ) | [inline] |
virtual rtflann::Index< Distance >::~Index | ( | ) | [inline, virtual] |
void rtflann::Index< Distance >::addPoints | ( | const Matrix< ElementType > & | points, |
float | rebuild_threshold = 2 |
||
) | [inline] |
void rtflann::Index< Distance >::buildIndex | ( | ) | [inline] |
void rtflann::Index< Distance >::buildIndex | ( | const Matrix< ElementType > & | points | ) | [inline] |
IndexParams rtflann::Index< Distance >::getParameters | ( | ) | const [inline] |
ElementType* rtflann::Index< Distance >::getPoint | ( | size_t | point_id | ) | [inline] |
flann_algorithm_t rtflann::Index< Distance >::getType | ( | ) | const [inline] |
int rtflann::Index< Distance >::knnSearch | ( | const Matrix< ElementType > & | queries, |
Matrix< size_t > & | indices, | ||
Matrix< DistanceType > & | dists, | ||
size_t | knn, | ||
const SearchParams & | params | ||
) | const [inline] |
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 |
int rtflann::Index< Distance >::knnSearch | ( | const Matrix< ElementType > & | queries, |
Matrix< int > & | indices, | ||
Matrix< DistanceType > & | dists, | ||
size_t | knn, | ||
const SearchParams & | params | ||
) | const [inline] |
int rtflann::Index< Distance >::knnSearch | ( | const Matrix< ElementType > & | queries, |
std::vector< std::vector< size_t > > & | indices, | ||
std::vector< std::vector< DistanceType > > & | dists, | ||
size_t | knn, | ||
const SearchParams & | params | ||
) | const [inline] |
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 |
int rtflann::Index< Distance >::knnSearch | ( | const Matrix< ElementType > & | queries, |
std::vector< std::vector< int > > & | indices, | ||
std::vector< std::vector< DistanceType > > & | dists, | ||
size_t | knn, | ||
const SearchParams & | params | ||
) | const [inline] |
IndexType* rtflann::Index< Distance >::load_saved_index | ( | const Matrix< ElementType > & | dataset, |
const std::string & | filename, | ||
Distance | distance | ||
) | [inline, private] |
Index& rtflann::Index< Distance >::operator= | ( | Index< Distance > | other | ) | [inline] |
int rtflann::Index< Distance >::radiusSearch | ( | const Matrix< ElementType > & | queries, |
Matrix< size_t > & | indices, | ||
Matrix< DistanceType > & | dists, | ||
float | radius, | ||
const SearchParams & | params | ||
) | const [inline] |
Perform radius search.
[in] | queries | The query points |
[out] | indices | The indices 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 |
int rtflann::Index< Distance >::radiusSearch | ( | const Matrix< ElementType > & | queries, |
Matrix< int > & | indices, | ||
Matrix< DistanceType > & | dists, | ||
float | radius, | ||
const SearchParams & | params | ||
) | const [inline] |
int rtflann::Index< Distance >::radiusSearch | ( | const Matrix< ElementType > & | queries, |
std::vector< std::vector< size_t > > & | indices, | ||
std::vector< std::vector< DistanceType > > & | dists, | ||
float | radius, | ||
const SearchParams & | params | ||
) | const [inline] |
Perform radius search.
[in] | queries | The query points |
[out] | indices | The indices 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 |
int rtflann::Index< Distance >::radiusSearch | ( | const Matrix< ElementType > & | queries, |
std::vector< std::vector< int > > & | indices, | ||
std::vector< std::vector< DistanceType > > & | dists, | ||
float | radius, | ||
const SearchParams & | params | ||
) | const [inline] |
size_t rtflann::Index< Distance >::removedCount | ( | ) | const [inline] |
void rtflann::Index< Distance >::removePoint | ( | size_t | point_id | ) | [inline] |
void rtflann::Index< Distance >::save | ( | std::string | filename | ) | [inline] |
size_t rtflann::Index< Distance >::size | ( | ) | const [inline] |
size_t rtflann::Index< Distance >::sizeAtBuild | ( | ) | const [inline] |
void rtflann::Index< Distance >::swap | ( | Index< Distance > & | other | ) | [inline, private] |
int rtflann::Index< Distance >::usedMemory | ( | ) | const [inline] |
size_t rtflann::Index< Distance >::veclen | ( | ) | const [inline] |
IndexParams rtflann::Index< Distance >::index_params_ [private] |
bool rtflann::Index< Distance >::loaded_ [private] |
IndexType* rtflann::Index< Distance >::nnIndex_ [private] |