Public Types | Public Member Functions | Private Attributes | List of all members
rtflann::KNNSimpleResultSet< DistanceType > Class Template Reference

#include <result_set.h>

Inheritance diagram for rtflann::KNNSimpleResultSet< DistanceType >:
Inheritance graph
[legend]

Public Types

typedef DistanceIndex< DistanceType > DistIndex
 

Public Member Functions

void addPoint (DistanceType dist, size_t index)
 
void clear ()
 
void copy (size_t *indices, DistanceType *dists, size_t num_elements, bool sorted=true)
 
bool full () const
 
 KNNSimpleResultSet (size_t capacity_)
 
size_t size () const
 
DistanceType worstDist () const
 
 ~KNNSimpleResultSet ()
 
- Public Member Functions inherited from rtflann::ResultSet< DistanceType >
virtual ~ResultSet ()
 

Private Attributes

size_t capacity_
 
size_t count_
 
std::vector< DistIndexdist_index_
 
DistanceType worst_distance_
 

Detailed Description

template<typename DistanceType>
class rtflann::KNNSimpleResultSet< DistanceType >

KNNSimpleResultSet does not ensure that the element it holds are unique. Is used in those cases where the nearest neighbour algorithm used does not attempt to insert the same element multiple times.

Definition at line 129 of file result_set.h.

Member Typedef Documentation

◆ DistIndex

template<typename DistanceType >
typedef DistanceIndex<DistanceType> rtflann::KNNSimpleResultSet< DistanceType >::DistIndex

Definition at line 132 of file result_set.h.

Constructor & Destructor Documentation

◆ KNNSimpleResultSet()

template<typename DistanceType >
rtflann::KNNSimpleResultSet< DistanceType >::KNNSimpleResultSet ( size_t  capacity_)
inline

Definition at line 134 of file result_set.h.

◆ ~KNNSimpleResultSet()

template<typename DistanceType >
rtflann::KNNSimpleResultSet< DistanceType >::~KNNSimpleResultSet ( )
inline

Definition at line 142 of file result_set.h.

Member Function Documentation

◆ addPoint()

template<typename DistanceType >
void rtflann::KNNSimpleResultSet< DistanceType >::addPoint ( DistanceType  dist,
size_t  index 
)
inlinevirtual

Add a point to result set

Parameters
distdistance to point
indexindex of point

Implements rtflann::ResultSet< DistanceType >.

Definition at line 179 of file result_set.h.

◆ clear()

template<typename DistanceType >
void rtflann::KNNSimpleResultSet< DistanceType >::clear ( )
inline

Clears the result set

Definition at line 149 of file result_set.h.

◆ copy()

template<typename DistanceType >
void rtflann::KNNSimpleResultSet< DistanceType >::copy ( size_t indices,
DistanceType *  dists,
size_t  num_elements,
bool  sorted = true 
)
inline

Copy indices and distances to output buffers

Parameters
indices
dists
num_elementsNumber of elements to copy
sortedIndicates if results should be sorted

Definition at line 208 of file result_set.h.

◆ full()

template<typename DistanceType >
bool rtflann::KNNSimpleResultSet< DistanceType >::full ( ) const
inlinevirtual

Radius search result set always reports full

Returns

Implements rtflann::ResultSet< DistanceType >.

Definition at line 169 of file result_set.h.

◆ size()

template<typename DistanceType >
size_t rtflann::KNNSimpleResultSet< DistanceType >::size ( ) const
inline
Returns
Number of elements in the result set

Definition at line 160 of file result_set.h.

◆ worstDist()

template<typename DistanceType >
DistanceType rtflann::KNNSimpleResultSet< DistanceType >::worstDist ( ) const
inlinevirtual

Implements rtflann::ResultSet< DistanceType >.

Definition at line 217 of file result_set.h.

Member Data Documentation

◆ capacity_

template<typename DistanceType >
size_t rtflann::KNNSimpleResultSet< DistanceType >::capacity_
private

Definition at line 223 of file result_set.h.

◆ count_

template<typename DistanceType >
size_t rtflann::KNNSimpleResultSet< DistanceType >::count_
private

Definition at line 224 of file result_set.h.

◆ dist_index_

template<typename DistanceType >
std::vector<DistIndex> rtflann::KNNSimpleResultSet< DistanceType >::dist_index_
private

Definition at line 226 of file result_set.h.

◆ worst_distance_

template<typename DistanceType >
DistanceType rtflann::KNNSimpleResultSet< DistanceType >::worst_distance_
private

Definition at line 225 of file result_set.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