CoastalME (Coastal Modelling Environment)
Simulates the long-term behaviour of complex coastlines
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_)
 
CountType size () const
 
bool empty () const
 
bool full () const
 
bool addPoint (DistanceType dist, IndexType index)
 
DistanceType worstDist () const
 
void sort ()
 

Private Attributes

IndexTypeindices
 
DistanceTypedists
 
CountType capacity
 
CountType count
 

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)

Definition at line 199 of file nanoflann.hpp.

Member Typedef Documentation

◆ CountType

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

Definition at line 204 of file nanoflann.hpp.

◆ DistanceType

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

Definition at line 202 of file nanoflann.hpp.

◆ IndexType

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

Definition at line 203 of file nanoflann.hpp.

Constructor & Destructor Documentation

◆ KNNResultSet()

template<typename _DistanceType, typename _IndexType = size_t, typename _CountType = size_t>
nanoflann::KNNResultSet< _DistanceType, _IndexType, _CountType >::KNNResultSet ( CountType capacity_)
inlineexplicit

Definition at line 213 of file nanoflann.hpp.

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

If defined and two points have the same distance, the one with the lowest-index will be returned first.

Definition at line 234 of file nanoflann.hpp.

◆ empty()

template<typename _DistanceType, typename _IndexType = size_t, typename _CountType = size_t>
bool nanoflann::KNNResultSet< _DistanceType, _IndexType, _CountType >::empty ( ) const
inline

Definition at line 226 of file nanoflann.hpp.

◆ full()

template<typename _DistanceType, typename _IndexType = size_t, typename _CountType = size_t>
bool nanoflann::KNNResultSet< _DistanceType, _IndexType, _CountType >::full ( ) const
inline

Definition at line 227 of file nanoflann.hpp.

◆ init()

template<typename _DistanceType, typename _IndexType = size_t, typename _CountType = size_t>
void nanoflann::KNNResultSet< _DistanceType, _IndexType, _CountType >::init ( IndexType * indices_,
DistanceType * dists_ )
inline

◆ size()

template<typename _DistanceType, typename _IndexType = size_t, typename _CountType = size_t>
CountType nanoflann::KNNResultSet< _DistanceType, _IndexType, _CountType >::size ( ) const
inline

◆ sort()

template<typename _DistanceType, typename _IndexType = size_t, typename _CountType = size_t>
void nanoflann::KNNResultSet< _DistanceType, _IndexType, _CountType >::sort ( )
inline

Definition at line 278 of file nanoflann.hpp.

◆ worstDist()

template<typename _DistanceType, typename _IndexType = size_t, typename _CountType = size_t>
DistanceType nanoflann::KNNResultSet< _DistanceType, _IndexType, _CountType >::worstDist ( ) const
inline

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

Definition at line 271 of file nanoflann.hpp.

Field Documentation

◆ capacity

template<typename _DistanceType, typename _IndexType = size_t, typename _CountType = size_t>
CountType nanoflann::KNNResultSet< _DistanceType, _IndexType, _CountType >::capacity
private

Definition at line 209 of file nanoflann.hpp.

Referenced by addPoint(), full(), KNNResultSet(), and worstDist().

◆ count

template<typename _DistanceType, typename _IndexType = size_t, typename _CountType = size_t>
CountType nanoflann::KNNResultSet< _DistanceType, _IndexType, _CountType >::count
private

Definition at line 210 of file nanoflann.hpp.

Referenced by addPoint(), empty(), full(), init(), KNNResultSet(), size(), and worstDist().

◆ dists

template<typename _DistanceType, typename _IndexType = size_t, typename _CountType = size_t>
DistanceType* nanoflann::KNNResultSet< _DistanceType, _IndexType, _CountType >::dists
private

Definition at line 208 of file nanoflann.hpp.

Referenced by addPoint(), init(), KNNResultSet(), and worstDist().

◆ indices

template<typename _DistanceType, typename _IndexType = size_t, typename _CountType = size_t>
IndexType* nanoflann::KNNResultSet< _DistanceType, _IndexType, _CountType >::indices
private

Definition at line 207 of file nanoflann.hpp.

Referenced by addPoint(), init(), and KNNResultSet().


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