From bc9aefbb0b01cb97b221cf6d3991e4ccf256cf5a Mon Sep 17 00:00:00 2001 From: Manos Papadakis Date: Fri, 20 Oct 2023 12:35:23 +0300 Subject: [PATCH] Update nanoflann.hpp Add missing argument SearchParameters in knnSearch. It is useful if someone wants to use the SearchParameters.eps field. --- include/nanoflann.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/nanoflann.hpp b/include/nanoflann.hpp index c2c80fd..0a37b0c 100644 --- a/include/nanoflann.hpp +++ b/include/nanoflann.hpp @@ -2060,11 +2060,11 @@ class KDTreeSingleIndexDynamicAdaptor_ */ Size knnSearch( const ElementType* query_point, const Size num_closest, - IndexType* out_indices, DistanceType* out_distances) const + IndexType* out_indices, DistanceType* out_distances, const SearchParameters& searchParams = {}) const { nanoflann::KNNResultSet resultSet(num_closest); resultSet.init(out_indices, out_distances); - findNeighbors(resultSet, query_point); + findNeighbors(resultSet, query_point, searchParams); return resultSet.size(); }