OpenCV  3.2.0
Open Source Computer Vision
Public Member Functions | Protected Types | Protected Attributes | List of all members
cvflann::KNNUniqueResultSet< DistanceType > Class Template Reference

#include "result_set.h"

Inheritance diagram for cvflann::KNNUniqueResultSet< DistanceType >:
cvflann::UniqueResultSet< DistanceType > cvflann::ResultSet< DistanceType > cvflann::KNNRadiusUniqueResultSet< DistanceType >

Public Member Functions

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

Protected Types

typedef UniqueResultSet< DistanceType >::DistIndex DistIndex
 

Protected Attributes

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

Detailed Description

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

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

Member Typedef Documentation

§ DistIndex

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

Constructor & Destructor Documentation

§ KNNUniqueResultSet()

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

Constructor

Parameters
capacitythe number of neighbors to store at max

Member Function Documentation

§ addPoint()

template<typename DistanceType>
void cvflann::KNNUniqueResultSet< DistanceType >::addPoint ( DistanceType  dist,
int  index 
)
virtual

Add a possible candidate to the best neighbors

Parameters
distdistance for that neighbor
indexindex of that neighbor

Implements cvflann::ResultSet< DistanceType >.

§ clear()

template<typename DistanceType>
void cvflann::KNNUniqueResultSet< DistanceType >::clear ( )
virtual

Remove all elements in the set

Implements cvflann::UniqueResultSet< DistanceType >.

Reimplemented in cvflann::KNNRadiusUniqueResultSet< DistanceType >.

Member Data Documentation

§ capacity_

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

The number of neighbors to keep


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