![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <composite_index.h>


Public Types | |
| typedef Distance::ElementType | ElementType |
| typedef Distance::ResultType | DistanceType |
| typedef NNIndex< Distance > | BaseClass |
| typedef bool | needs_kdtree_distance |
Public Types inherited from flann::NNIndex< Distance > | |
| typedef Distance::ElementType | ElementType |
| typedef Distance::ResultType | DistanceType |
Public Member Functions | |
| CompositeIndex (const IndexParams ¶ms=CompositeIndexParams(), Distance d=Distance()) | |
| CompositeIndex (const Matrix< ElementType > &inputData, const IndexParams ¶ms=CompositeIndexParams(), Distance d=Distance()) | |
| CompositeIndex (const CompositeIndex &other) | |
| CompositeIndex & | operator= (CompositeIndex other) |
| virtual | ~CompositeIndex () |
| BaseClass * | clone () const |
| flann_algorithm_t | getType () const |
| size_t | size () const |
| size_t | veclen () const |
| int | usedMemory () const |
| void | buildIndex () |
| Builds the index. More... | |
| void | addPoints (const Matrix< ElementType > &points, float rebuild_threshold=2) |
| Incrementally add points to the index. More... | |
| void | removePoint (size_t index) |
| void | saveIndex (FILE *stream) |
| Saves the index to a stream. More... | |
| void | loadIndex (FILE *stream) |
| Loads the index from a stream. More... | |
| void | findNeighbors (ResultSet< DistanceType > &result, const ElementType *vec, const SearchParams &searchParams) const |
| Method that searches for nearest-neighbours. More... | |
Public Member Functions inherited from flann::NNIndex< Distance > | |
| NNIndex (Distance d) | |
| NNIndex (const IndexParams ¶ms, Distance d) | |
| NNIndex (const NNIndex &other) | |
| virtual | ~NNIndex () |
| virtual void | buildIndex (const Matrix< ElementType > &dataset) |
| virtual ElementType * | getPoint (size_t id) |
| size_t | size () const |
| size_t | veclen () const |
| IndexParams | getParameters () const |
| template<typename Archive > | |
| void | serialize (Archive &ar) |
| virtual 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. More... | |
| 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. More... | |
| 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 |
| int | radiusSearch (const Matrix< ElementType > &queries, Matrix< size_t > &indices, Matrix< DistanceType > &dists, float radius, const SearchParams ¶ms) const |
| Perform radius search. More... | |
| 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. More... | |
| int | radiusSearch (const Matrix< ElementType > &queries, std::vector< std::vector< int > > &indices, std::vector< std::vector< DistanceType > > &dists, float radius, const SearchParams ¶ms) const |
Public Member Functions inherited from flann::IndexBase | |
| virtual | ~IndexBase () |
Protected Member Functions | |
| void | swap (CompositeIndex &other) |
| void | buildIndexImpl () |
| void | freeIndex () |
Protected Member Functions inherited from flann::NNIndex< Distance > | |
| size_t | id_to_index (size_t id) |
| void | indices_to_ids (const size_t *in, size_t *out, size_t size) const |
| void | setDataset (const Matrix< ElementType > &dataset) |
| void | extendDataset (const Matrix< ElementType > &new_points) |
| void | cleanRemovedPoints () |
| void | swap (NNIndex &other) |
Additional Inherited Members | |
Protected Attributes inherited from flann::NNIndex< Distance > | |
| Distance | distance_ |
| size_t | last_id_ |
| size_t | size_ |
| size_t | size_at_build_ |
| size_t | veclen_ |
| IndexParams | index_params_ |
| bool | removed_ |
| DynamicBitset | removed_points_ |
| size_t | removed_count_ |
| std::vector< size_t > | ids_ |
| std::vector< ElementType * > | points_ |
| ElementType * | data_ptr_ |
This index builds a kd-tree index and a k-means index and performs nearest neighbour search both indexes. This gives a slight boost in search performance as some of the neighbours that are missed by one index are found by the other.
Definition at line 71 of file composite_index.h.
| typedef NNIndex<Distance> flann::CompositeIndex< Distance >::BaseClass |
Definition at line 77 of file composite_index.h.
| typedef Distance::ResultType flann::CompositeIndex< Distance >::DistanceType |
Definition at line 75 of file composite_index.h.
| typedef Distance::ElementType flann::CompositeIndex< Distance >::ElementType |
Definition at line 74 of file composite_index.h.
| typedef bool flann::CompositeIndex< Distance >::needs_kdtree_distance |
Definition at line 79 of file composite_index.h.
|
inline |
Index constructor
| inputData | dataset containing the points to index |
| params | Index parameters |
| d | Distance functor |
Definition at line 88 of file composite_index.h.
References params.
Referenced by flann::CompositeIndex< Distance >::clone().
|
inline |
Definition at line 96 of file composite_index.h.
References params.
|
inline |
Definition at line 103 of file composite_index.h.
|
inlinevirtual |
Definition at line 114 of file composite_index.h.
|
inlinevirtual |
Incrementally add points to the index.
| points | Matrix with points to be added |
| rebuild_threshold |
Reimplemented from flann::NNIndex< Distance >.
Definition at line 169 of file composite_index.h.
References points.
|
inlinevirtual |
Builds the index.
Reimplemented from flann::NNIndex< Distance >.
Definition at line 161 of file composite_index.h.
References flann::Logger::info().
|
inlineprotectedvirtual |
Implements flann::NNIndex< Distance >.
Definition at line 218 of file composite_index.h.
|
inlinevirtual |
Implements flann::NNIndex< Distance >.
Definition at line 120 of file composite_index.h.
References flann::CompositeIndex< Distance >::CompositeIndex().
|
inlinevirtual |
Method that searches for nearest-neighbours.
Implements flann::NNIndex< Distance >.
Definition at line 205 of file composite_index.h.
References result.
|
inlineprotectedvirtual |
Implements flann::NNIndex< Distance >.
Definition at line 223 of file composite_index.h.
|
inlinevirtual |
Implements flann::IndexBase.
Definition at line 128 of file composite_index.h.
References FLANN_INDEX_COMPOSITE.
|
inlinevirtual |
Loads the index from a stream.
| stream | The stream from which the index is loaded |
Implements flann::IndexBase.
Definition at line 196 of file composite_index.h.
|
inline |
Definition at line 108 of file composite_index.h.
References flann::CompositeIndex< Distance >::swap().
|
inlinevirtual |
Remove point from the index
| index | Index of point to be removed |
Reimplemented from flann::NNIndex< Distance >.
Definition at line 175 of file composite_index.h.
|
inlinevirtual |
Saves the index to a stream.
| stream | The stream to save the index to |
Implements flann::IndexBase.
Definition at line 186 of file composite_index.h.
|
inlinevirtual |
Implements flann::IndexBase.
Definition at line 136 of file composite_index.h.
|
inlineprotected |
Definition at line 212 of file composite_index.h.
References std::swap().
Referenced by flann::CompositeIndex< Distance >::operator=().
|
inlinevirtual |
Implements flann::IndexBase.
Definition at line 152 of file composite_index.h.
|
inlinevirtual |
Implements flann::IndexBase.
Definition at line 144 of file composite_index.h.