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

#include <result_set.h>

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

Public Member Functions

void addPoint (DistanceType dist, size_t index)
 
void clear ()
 
 KNNUniqueResultSet (unsigned int capacity)
 
- Public Member Functions inherited from rtflann::UniqueResultSet< DistanceType >
void copy (size_t *indices, DistanceType *dist, int n_neighbors, bool sorted=true)
 
bool full () const
 
size_t size () const
 
 UniqueResultSet ()
 
DistanceType worstDist () const
 
- Public Member Functions inherited from rtflann::ResultSet< DistanceType >
virtual ~ResultSet ()
 

Protected Types

typedef UniqueResultSet< DistanceType >::DistIndex DistIndex
 

Protected Attributes

unsigned int capacity_
 
- Protected Attributes inherited from rtflann::UniqueResultSet< DistanceType >
std::set< DistIndexdist_indices_
 
bool is_full_
 
DistanceType worst_distance_
 

Detailed Description

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

Class that holds the k NN neighbors Faster than KNNResultSet as it uses a binary heap and does not maintain two arrays

Definition at line 785 of file result_set.h.

Member Typedef Documentation

◆ DistIndex

template<typename DistanceType>
typedef UniqueResultSet<DistanceType>::DistIndex rtflann::KNNUniqueResultSet< DistanceType >::DistIndex
protected

Definition at line 829 of file result_set.h.

Constructor & Destructor Documentation

◆ KNNUniqueResultSet()

template<typename DistanceType>
rtflann::KNNUniqueResultSet< DistanceType >::KNNUniqueResultSet ( unsigned int  capacity)
inline

Constructor

Parameters
capacitythe number of neighbors to store at max

Definition at line 791 of file result_set.h.

Member Function Documentation

◆ addPoint()

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

Add a possible candidate to the best neighbors

Parameters
distdistance for that neighbor
indexindex of that neighbor

Implements rtflann::ResultSet< DistanceType >.

Definition at line 801 of file result_set.h.

◆ clear()

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

Remove all elements in the set

Definition at line 821 of file result_set.h.

Member Data Documentation

◆ capacity_

template<typename DistanceType>
unsigned int rtflann::KNNUniqueResultSet< DistanceType >::capacity_
protected

The number of neighbors to keep

Definition at line 835 of file result_set.h.


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


rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Jan 23 2023 03:39:00