template class nanoflann::RadiusResultSet

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

#include <nanoflann.hpp>

template <typename DistanceType, typename IndexType = size_t>
class RadiusResultSet
{
public:
    //
fields

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

    // construction

    RadiusResultSet(
        DistanceType radius_,
        std::vector<std::pair<IndexType, DistanceType>>& indices_dists
        );

    //
methods

    void init();
    void clear();
    size_t size() const;
    bool full() const;

    void addPoint(
        DistanceType dist,
        IndexType index
        );

    DistanceType worstDist() const;
    void set_radius_and_clear(const DistanceType r);
    std::pair<IndexType, DistanceType> worst_item() const;
};

Methods

void set_radius_and_clear(const DistanceType r)

Clears the result set and adjusts the search radius.

std::pair<IndexType, DistanceType> worst_item() const

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