Skip to content

Commit

Permalink
Update nanoflann.hpp
Browse files Browse the repository at this point in the history
Add missing argument SearchParameters in knnSearch. It is useful if someone wants to use the SearchParameters.eps field.
  • Loading branch information
ManosPapadakis95 authored Oct 20, 2023
1 parent f1e47f0 commit bc9aefb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/nanoflann.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<DistanceType, IndexType> resultSet(num_closest);
resultSet.init(out_indices, out_distances);
findNeighbors(resultSet, query_point);
findNeighbors(resultSet, query_point, searchParams);
return resultSet.size();
}

Expand Down

0 comments on commit bc9aefb

Please sign in to comment.