Template Class RadiusResultSet

Class Documentation

template<typename _DistanceType, typename _IndexType = size_t>
class RadiusResultSet

A result-set class used when performing a radius based search.

Public Types

using DistanceType = _DistanceType
using IndexType = _IndexType

Public Functions

inline explicit RadiusResultSet(DistanceType radius_, std::vector<ResultItem<IndexType, DistanceType>> &indices_dists)
inline void init()
inline void clear()
inline NANOFLANN_NODISCARD size_t 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
inline ResultItem<IndexType, DistanceType> worst_item() const

Find the worst result (farthest neighbor) without copying or sorting Pre-conditions: size() > 0

inline void sort()

Public Members

const DistanceType radius
std::vector<ResultItem<IndexType, DistanceType>> &m_indices_dists