A C++11 header-only library for Nearest Neighbor (NN) search with KD-trees
Usage
Make sure to add the stable section of the cppget.org
repository to your project's repositories.manifest
to be able to fetch the package.
:
role: prerequisite
location: https://pkg.cppget.org/1/stable
# trust: ...
Add the respective dependency in your project's manifest
file to make the package available for import.
depends: nanoflann ^ 1.5.0
The single header-only C++ library to use nanoflann as command-line argument parser can be imported by the following declaration in a buildfile
.
Tests
Examples
Builds
toolchain |
public-0.16.0 |
target |
x86_64-linux-gnu |
tgt config |
linux_fedora_38-gcc_13-bindist |
timestamp |
2024-05-08 06:10:34 UTC (06:45:45 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-linux-gnu |
tgt config |
linux_fedora_37-gcc_12.2-bindist |
timestamp |
2024-05-08 05:29:33 UTC (07:26:46 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-linux-gnu |
tgt config |
linux_debian_12-clang_16.0_libc++-O3 |
timestamp |
2024-05-08 01:46:03 UTC (11:10:16 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-linux-gnu |
tgt config |
linux_debian_12-clang_16.0 |
timestamp |
2024-05-08 01:45:35 UTC (11:10:44 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-linux-gnu |
tgt config |
linux_debian_12-clang_16.0_libc++ |
timestamp |
2024-05-08 01:44:54 UTC (11:11:25 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-linux-gnu |
tgt config |
linux_debian_12-clang_16.0_libc++-static_O3 |
timestamp |
2024-05-08 01:43:56 UTC (11:12:23 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-linux-gnu |
tgt config |
linux_debian_12-clang_16.0-static_O3 |
timestamp |
2024-05-08 01:43:44 UTC (11:12:35 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-linux-gnu |
tgt config |
linux_debian_12-clang_16.0-O3 |
timestamp |
2024-05-08 01:42:35 UTC (11:13:44 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-apple-darwin22.5.0 |
tgt config |
macos_13-gcc_13_homebrew-static_O3 |
timestamp |
2024-05-07 23:55:28 UTC (13:00:51 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-apple-darwin22.5.0 |
tgt config |
macos_13-gcc_13_homebrew-O3 |
timestamp |
2024-05-07 23:53:42 UTC (13:02:36 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-w64-mingw32 |
tgt config |
windows_10-gcc_12.2_mingw_w64 |
timestamp |
2024-05-07 22:30:18 UTC (14:26:01 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
aarch64-linux-gnu |
tgt config |
linux_debian_12-clang_15_libc++ |
timestamp |
2024-05-07 22:22:12 UTC (14:34:07 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
aarch64-linux-gnu |
tgt config |
linux_debian_12-clang_15 |
timestamp |
2024-05-07 22:19:59 UTC (14:36:20 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-linux-gnu |
tgt config |
linux_debian_12-gcc_12-bindist |
timestamp |
2024-05-07 21:18:51 UTC (15:37:28 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-linux-gnu |
tgt config |
linux_debian_12-gcc_13.1-static_O3 |
timestamp |
2024-05-07 21:15:57 UTC (15:40:22 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-linux-gnu |
tgt config |
linux_debian_12-gcc_13.1-ndebug_O3 |
timestamp |
2024-05-07 21:12:34 UTC (15:43:45 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-linux-gnu |
tgt config |
linux_debian_12-gcc_13.1 |
timestamp |
2024-05-07 21:11:21 UTC (15:44:58 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-linux-gnu |
tgt config |
linux_debian_12-gcc_13.1-O3 |
timestamp |
2024-05-07 21:07:17 UTC (15:49:02 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-freebsd13.2 |
tgt config |
freebsd_13-clang_14.0-O3 |
timestamp |
2024-05-07 20:55:42 UTC (16:00:37 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-freebsd13.2 |
tgt config |
freebsd_13-clang_14.0 |
timestamp |
2024-05-07 20:53:33 UTC (16:02:46 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-linux-gnu |
tgt config |
linux_debian_12-clang_15.0 |
timestamp |
2024-05-07 20:49:40 UTC (16:06:39 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-freebsd12.4 |
tgt config |
freebsd_12-clang_13.0 |
timestamp |
2024-05-07 20:48:36 UTC (16:07:43 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-linux-gnu |
tgt config |
linux_debian_12-clang_15.0_libc++ |
timestamp |
2024-05-07 20:47:51 UTC (16:08:28 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-linux-gnu |
tgt config |
linux_debian_11-gcc_12.1 |
timestamp |
2024-05-07 20:46:27 UTC (16:09:52 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
aarch64-linux-gnu |
tgt config |
linux_debian_12-gcc_13-static_O3 |
timestamp |
2024-05-07 20:12:04 UTC (16:44:15 hours ago) |
result |
warning (test) | warning (test-installed) | log | rebuild |
toolchain |
public-0.16.0 |
target |
aarch64-linux-gnu |
tgt config |
linux_debian_12-gcc_13-O3 |
timestamp |
2024-05-07 20:11:52 UTC (16:44:27 hours ago) |
result |
warning (test) | warning (test-installed) | log | rebuild |
toolchain |
public-0.16.0 |
target |
aarch64-linux-gnu |
tgt config |
linux_debian_12-gcc_13-ndebug_O3 |
timestamp |
2024-05-07 20:10:48 UTC (16:45:31 hours ago) |
result |
warning (test) | warning (test-installed) | log | rebuild |
toolchain |
public-0.16.0 |
target |
aarch64-linux-gnu |
tgt config |
linux_debian_12-gcc_13 |
timestamp |
2024-05-07 20:10:37 UTC (16:45:42 hours ago) |
result |
warning (test) | warning (test-installed) | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-apple-darwin22.5.0 |
tgt config |
macos_13-gcc_13_homebrew |
timestamp |
2024-05-07 19:00:34 UTC (17:55:45 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-w64-mingw32 |
tgt config |
windows_10-gcc_12.2_mingw_w64-static_O2 |
timestamp |
2024-05-07 15:21:16 UTC (21:35:03 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-w64-mingw32 |
tgt config |
windows_10-gcc_12.2_mingw_w64-O2 |
timestamp |
2024-05-07 15:16:06 UTC (21:40:13 hours ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-microsoft-win32-msvc14.3 |
tgt config |
windows_10-msvc_17.6-static_O2 |
timestamp |
2024-05-07 12:15:02 UTC (01 00:41:17 days ago) |
result |
warning (test) | warning (test-installed) | log | rebuild |
toolchain |
public-0.16.0 |
target |
aarch64-linux-gnu |
tgt config |
linux_debian_11-gcc_12 |
timestamp |
2024-05-07 12:06:49 UTC (01 00:49:30 days ago) |
result |
warning (test) | warning (test-installed) | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-microsoft-win32-msvc14.3 |
tgt config |
windows_10-clang_16.0_llvm_msvc_17.6-static_O2 |
timestamp |
2024-05-07 11:59:26 UTC (01 00:56:53 days ago) |
result |
warning (test) | warning (test-installed) | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-microsoft-win32-msvc14.3 |
tgt config |
windows_10-msvc_17.6 |
timestamp |
2024-05-07 11:42:57 UTC (01 01:13:22 days ago) |
result |
warning (test) | warning (test-installed) | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-microsoft-win32-msvc14.3 |
tgt config |
windows_10-clang_15.0_msvc_msvc_17.6 |
timestamp |
2024-05-07 11:38:51 UTC (01 01:17:28 days ago) |
result |
warning (test) | warning (test-installed) | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-microsoft-win32-msvc14.3 |
tgt config |
windows_10-msvc_17.5 |
timestamp |
2024-05-07 11:36:17 UTC (01 01:20:02 days ago) |
result |
warning (test) | warning (test-installed) | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-microsoft-win32-msvc14.3 |
tgt config |
windows_10-msvc_17.6-O2 |
timestamp |
2024-05-07 11:32:38 UTC (01 01:23:41 days ago) |
result |
warning (test) | warning (test-installed) | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-microsoft-win32-msvc14.3 |
tgt config |
windows_10-clang_16.0_llvm_msvc_17.6 |
timestamp |
2024-05-07 11:03:45 UTC (01 01:52:34 days ago) |
result |
warning (test) | warning (test-installed) | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-microsoft-win32-msvc14.3 |
tgt config |
windows_10-clang_16.0_llvm_msvc_17.6-O2 |
timestamp |
2024-05-07 11:02:47 UTC (01 01:53:32 days ago) |
result |
warning (test) | warning (test-installed) | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-freebsd13.2 |
tgt config |
freebsd_13-clang_14.0-static_O3 |
timestamp |
2024-05-07 10:34:50 UTC (01 02:21:29 days ago) |
result |
error (test) | log | rebuild |
toolchain |
public-0.16.0 |
target |
aarch64-linux-gnu |
tgt config |
linux_debian_12-clang_16_libc++ |
timestamp |
2024-05-06 23:02:04 UTC (01 13:54:15 days ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
aarch64-linux-gnu |
tgt config |
linux_debian_12-clang_16-static_O3 |
timestamp |
2024-05-06 22:57:14 UTC (01 13:59:05 days ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
aarch64-linux-gnu |
tgt config |
linux_debian_12-clang_16_libc++-static_O3 |
timestamp |
2024-05-06 22:57:11 UTC (01 13:59:08 days ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
aarch64-linux-gnu |
tgt config |
linux_debian_12-clang_16 |
timestamp |
2024-05-06 22:54:30 UTC (01 14:01:49 days ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
aarch64-linux-gnu |
tgt config |
linux_debian_12-clang_16_libc++-O3 |
timestamp |
2024-05-06 22:53:54 UTC (01 14:02:25 days ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
aarch64-linux-gnu |
tgt config |
linux_debian_12-clang_16-O3 |
timestamp |
2024-05-06 22:51:29 UTC (01 14:04:50 days ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-apple-darwin22.5.0 |
tgt config |
macos_13-clang_14.0-static_O3 |
timestamp |
2024-05-05 23:03:41 UTC (02 13:52:38 days ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-apple-darwin22.5.0 |
tgt config |
macos_13-clang_14.0-O3 |
timestamp |
2024-05-05 23:02:23 UTC (02 13:53:56 days ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-apple-darwin22.5.0 |
tgt config |
macos_13-clang_14.0 |
timestamp |
2024-05-05 22:59:27 UTC (02 13:56:52 days ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-apple-darwin22.5.0 |
tgt config |
macos_13-clang_15.0 |
timestamp |
2024-05-05 22:02:54 UTC (02 14:53:25 days ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-apple-darwin22.5.0 |
tgt config |
macos_13-clang_15.0-O3 |
timestamp |
2024-05-05 21:56:21 UTC (02 14:59:58 days ago) |
result |
success | log | rebuild |
toolchain |
public-0.16.0 |
target |
x86_64-apple-darwin22.5.0 |
tgt config |
macos_13-clang_15.0-static_O3 |
timestamp |
2024-05-05 21:55:40 UTC (02 15:00:39 days ago) |
result |
success | log | rebuild |
Changes
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 from SearchParams
constructor too, so that structure has been renamed SearchParameters
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
.
- 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).
nanoflann 1.3.2: Released Nov 5, 2020
- Add optional argument for Eigen matrix layout commit.
- Throw exception on malloc failure PR #126.
- Respect GNUInstallDirs in CMake install rules PR #131.
nanoflann 1.3.1: Released Oct 11, 2019
nanoflann 1.3.0: Released Aug 28, 2018
- Instructions for
make install
for Linux and Windows (Closes #87).
- Fix all (?) MSVC conversion warnings (Closes: #95).
- Avoid need for _USE_MATH_DEFINES in MSVC (Closes: #96)
- Eigen::Matrix datasets: now uses std::cref() to store a reference to matrix.
- GSOC2017 contributions by Pranjal Kumar Rai:
- Support for dynamic datasets.
- Support for non-Euclidean spaces: SO(2), SO(3)
nanoflann 1.2.3: Released Dec 20, 2016
- Fixed: split plane now correctly chooses the dimensions with the largest span.
Should lead to more optimal trees.
nanoflann 1.2.2: Released Nov 10, 2016
- knnSearch() now also returns the number of valid points found.
nanoflann 1.2.1: Released Jun 1, 2016
- Fix potential compiler warnings if
IndexType
is signed.
- New unit tests comparing the results to those of brute force search.
nanoflann 1.2.0: Released May 5, 2016
- Fixed: many classes constructors get const ref arguments but stored const values.
nanoflann 1.1.9: Released Oct 2, 2015
- Added KDTreeSingleIndexAdaptor::radiusSearchCustomCallback() (Based on a suggestion by Yannick Morin-Rivest)
- Better documentation in class headers.
- Cleanup of unused code.
- Parameter KDTreeSingleIndexAdaptorParams::dim has been removed since it was redundant.
nanoflann 1.1.8: Released May 2, 2014
- Created hidden constructors in nanoflann class, to disallow unintentional copies which will corrupt
the internal pointers.
- Fixed crash if trying to build an index of an empty dataset.
nanoflann 1.1.7: Released Aug 24, 2013
- Two internal containers are now automatically defined as fixed-size arrays if the
problem dimension is known at compile time, improving efficiency.
The new/modified datatypes are: KDTreeSingleIndexAdaptor::BoundingBox, KDTreeSingleIndexAdaptor::distance_vector_t
- Fixed compilation with GCC 4.8 and C++11 enabled (Thanks to Simon Praetorius).