Public Types | Public Member Functions | Protected Member Functions | List of all members
rtflann::LinearIndex< Distance > Class Template Reference

#include <linear_index.h>

Inheritance diagram for rtflann::LinearIndex< Distance >:
Inheritance graph
[legend]

Public Types

typedef NNIndex< Distance > BaseClass
 
typedef Distance::ResultType DistanceType
 
typedef Distance::ElementType ElementType
 
- Public Types inherited from rtflann::NNIndex< Distance >
typedef Distance::ResultType DistanceType
 
typedef Distance::ElementType ElementType
 

Public Member Functions

void addPoints (const Matrix< ElementType > &points, float rebuild_threshold=2)
 Incrementally add points to the index. More...
 
BaseClassclone () const
 
void findNeighbors (ResultSet< DistanceType > &resultSet, const ElementType *vec, const SearchParams &) const
 
flann_algorithm_t getType () const
 
 LinearIndex (const IndexParams &params=LinearIndexParams(), Distance d=Distance())
 
 LinearIndex (const LinearIndex &other)
 
 LinearIndex (const Matrix< ElementType > &input_data, const IndexParams &params=LinearIndexParams(), Distance d=Distance())
 
void loadIndex (FILE *stream)
 
LinearIndexoperator= (LinearIndex other)
 
void saveIndex (FILE *stream)
 
template<typename Archive >
void serialize (Archive &ar)
 
int usedMemory () const
 
virtual ~LinearIndex ()
 
- Public Member Functions inherited from rtflann::NNIndex< Distance >
virtual void buildIndex ()
 
virtual void buildIndex (const Matrix< ElementType > &dataset)
 
IndexParams getParameters () const
 
virtual ElementTypegetPoint (size_t id)
 
virtual int knnSearch (const Matrix< ElementType > &queries, Matrix< size_t > &indices, Matrix< DistanceType > &dists, size_t knn, const SearchParams &params) 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 &params) const
 
virtual int 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
 Perform k-nearest neighbor search. More...
 
 NNIndex (const IndexParams &params, Distance d)
 
 NNIndex (const NNIndex &other)
 
 NNIndex (Distance d)
 
int radiusSearch (const Matrix< ElementType > &queries, Matrix< int > &indices, Matrix< DistanceType > &dists, float radius, const SearchParams &params) const
 
virtual int radiusSearch (const Matrix< ElementType > &queries, Matrix< size_t > &indices, Matrix< DistanceType > &dists, float radius, const SearchParams &params) 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 &params) const
 
virtual int radiusSearch (const Matrix< ElementType > &queries, std::vector< std::vector< size_t > > &indices, std::vector< std::vector< DistanceType > > &dists, float radius, const SearchParams &params) const
 Perform radius search. More...
 
size_t removedCount () const
 
virtual void removePoint (size_t id)
 
template<typename Archive >
void serialize (Archive &ar)
 
size_t size () const
 
size_t sizeAtBuild () const
 
size_t veclen () const
 
virtual ~NNIndex ()
 
- Public Member Functions inherited from rtflann::IndexBase
virtual ~IndexBase ()
 

Protected Member Functions

void buildIndexImpl ()
 
void freeIndex ()
 
- Protected Member Functions inherited from rtflann::NNIndex< Distance >
void cleanRemovedPoints ()
 
void extendDataset (const Matrix< ElementType > &new_points)
 
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 swap (NNIndex &other)
 

Additional Inherited Members

- Protected Attributes inherited from rtflann::NNIndex< Distance >
ElementTypedata_ptr_
 
Distance distance_
 
std::vector< size_tids_
 
IndexParams index_params_
 
size_t last_id_
 
std::vector< ElementType * > points_
 
bool removed_
 
size_t removed_count_
 
DynamicBitset removed_points_
 
size_t size_
 
size_t size_at_build_
 
size_t veclen_
 

Detailed Description

template<typename Distance>
class rtflann::LinearIndex< Distance >

Definition at line 77 of file linear_index.h.

Member Typedef Documentation

◆ BaseClass

template<typename Distance >
typedef NNIndex<Distance> rtflann::LinearIndex< Distance >::BaseClass

Definition at line 84 of file linear_index.h.

◆ DistanceType

