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

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

Default cosntructor

Definition at line 722 of file result_set.h.

Member Function Documentation

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.

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.

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.

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

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.

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.

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 Wed Jun 5 2019 22:43:43