Nearest-Neighbor (NN) search with KD-trees C++ library, examples
This is the build2
package for nanoflann, a C++11 header-only library for Nearest Neighbor (NN) search with KD-trees.
Usage
To use nanoflann
in your project, add the following configurations to the respective files after you have gained access to a build2
package repository that contains it.
manifest
To make nanoflann
available for import, add the following dependency to the manifest
of each package in your project that requires it, adjusting the version constraint as appropriate.
depends: nanoflann ^1.7.1
... More
version | 1.7.1 |
---|---|
license | BSD-2-Clause |
repository | https://pkg.cppget.org/1/testing |
download | nanoflann-examples-1.7.1.tar.gz |
sha256 | 25f6711ab784c51ccc428c6a26edbb64f648e3414ce6b4fca8d12b9bdb29a29d |
project | nanoflann |
---|---|
url | github.com/jlblancoc/nanoflann |
doc-url | jlblancoc.github.io/nanoflann/ |
package-url | github.com/build2-packaging/nanoflann/ |
joseluisblancoc@gmail.com | |
package-email | packaging@build2.org |
Depends (1)
Eigen ^3.4.0 |
Reviews
fail | 0 |
---|---|
pass | 0 |
Changes
nanoflann 1.7.1: Released Mar 15, 2025
- ResultSets::worstDist(): Fix a potential access to negative index in array (did not happen in practice, but static analysis tools correctly detected this possibility).
nanoflann 1.7.0: Released Feb 3, 2025
- ResultSets::worstDist(): clarify the meaning of its return value, and made to return the actual worst distance in the found set (only if set is full)
nanoflann 1.6.3: Released Jan 7, 2025
- cmake_required_version bumped to 3.10
- clang-format version bumped to 14
nanoflann 1.6.2: Released Nov 4, 2024
- BUG FIX: Fix middleSplit_ for same points by @yzabalotski in https://github.com/jlblancoc/nanoflann/pull/250
- Fix build warnings.
nanoflann 1.6.1: Released Aug 24, 2024
- Add conan install instructions.
- Add multiple thread kdtree build support for KDTreeEigenMatrixAdaptor (PR #246)
nanoflann 1.6.0: Released Jul 11, 2024
- BUG FIX: nanoflann::SearchParameters::sorted was ignored for RadiusResultSet.
- ResultSet classes now must implement a sort() method.
- Added type IndexType to nanoflann:KDTreeBaseClass
nanoflann 1.5.5: Released Mar 12, 2024
- Potentially more efficient scheduling of multi-thread index building (PR #236)
- Bump minimum required cmake version to 3.5 (PR #230)
nanoflann 1.5.4: Released Jan 10, 2024
- Fix outdated NANOFLANN_VERSION macro in header file
- Fix poll-allocator alignment problems
- Add NANOFLANN_USE_SYSTEM_GTEST option
- Look for Threads dependency in CMake config script
nanoflann 1.5.3: Released Dec 7, 2023
- Other changes:
- Save one redundant call to
computeMinMax()
inmiddleSplit_
(PR#220 by qq422216549). This saves a lot of time, up to 20% faster in a benchmark with small (thousands) point clouds.
- Save one redundant call to
nanoflann 1.5.2: Released Nov 29, 2023
nanoflann 1.5.1: Released Nov 27, 2023
- API changes:
- Add new search method
rknnSearch()
for knn searches with a maximum radius. - Add missing
SearchParameters
argument toKDTreeSingleIndexDynamicAdaptor_::knnSearch()
(PR#213 by ManosPapadakis95). - Add missing method
KNNResultSet::empty()
for consistency with the other result sets.
- Add new search method
- Other changes:
- Add GUI examples for each search type:
nanoflann_gui_example_R3_knn
nanoflann_gui_example_R3_radius
nanoflann_gui_example_R3_rknn
- Add GUI examples for each search type:
nanoflann 1.5.0: Released Jun 16, 2023
- API changes:
- Users of radius search should change their result placeholder type:
std::vector<std::pair<IndexType, DistanceType>>
=>std::vector<nanoflann::ResultItem<IndexType, DistanceType>>
. (See #166 for the motivation of this change). - More concise auxiliary (internal) type name:
array_or_vector_selector
->array_or_vector
. - Remove obsolete parameter
nChecks_IGNORED
. Removed fromSearchParams
constructor too, so that structure has been renamedSearchParameters
to enforce users to update the code and avoid mistakes with the order of its ctor parameters. - Added method RadiusResultSet::empty()
- Template argument rename:
AccesorType
=>IndexType
(does not actually affect user code at all). - Added concurrent tree building support, refer to
KDTreeSingleIndexAdaptorParams::n_thread_build
.
- Users of radius search should change their result placeholder type:
- Other changes:
- Macros to avoid conflicts with X11 symbols.
- Inline an auxiliary example function in case users want to use it and include the file in multiple translation units (Closes #182).
- Move all benchmarking code, data, and scripts to its own repository to keep this repo as clean as possible.
- Fix "potentially uninitialized" GCC warning.
- Clarified, even more, in docs and examples, that L2 distances are squared distances.
- Removed the (with modern compilers) now useless
inline
keyword in class members. - Add examples with GUI (requires mrpt-gui):
- nanoflann_gui_example_R3: Radius search on R³ Euclidean space.
- nanoflann_gui_example_bearings: NN search on non-Euclidean spaces.
- BUGFIXES:
- Avoid segfault if saving an empty index (Closes #205).
nanoflann 1.4.3: Released Jul 24, 2022
- Added flag SkipInitialBuildIndex to allow not wasting time building a tree when it will be loaded from a file later on (PR #171).
- Mark all constructors explicit, to avoid unintended creation of temporary objects (Issue #179).
- BUGFIX: avoid potential index out of bounds in KDTreeSingleIndexDynamicAdaptor (PR #173)
nanoflann 1.4.2: Released Jan 11, 2022
- Install pkg-config .pc file under lib directory (Closes #161).
- Integrate AppVeyor CI.
nanoflann 1.4.1: Released Jan 6, 2022
- Fix incorrect install directory for cmake target & config files.
- Do not install example binaries with
make install
. - Provide working examples for cmake and pkgconfig under
examples/example_*
directories.
nanoflann 1.4.0: Released Jan 2, 2022
- nanoflann::KDTreeSingleIndexAdaptor() ctor now forwards additional parameters to the metric class, enabling custom dynamic metrics.
- Add and apply a
.clang-format
file (same one than used in MOLAorg/MOLA projects). - Examples: clean up and code modernization.
- CMake variables prefixed now with
NANOFLANN_
for easier integration of nanoflann as a Git submodule. - Fixes for IndexType which are not of integral types PR #154
- save/load API upgraded from C
FILE*
to C++ file streams (By Dominic Kempf, Heidelberg University, PR).
... More