Template Class RKNNResultSet

Class Documentation

template<typename _DistanceType, typename _IndexType = size_t, typename _CountType = size_t>
class RKNNResultSet

Result set for RKNN searches (N-closest neighbors with a maximum radius)

Public Types

using DistanceType = _DistanceType
using IndexType = _IndexType
using CountType = _CountType

Public Functions

inline explicit RKNNResultSet(CountType capacity_, DistanceType maximumSearchDistanceSquared_)
inline void init(IndexType *indices_, DistanceType *dists_)
inline NANOFLANN_NODISCARD CountType size () const noexcept
inline NANOFLANN_NODISCARD bool empty () const noexcept
inline NANOFLANN_NODISCARD bool full () const noexcept
inline bool addPoint(DistanceType dist, IndexType index)

Called during search to add an element matching the criteria.

Returns:

true if the search should be continued, false if the results are sufficient

inline NANOFLANN_NODISCARD DistanceType worstDist () const noexcept

Returns the worst distance among found solutions if the search result is full, or the maximum possible distance, if not full yet.

inline void sort()