nanoflann
C++ header-only ANN library
Loading...
Searching...
No Matches
nanoflann::KNNResultSet< _DistanceType, _IndexType, _CountType > Class Template Reference

#include <nanoflann.hpp>

Public Types

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

Public Member Functions

 KNNResultSet (CountType capacity_)
void init (IndexType *indices_, DistanceType *dists_)
NANOFLANN_NODISCARD CountType size () const noexcept
NANOFLANN_NODISCARD bool empty () const noexcept
NANOFLANN_NODISCARD bool full () const noexcept
bool addPoint (DistanceType dist, IndexType index)
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.
void sort ()

Detailed Description

template<typename _DistanceType, typename _IndexType = size_t, typename _CountType = size_t>
class nanoflann::KNNResultSet< _DistanceType, _IndexType, _CountType >

Result set for KNN searches (N-closest neighbors)

Member Function Documentation

◆ addPoint()

template<typename _DistanceType, typename _IndexType = size_t, typename _CountType = size_t>
bool nanoflann::KNNResultSet< _DistanceType, _IndexType, _CountType >::addPoint ( DistanceType dist,
IndexType index )
inline

Called during search to add an element matching the criteria.

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

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