Class that holds the k NN neighbors within a radius distance. More...
#include <opencv2/flann/result_set.h>
Public Member Functions | |
KNNRadiusUniqueResultSet (unsigned int capacity, DistanceType radius) | |
Constructor. More... | |
void | addPoint (DistanceType dist, int index) CV_OVERRIDE |
Add a possible candidate to the best neighbors. More... | |
void | clear () |
Remove all elements in the set. More... | |
virtual void | copy (int *indices, DistanceType *dist, int n_neighbors=-1) const |
Copy the set to two C arrays. More... | |
bool | full () const CV_OVERRIDE |
Check the status of the set. More... | |
size_t | size () const |
The number of neighbors in the set. More... | |
virtual void | sortAndCopy (int *indices, DistanceType *dist, int n_neighbors=-1) const |
Copy the set to two C arrays but sort it according to the distance first. More... | |
DistanceType | worstDist () const CV_OVERRIDE |
The distance of the furthest neighbor If we don't have enough neighbors, it returns the max possible value. More... | |
Protected Types | |
typedef UniqueResultSet< DistanceType >::DistIndex | DistIndex |
Protected Attributes | |
std::set< DistIndex > | dist_indices_ |
The best candidates so far. More... | |
bool | is_full_ |
Flag to say if the set is full. More... | |
DistanceType | worst_distance_ |
The worst distance found so far. More... | |
Class that holds the k NN neighbors within a radius distance.
|
protectedinherited |
|
inline |
Constructor.
capacity | the number of neighbors to store at max |
radius | the maximum distance of a neighbor |
|
inlinevirtualinherited |
Add a possible candidate to the best neighbors.
dist | distance for that neighbor |
index | index of that neighbor |
Implements cvflann::ResultSet< DistanceType >.
|
inlinevirtual |
Remove all elements in the set.
Reimplemented from cvflann::KNNUniqueResultSet< DistanceType >.
|
inlinevirtualinherited |
Copy the set to two C arrays.
indices | pointer to a C array of indices |
dist | pointer to a C array of distances |
n_neighbors | the number of neighbors to copy |
Referenced by cvflann::NNIndex< cv::L1< ElementType > >::knnSearch(), cvflann::LshIndex< Distance >::knnSearch(), and cvflann::NNIndex< cv::L1< ElementType > >::radiusSearch().
|
inlinevirtualinherited |
Check the status of the set.
Implements cvflann::ResultSet< DistanceType >.
Reimplemented in cvflann::RadiusUniqueResultSet< DistanceType >.
|
inlineinherited |
The number of neighbors in the set.
Referenced by cvflann::NNIndex< cv::L1< ElementType > >::radiusSearch().
|
inlinevirtualinherited |
Copy the set to two C arrays but sort it according to the distance first.
indices | pointer to a C array of indices |
dist | pointer to a C array of distances |
n_neighbors | the number of neighbors to copy |
Referenced by cvflann::NNIndex< cv::L1< ElementType > >::knnSearch(), cvflann::LshIndex< Distance >::knnSearch(), and cvflann::NNIndex< cv::L1< ElementType > >::radiusSearch().
|
inlinevirtualinherited |
The distance of the furthest neighbor If we don't have enough neighbors, it returns the max possible value.
Implements cvflann::ResultSet< DistanceType >.
Reimplemented in cvflann::RadiusUniqueResultSet< DistanceType >.
|
protectedinherited |
The best candidates so far.
|
protectedinherited |
Flag to say if the set is full.
|
protectedinherited |
The worst distance found so far.