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 size_t size() const
inline size_t empty() const
inline bool full() const
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 DistanceType worstDist() const
inline ResultItem<IndexType, DistanceType> worst_item() const

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

Public Members

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