OpenCV  2.4.13
Open Source Computer Vision
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 ()
 
bool full () const
 
virtual void copy (int *indices, DistanceType *dist, int n_neighbors=-1) const
 
virtual void sortAndCopy (int *indices, DistanceType *dist, int n_neighbors=-1) const
 
size_t size () 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 >
bool is_full_
 
DistanceType worst_distance_
 
std::set< DistIndexdist_indices_
 

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

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

Constructor & Destructor Documentation

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

Constructor

Parameters
capacitythe number of neighbors to store at max

Member Function Documentation

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

Add a possible candidate to the best neighbors

Parameters
distdistance for that neighbor
indexindex of that neighbor

Implements cvflann::ResultSet< DistanceType >.

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

Remove all elements in the set

Implements cvflann::UniqueResultSet< DistanceType >.

Reimplemented in cvflann::KNNRadiusUniqueResultSet< DistanceType >.

Member Data Documentation

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: