Public Member Functions | Protected Attributes
cvflann::RadiusUniqueResultSet< DistanceType > Class Template Reference

#include <result_set.h>

Inherits cvflann::UniqueResultSet< DistanceType >.

List of all members.

Public Member Functions

 RadiusUniqueResultSet (DistanceType radius)
void addPoint (DistanceType dist, int index)
void clear ()
bool full () const
DistanceType worstDist () 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

Protected Attributes

bool is_full_
DistanceType worst_distance_
std::set< DistIndexdist_indices_

Detailed Description

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

Class that holds the radius nearest neighbors It is more accurate than RadiusResult as it is not limited in the number of neighbors


Constructor & Destructor Documentation

template<typename DistanceType>
cvflann::RadiusUniqueResultSet< DistanceType >::RadiusUniqueResultSet ( DistanceType  radius)

Constructor

Parameters:
capacitythe number of neighbors to store at max

Member Function Documentation

template<typename DistanceType>
void cvflann::RadiusUniqueResultSet< 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 >.

template<typename DistanceType>
void cvflann::RadiusUniqueResultSet< DistanceType >::clear ( ) [virtual]

Remove all elements in the set

Implements cvflann::UniqueResultSet< DistanceType >.

template<typename DistanceType>
bool cvflann::RadiusUniqueResultSet< DistanceType >::full ( ) const [virtual]

Check the status of the set

Returns:
alwys false

Reimplemented from cvflann::UniqueResultSet< DistanceType >.

template<typename DistanceType>
DistanceType cvflann::RadiusUniqueResultSet< DistanceType >::worstDist ( ) const [virtual]

The distance of the furthest neighbor If we don't have enough neighbors, it returns the max possible value

Returns:

Reimplemented from cvflann::UniqueResultSet< DistanceType >.

template<typename DistanceType >
virtual void cvflann::UniqueResultSet< DistanceType >::copy ( int *  indices,
DistanceType *  dist,
int  n_neighbors = -1 
) const [virtual, inherited]

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
template<typename DistanceType >
virtual void cvflann::UniqueResultSet< DistanceType >::sortAndCopy ( int *  indices,
DistanceType *  dist,
int  n_neighbors = -1 
) const [virtual, inherited]

Copy the set to two C arrays but sort it according to the distance first

Parameters:
indicespointer to a C array of indices
distpointer to a C array of distances
n_neighborsthe number of neighbors to copy
template<typename DistanceType >
size_t cvflann::UniqueResultSet< DistanceType >::size ( ) const [inherited]

The number of neighbors in the set

Returns:

Member Data Documentation

template<typename DistanceType >
bool cvflann::UniqueResultSet< DistanceType >::is_full_ [protected, inherited]

Flag to say if the set is full

template<typename DistanceType >
DistanceType cvflann::UniqueResultSet< DistanceType >::worst_distance_ [protected, inherited]

The worst distance found so far

template<typename DistanceType >
std::set<DistIndex> cvflann::UniqueResultSet< DistanceType >::dist_indices_ [protected, inherited]

The best candidates so far


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