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 101 of file result_set.h.

Member Typedef Documentation

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

Definition at line 104 of file result_set.h.

Constructor & Destructor Documentation

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

Definition at line 106 of file result_set.h.

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

Definition at line 114 of file result_set.h.

Member Function Documentation

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 151 of file result_set.h.

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

Clears the result set

Definition at line 121 of file result_set.h.

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 180 of file result_set.h.

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 141 of file result_set.h.

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

Definition at line 132 of file result_set.h.

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

Implements rtflann::ResultSet< DistanceType >.

Definition at line 189 of file result_set.h.

Member Data Documentation

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

Definition at line 195 of file result_set.h.

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

Definition at line 196 of file result_set.h.

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

Definition at line 198 of file result_set.h.

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

Definition at line 197 of file result_set.h.


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


rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Dec 14 2020 03:37:09