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

#include <result_set.h>

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

Classes

struct  DistIndex
 

Public Member Functions

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 void addPoint (DistanceType dist, size_t index)=0
 
virtual ~ResultSet ()
 

Protected Attributes

std::set< DistIndexdist_indices_
 
bool is_full_
 
DistanceType worst_distance_
 

Detailed Description

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

Class that holds the k NN neighbors

Definition at line 704 of file result_set.h.

Constructor & Destructor Documentation

◆ UniqueResultSet()

template<typename DistanceType >
rtflann::UniqueResultSet< DistanceType >::UniqueResultSet ( )
inline

Default cosntructor

Definition at line 722 of file result_set.h.

Member Function Documentation

◆ copy()

template<typename DistanceType >
void rtflann::UniqueResultSet< DistanceType >::copy ( size_t *  indices,
DistanceType *  dist,
int  n_neighbors,
bool  sorted = true 
)
inline

Copy the set to two C arrays

Parameters
indicespointer to a C array of indices
distpointer to a C array of distances
n_neighborsthe number of neighbors to copy

Definition at line 740 of file result_set.h.

◆ full()

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

Check the status of the set

Returns
true if we have k NN

Implements rtflann::ResultSet< DistanceType >.

Reimplemented in rtflann::RadiusUniqueResultSet< DistanceType >.

Definition at line 730 of file result_set.h.

◆ size()

template<typename DistanceType >
size_t rtflann::UniqueResultSet< DistanceType >::size ( ) const
inline

The number of neighbors in the set

Returns

Definition at line 755 of file result_set.h.

◆ worstDist()

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

The distance of the furthest neighbor If we don't have enough neighbors, it returns the max possible value

Returns

Implements rtflann::ResultSet< DistanceType >.

Reimplemented in rtflann::RadiusUniqueResultSet< DistanceType >.

Definition at line 764 of file result_set.h.

Member Data Documentation

◆ dist_indices_

template<typename DistanceType >
std::set<DistIndex> rtflann::UniqueResultSet< DistanceType >::dist_indices_
protected

The best candidates so far

Definition at line 776 of file result_set.h.

◆ is_full_

template<typename DistanceType >
bool rtflann::UniqueResultSet< DistanceType >::is_full_
protected

Flag to say if the set is full

Definition at line 770 of file result_set.h.

◆ worst_distance_

template<typename DistanceType >
DistanceType rtflann::UniqueResultSet< DistanceType >::worst_distance_
protected

The worst distance found so far

Definition at line 773 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