template<typename Distance >
typedef Distance::ResultType rtflann::LinearIndex< Distance >::DistanceType

Definition at line 82 of file linear_index.h.

◆ ElementType

template<typename Distance >
typedef Distance::ElementType rtflann::LinearIndex< Distance >::ElementType

Definition at line 81 of file linear_index.h.

Constructor & Destructor Documentation

◆ LinearIndex() [1/3]

template<typename Distance >
rtflann::LinearIndex< Distance >::LinearIndex ( const IndexParams params = LinearIndexParams(),
Distance  d = Distance() 
)
inline

Definition at line 86 of file linear_index.h.

◆ LinearIndex() [2/3]

template<typename Distance >
rtflann::LinearIndex< Distance >::LinearIndex ( const Matrix< ElementType > &  input_data,
const IndexParams params = LinearIndexParams(),
Distance  d = Distance() 
)
inline

Definition at line 91 of file linear_index.h.

◆ LinearIndex() [3/3]

template<typename Distance >
rtflann::LinearIndex< Distance >::LinearIndex ( const LinearIndex< Distance > &  other)
inline

Definition at line 97 of file linear_index.h.

◆ ~LinearIndex()

template<typename Distance >
virtual rtflann::LinearIndex< Distance >::~LinearIndex ( )
inlinevirtual

Definition at line 107 of file linear_index.h.

Member Function Documentation

◆ addPoints()

template<typename Distance >
void rtflann::LinearIndex< Distance >::addPoints ( const Matrix< ElementType > &  points,
float  rebuild_threshold = 2 
)
inlinevirtual

Incrementally add points to the index.

Parameters
pointsMatrix with points to be added
rebuild_threshold

Reimplemented from rtflann::NNIndex< Distance >.

Definition at line 116 of file linear_index.h.

◆ buildIndexImpl()

template<typename Distance >
void rtflann::LinearIndex< Distance >::buildIndexImpl ( )
inlineprotectedvirtual

Implements rtflann::NNIndex< Distance >.

Definition at line 174 of file linear_index.h.

◆ clone()

template<typename Distance >
BaseClass* rtflann::LinearIndex< Distance >::clone ( ) const
inlinevirtual

Implements rtflann::NNIndex< Distance >.

Definition at line 111 of file linear_index.h.

◆ findNeighbors()

template<typename Distance >
void rtflann::LinearIndex< Distance >::findNeighbors ( ResultSet< DistanceType > &  resultSet,
const ElementType vec,
const SearchParams  
) const
inlinevirtual

Implements rtflann::NNIndex< Distance >.

Definition at line 157 of file linear_index.h.

◆ freeIndex()

template<typename Distance >
void rtflann::LinearIndex< Distance >::freeIndex ( )
inlineprotectedvirtual

Implements rtflann::NNIndex< Distance >.

Definition at line 179 of file linear_index.h.

◆ getType()

template<typename Distance >
flann_algorithm_t rtflann::LinearIndex< Distance >::getType ( ) const
inlinevirtual

Implements rtflann::IndexBase.

Definition at line 122 of file linear_index.h.

◆ loadIndex()

template<typename Distance >
void rtflann::LinearIndex< Distance >::loadIndex ( FILE *  stream)
inlinevirtual

Implements rtflann::IndexBase.

Definition at line 151 of file linear_index.h.

◆ operator=()

template<typename Distance >
LinearIndex& rtflann::LinearIndex< Distance >::operator= ( LinearIndex< Distance >  other)
inline

Definition at line 101 of file linear_index.h.

◆ saveIndex()

template<typename Distance >
void rtflann::LinearIndex< Distance >::saveIndex ( FILE *  stream)
inlinevirtual

Implements rtflann::IndexBase.

Definition at line 145 of file linear_index.h.

◆ serialize()

template<typename Distance >
template<typename Archive >
void rtflann::LinearIndex< Distance >::serialize ( Archive &  ar)
inline

Definition at line 134 of file linear_index.h.

◆ usedMemory()

template<typename Distance >
int rtflann::LinearIndex< Distance >::usedMemory ( ) const
inlinevirtual

Implements rtflann::IndexBase.

Definition at line 128 of file linear_index.h.


The documentation for this class was generated from the following file:


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:29