#include <result_set.h>
Inherits cvflann::KNNUniqueResultSet< DistanceType >.
Public Member Functions | |
KNNRadiusUniqueResultSet (unsigned int capacity, DistanceType radius) | |
void | clear () |
void | addPoint (DistanceType dist, int index) |
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 |
Protected Types | |
typedef UniqueResultSet < DistanceType >::DistIndex | DistIndex |
Protected Attributes | |
bool | is_full_ |
DistanceType | worst_distance_ |
std::set< DistIndex > | dist_indices_ |
Class that holds the k NN neighbors within a radius distance
|
protectedinherited |
cvflann::KNNRadiusUniqueResultSet< DistanceType >::KNNRadiusUniqueResultSet | ( | unsigned int | capacity, |
DistanceType | radius | ||
) |
Constructor
capacity | the number of neighbors to store at max |
|
virtual |
Remove all elements in the set
Reimplemented from cvflann::KNNUniqueResultSet< DistanceType >.
|
virtualinherited |
Add a possible candidate to the best neighbors
dist | distance for that neighbor |
index | index of that neighbor |
Implements cvflann::ResultSet< DistanceType >.
|
virtualinherited |
Check the status of the set
Implements cvflann::ResultSet< DistanceType >.
Reimplemented in cvflann::RadiusUniqueResultSet< DistanceType >.
|
virtualinherited |
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 |
|
virtualinherited |
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 |
|
inherited |
The number of neighbors in the set
|
virtualinherited |
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 |
Flag to say if the set is full
|
protectedinherited |
The worst distance found so far
|
protectedinherited |
The best candidates so far