Repo symbol

nanoflann repository

nanoflann

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-06-09
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann 1.10.1

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Jazzy (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Kilted (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Lyrical (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Rolling (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version

1. About

nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D rotation groups). No support for approximate NN is provided. nanoflann does not require compiling or installing. You just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Cite as:

@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

nanoflann-demo-1

1.4. Why a fork?

  • Execution time efficiency:
    • The power of the original flann library comes from the possibility of choosing between different ANN algorithms. The cost of this flexibility is the declaration of pure virtual methods which (in some circumstances) impose run-time penalties. In nanoflann all those virtual methods have been replaced by a combination of the Curiously Recurring Template Pattern (CRTP) and inlined methods, which are much faster.
    • For radiusSearch(), there is no need to make a call to determine the number of points within the radius and then call it again to get the data. By using STL containers for the output data, containers are automatically resized.
    • Users can (optionally) set the problem dimensionality at compile-time via a template argument, thus allowing the compiler to fully unroll loops.
    • nanoflann allows users to provide a precomputed bounding box of the data, if available, to avoid recomputation.
    • Indices of data points have been converted from int to size_t, which removes a limit when handling very large data sets.

File truncated at 100 lines see the full file

Repo symbol

nanoflann repository

nanoflann

ROS Distro
jazzy

Repository Summary

Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-06-09
Dev Status DEVELOPED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann 1.10.1

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Jazzy (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Kilted (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Lyrical (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Rolling (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version

1. About

nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D rotation groups). No support for approximate NN is provided. nanoflann does not require compiling or installing. You just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Cite as:

@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

nanoflann-demo-1

1.4. Why a fork?

  • Execution time efficiency:
    • The power of the original flann library comes from the possibility of choosing between different ANN algorithms. The cost of this flexibility is the declaration of pure virtual methods which (in some circumstances) impose run-time penalties. In nanoflann all those virtual methods have been replaced by a combination of the Curiously Recurring Template Pattern (CRTP) and inlined methods, which are much faster.
    • For radiusSearch(), there is no need to make a call to determine the number of points within the radius and then call it again to get the data. By using STL containers for the output data, containers are automatically resized.
    • Users can (optionally) set the problem dimensionality at compile-time via a template argument, thus allowing the compiler to fully unroll loops.
    • nanoflann allows users to provide a precomputed bounding box of the data, if available, to avoid recomputation.
    • Indices of data points have been converted from int to size_t, which removes a limit when handling very large data sets.

File truncated at 100 lines see the full file

Repo symbol

nanoflann repository

nanoflann

ROS Distro
kilted

Repository Summary

Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-06-09
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann 1.10.1

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Jazzy (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Kilted (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Lyrical (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Rolling (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version

1. About

nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D rotation groups). No support for approximate NN is provided. nanoflann does not require compiling or installing. You just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Cite as:

@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

nanoflann-demo-1

1.4. Why a fork?

  • Execution time efficiency:
    • The power of the original flann library comes from the possibility of choosing between different ANN algorithms. The cost of this flexibility is the declaration of pure virtual methods which (in some circumstances) impose run-time penalties. In nanoflann all those virtual methods have been replaced by a combination of the Curiously Recurring Template Pattern (CRTP) and inlined methods, which are much faster.
    • For radiusSearch(), there is no need to make a call to determine the number of points within the radius and then call it again to get the data. By using STL containers for the output data, containers are automatically resized.
    • Users can (optionally) set the problem dimensionality at compile-time via a template argument, thus allowing the compiler to fully unroll loops.
    • nanoflann allows users to provide a precomputed bounding box of the data, if available, to avoid recomputation.
    • Indices of data points have been converted from int to size_t, which removes a limit when handling very large data sets.

File truncated at 100 lines see the full file

Repo symbol

nanoflann repository

nanoflann

ROS Distro
lyrical

Repository Summary

Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-06-09
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann 1.10.1

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Jazzy (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Kilted (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Lyrical (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Rolling (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version

1. About

nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D rotation groups). No support for approximate NN is provided. nanoflann does not require compiling or installing. You just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Cite as:

@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

nanoflann-demo-1

1.4. Why a fork?

  • Execution time efficiency:
    • The power of the original flann library comes from the possibility of choosing between different ANN algorithms. The cost of this flexibility is the declaration of pure virtual methods which (in some circumstances) impose run-time penalties. In nanoflann all those virtual methods have been replaced by a combination of the Curiously Recurring Template Pattern (CRTP) and inlined methods, which are much faster.
    • For radiusSearch(), there is no need to make a call to determine the number of points within the radius and then call it again to get the data. By using STL containers for the output data, containers are automatically resized.
    • Users can (optionally) set the problem dimensionality at compile-time via a template argument, thus allowing the compiler to fully unroll loops.
    • nanoflann allows users to provide a precomputed bounding box of the data, if available, to avoid recomputation.
    • Indices of data points have been converted from int to size_t, which removes a limit when handling very large data sets.

File truncated at 100 lines see the full file

Repo symbol

nanoflann repository

nanoflann

ROS Distro
rolling

Repository Summary

Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-06-09
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann 1.10.1

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Jazzy (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Kilted (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Lyrical (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Rolling (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version

1. About

nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D rotation groups). No support for approximate NN is provided. nanoflann does not require compiling or installing. You just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Cite as:

@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

nanoflann-demo-1

1.4. Why a fork?

  • Execution time efficiency:
    • The power of the original flann library comes from the possibility of choosing between different ANN algorithms. The cost of this flexibility is the declaration of pure virtual methods which (in some circumstances) impose run-time penalties. In nanoflann all those virtual methods have been replaced by a combination of the Curiously Recurring Template Pattern (CRTP) and inlined methods, which are much faster.
    • For radiusSearch(), there is no need to make a call to determine the number of points within the radius and then call it again to get the data. By using STL containers for the output data, containers are automatically resized.
    • Users can (optionally) set the problem dimensionality at compile-time via a template argument, thus allowing the compiler to fully unroll loops.
    • nanoflann allows users to provide a precomputed bounding box of the data, if available, to avoid recomputation.
    • Indices of data points have been converted from int to size_t, which removes a limit when handling very large data sets.

File truncated at 100 lines see the full file

No version for distro ardent showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

nanoflann repository

nanoflann

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-06-09
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann 1.10.1

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Jazzy (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Kilted (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Lyrical (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Rolling (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version

1. About

nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D rotation groups). No support for approximate NN is provided. nanoflann does not require compiling or installing. You just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Cite as:

@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

nanoflann-demo-1

1.4. Why a fork?

  • Execution time efficiency:
    • The power of the original flann library comes from the possibility of choosing between different ANN algorithms. The cost of this flexibility is the declaration of pure virtual methods which (in some circumstances) impose run-time penalties. In nanoflann all those virtual methods have been replaced by a combination of the Curiously Recurring Template Pattern (CRTP) and inlined methods, which are much faster.
    • For radiusSearch(), there is no need to make a call to determine the number of points within the radius and then call it again to get the data. By using STL containers for the output data, containers are automatically resized.
    • Users can (optionally) set the problem dimensionality at compile-time via a template argument, thus allowing the compiler to fully unroll loops.
    • nanoflann allows users to provide a precomputed bounding box of the data, if available, to avoid recomputation.
    • Indices of data points have been converted from int to size_t, which removes a limit when handling very large data sets.

File truncated at 100 lines see the full file

No version for distro bouncy showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

nanoflann repository

nanoflann

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-06-09
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann 1.10.1

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Jazzy (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Kilted (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Lyrical (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Rolling (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version

1. About

nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D rotation groups). No support for approximate NN is provided. nanoflann does not require compiling or installing. You just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Cite as:

@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

nanoflann-demo-1

1.4. Why a fork?

  • Execution time efficiency:
    • The power of the original flann library comes from the possibility of choosing between different ANN algorithms. The cost of this flexibility is the declaration of pure virtual methods which (in some circumstances) impose run-time penalties. In nanoflann all those virtual methods have been replaced by a combination of the Curiously Recurring Template Pattern (CRTP) and inlined methods, which are much faster.
    • For radiusSearch(), there is no need to make a call to determine the number of points within the radius and then call it again to get the data. By using STL containers for the output data, containers are automatically resized.
    • Users can (optionally) set the problem dimensionality at compile-time via a template argument, thus allowing the compiler to fully unroll loops.
    • nanoflann allows users to provide a precomputed bounding box of the data, if available, to avoid recomputation.
    • Indices of data points have been converted from int to size_t, which removes a limit when handling very large data sets.

File truncated at 100 lines see the full file

No version for distro crystal showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

nanoflann repository

nanoflann

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-06-09
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann 1.10.1

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Jazzy (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Kilted (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Lyrical (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Rolling (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version

1. About

nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D rotation groups). No support for approximate NN is provided. nanoflann does not require compiling or installing. You just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Cite as:

@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

nanoflann-demo-1

1.4. Why a fork?

  • Execution time efficiency:
    • The power of the original flann library comes from the possibility of choosing between different ANN algorithms. The cost of this flexibility is the declaration of pure virtual methods which (in some circumstances) impose run-time penalties. In nanoflann all those virtual methods have been replaced by a combination of the Curiously Recurring Template Pattern (CRTP) and inlined methods, which are much faster.
    • For radiusSearch(), there is no need to make a call to determine the number of points within the radius and then call it again to get the data. By using STL containers for the output data, containers are automatically resized.
    • Users can (optionally) set the problem dimensionality at compile-time via a template argument, thus allowing the compiler to fully unroll loops.
    • nanoflann allows users to provide a precomputed bounding box of the data, if available, to avoid recomputation.
    • Indices of data points have been converted from int to size_t, which removes a limit when handling very large data sets.

File truncated at 100 lines see the full file

No version for distro eloquent showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

nanoflann repository

nanoflann

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-06-09
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann 1.10.1

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Jazzy (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Kilted (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Lyrical (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Rolling (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version

1. About

nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D rotation groups). No support for approximate NN is provided. nanoflann does not require compiling or installing. You just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Cite as:

@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

nanoflann-demo-1

1.4. Why a fork?

  • Execution time efficiency:
    • The power of the original flann library comes from the possibility of choosing between different ANN algorithms. The cost of this flexibility is the declaration of pure virtual methods which (in some circumstances) impose run-time penalties. In nanoflann all those virtual methods have been replaced by a combination of the Curiously Recurring Template Pattern (CRTP) and inlined methods, which are much faster.
    • For radiusSearch(), there is no need to make a call to determine the number of points within the radius and then call it again to get the data. By using STL containers for the output data, containers are automatically resized.
    • Users can (optionally) set the problem dimensionality at compile-time via a template argument, thus allowing the compiler to fully unroll loops.
    • nanoflann allows users to provide a precomputed bounding box of the data, if available, to avoid recomputation.
    • Indices of data points have been converted from int to size_t, which removes a limit when handling very large data sets.

File truncated at 100 lines see the full file

No version for distro dashing showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

nanoflann repository

nanoflann

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-06-09
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann 1.10.1

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Jazzy (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Kilted (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Lyrical (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Rolling (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version

1. About

nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D rotation groups). No support for approximate NN is provided. nanoflann does not require compiling or installing. You just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Cite as:

@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

nanoflann-demo-1

1.4. Why a fork?

  • Execution time efficiency:
    • The power of the original flann library comes from the possibility of choosing between different ANN algorithms. The cost of this flexibility is the declaration of pure virtual methods which (in some circumstances) impose run-time penalties. In nanoflann all those virtual methods have been replaced by a combination of the Curiously Recurring Template Pattern (CRTP) and inlined methods, which are much faster.
    • For radiusSearch(), there is no need to make a call to determine the number of points within the radius and then call it again to get the data. By using STL containers for the output data, containers are automatically resized.
    • Users can (optionally) set the problem dimensionality at compile-time via a template argument, thus allowing the compiler to fully unroll loops.
    • nanoflann allows users to provide a precomputed bounding box of the data, if available, to avoid recomputation.
    • Indices of data points have been converted from int to size_t, which removes a limit when handling very large data sets.

File truncated at 100 lines see the full file

No version for distro galactic showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

nanoflann repository

nanoflann

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-06-09
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann 1.10.1

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Jazzy (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Kilted (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Lyrical (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Rolling (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version

1. About

nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D rotation groups). No support for approximate NN is provided. nanoflann does not require compiling or installing. You just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Cite as:

@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

nanoflann-demo-1

1.4. Why a fork?

  • Execution time efficiency:
    • The power of the original flann library comes from the possibility of choosing between different ANN algorithms. The cost of this flexibility is the declaration of pure virtual methods which (in some circumstances) impose run-time penalties. In nanoflann all those virtual methods have been replaced by a combination of the Curiously Recurring Template Pattern (CRTP) and inlined methods, which are much faster.
    • For radiusSearch(), there is no need to make a call to determine the number of points within the radius and then call it again to get the data. By using STL containers for the output data, containers are automatically resized.
    • Users can (optionally) set the problem dimensionality at compile-time via a template argument, thus allowing the compiler to fully unroll loops.
    • nanoflann allows users to provide a precomputed bounding box of the data, if available, to avoid recomputation.
    • Indices of data points have been converted from int to size_t, which removes a limit when handling very large data sets.

File truncated at 100 lines see the full file

No version for distro foxy showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

nanoflann repository

nanoflann

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-06-09
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann 1.10.1

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Jazzy (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Kilted (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Lyrical (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Rolling (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version

1. About

nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D rotation groups). No support for approximate NN is provided. nanoflann does not require compiling or installing. You just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Cite as:

@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

nanoflann-demo-1

1.4. Why a fork?

  • Execution time efficiency:
    • The power of the original flann library comes from the possibility of choosing between different ANN algorithms. The cost of this flexibility is the declaration of pure virtual methods which (in some circumstances) impose run-time penalties. In nanoflann all those virtual methods have been replaced by a combination of the Curiously Recurring Template Pattern (CRTP) and inlined methods, which are much faster.
    • For radiusSearch(), there is no need to make a call to determine the number of points within the radius and then call it again to get the data. By using STL containers for the output data, containers are automatically resized.
    • Users can (optionally) set the problem dimensionality at compile-time via a template argument, thus allowing the compiler to fully unroll loops.
    • nanoflann allows users to provide a precomputed bounding box of the data, if available, to avoid recomputation.
    • Indices of data points have been converted from int to size_t, which removes a limit when handling very large data sets.

File truncated at 100 lines see the full file

No version for distro iron showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

nanoflann repository

nanoflann

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-06-09
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann 1.10.1

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Jazzy (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Kilted (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Lyrical (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Rolling (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version

1. About

nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D rotation groups). No support for approximate NN is provided. nanoflann does not require compiling or installing. You just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Cite as:

@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

nanoflann-demo-1

1.4. Why a fork?

  • Execution time efficiency:
    • The power of the original flann library comes from the possibility of choosing between different ANN algorithms. The cost of this flexibility is the declaration of pure virtual methods which (in some circumstances) impose run-time penalties. In nanoflann all those virtual methods have been replaced by a combination of the Curiously Recurring Template Pattern (CRTP) and inlined methods, which are much faster.
    • For radiusSearch(), there is no need to make a call to determine the number of points within the radius and then call it again to get the data. By using STL containers for the output data, containers are automatically resized.
    • Users can (optionally) set the problem dimensionality at compile-time via a template argument, thus allowing the compiler to fully unroll loops.
    • nanoflann allows users to provide a precomputed bounding box of the data, if available, to avoid recomputation.
    • Indices of data points have been converted from int to size_t, which removes a limit when handling very large data sets.

File truncated at 100 lines see the full file

No version for distro lunar showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

nanoflann repository

nanoflann

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-06-09
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann 1.10.1

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Jazzy (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Kilted (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Lyrical (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Rolling (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version

1. About

nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D rotation groups). No support for approximate NN is provided. nanoflann does not require compiling or installing. You just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Cite as:

@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

nanoflann-demo-1

1.4. Why a fork?

  • Execution time efficiency:
    • The power of the original flann library comes from the possibility of choosing between different ANN algorithms. The cost of this flexibility is the declaration of pure virtual methods which (in some circumstances) impose run-time penalties. In nanoflann all those virtual methods have been replaced by a combination of the Curiously Recurring Template Pattern (CRTP) and inlined methods, which are much faster.
    • For radiusSearch(), there is no need to make a call to determine the number of points within the radius and then call it again to get the data. By using STL containers for the output data, containers are automatically resized.
    • Users can (optionally) set the problem dimensionality at compile-time via a template argument, thus allowing the compiler to fully unroll loops.
    • nanoflann allows users to provide a precomputed bounding box of the data, if available, to avoid recomputation.
    • Indices of data points have been converted from int to size_t, which removes a limit when handling very large data sets.

File truncated at 100 lines see the full file

No version for distro jade showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

nanoflann repository

nanoflann

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-06-09
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann 1.10.1

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Jazzy (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Kilted (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Lyrical (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Rolling (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version

1. About

nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D rotation groups). No support for approximate NN is provided. nanoflann does not require compiling or installing. You just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Cite as:

@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

nanoflann-demo-1

1.4. Why a fork?

  • Execution time efficiency:
    • The power of the original flann library comes from the possibility of choosing between different ANN algorithms. The cost of this flexibility is the declaration of pure virtual methods which (in some circumstances) impose run-time penalties. In nanoflann all those virtual methods have been replaced by a combination of the Curiously Recurring Template Pattern (CRTP) and inlined methods, which are much faster.
    • For radiusSearch(), there is no need to make a call to determine the number of points within the radius and then call it again to get the data. By using STL containers for the output data, containers are automatically resized.
    • Users can (optionally) set the problem dimensionality at compile-time via a template argument, thus allowing the compiler to fully unroll loops.
    • nanoflann allows users to provide a precomputed bounding box of the data, if available, to avoid recomputation.
    • Indices of data points have been converted from int to size_t, which removes a limit when handling very large data sets.

File truncated at 100 lines see the full file

No version for distro indigo showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

nanoflann repository

nanoflann

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-06-09
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann 1.10.1

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Jazzy (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Kilted (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Lyrical (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Rolling (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version

1. About

nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D rotation groups). No support for approximate NN is provided. nanoflann does not require compiling or installing. You just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Cite as:

@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

nanoflann-demo-1

1.4. Why a fork?

  • Execution time efficiency:
    • The power of the original flann library comes from the possibility of choosing between different ANN algorithms. The cost of this flexibility is the declaration of pure virtual methods which (in some circumstances) impose run-time penalties. In nanoflann all those virtual methods have been replaced by a combination of the Curiously Recurring Template Pattern (CRTP) and inlined methods, which are much faster.
    • For radiusSearch(), there is no need to make a call to determine the number of points within the radius and then call it again to get the data. By using STL containers for the output data, containers are automatically resized.
    • Users can (optionally) set the problem dimensionality at compile-time via a template argument, thus allowing the compiler to fully unroll loops.
    • nanoflann allows users to provide a precomputed bounding box of the data, if available, to avoid recomputation.
    • Indices of data points have been converted from int to size_t, which removes a limit when handling very large data sets.

File truncated at 100 lines see the full file

No version for distro hydro showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

nanoflann repository

nanoflann

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-06-09
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann 1.10.1

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Jazzy (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Kilted (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Lyrical (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Rolling (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version

1. About

nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D rotation groups). No support for approximate NN is provided. nanoflann does not require compiling or installing. You just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Cite as:

@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

nanoflann-demo-1

1.4. Why a fork?

  • Execution time efficiency:
    • The power of the original flann library comes from the possibility of choosing between different ANN algorithms. The cost of this flexibility is the declaration of pure virtual methods which (in some circumstances) impose run-time penalties. In nanoflann all those virtual methods have been replaced by a combination of the Curiously Recurring Template Pattern (CRTP) and inlined methods, which are much faster.
    • For radiusSearch(), there is no need to make a call to determine the number of points within the radius and then call it again to get the data. By using STL containers for the output data, containers are automatically resized.
    • Users can (optionally) set the problem dimensionality at compile-time via a template argument, thus allowing the compiler to fully unroll loops.
    • nanoflann allows users to provide a precomputed bounding box of the data, if available, to avoid recomputation.
    • Indices of data points have been converted from int to size_t, which removes a limit when handling very large data sets.

File truncated at 100 lines see the full file

No version for distro kinetic showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

nanoflann repository

nanoflann

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-06-09
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann 1.10.1

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Jazzy (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Kilted (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Lyrical (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Rolling (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version

1. About

nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D rotation groups). No support for approximate NN is provided. nanoflann does not require compiling or installing. You just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Cite as:

@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

nanoflann-demo-1

1.4. Why a fork?

  • Execution time efficiency:
    • The power of the original flann library comes from the possibility of choosing between different ANN algorithms. The cost of this flexibility is the declaration of pure virtual methods which (in some circumstances) impose run-time penalties. In nanoflann all those virtual methods have been replaced by a combination of the Curiously Recurring Template Pattern (CRTP) and inlined methods, which are much faster.
    • For radiusSearch(), there is no need to make a call to determine the number of points within the radius and then call it again to get the data. By using STL containers for the output data, containers are automatically resized.
    • Users can (optionally) set the problem dimensionality at compile-time via a template argument, thus allowing the compiler to fully unroll loops.
    • nanoflann allows users to provide a precomputed bounding box of the data, if available, to avoid recomputation.
    • Indices of data points have been converted from int to size_t, which removes a limit when handling very large data sets.

File truncated at 100 lines see the full file

No version for distro melodic showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

nanoflann repository

nanoflann

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-06-09
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann 1.10.1

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Jazzy (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Kilted (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Lyrical (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Rolling (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version

1. About

nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D rotation groups). No support for approximate NN is provided. nanoflann does not require compiling or installing. You just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Cite as:

@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

nanoflann-demo-1

1.4. Why a fork?

  • Execution time efficiency:
    • The power of the original flann library comes from the possibility of choosing between different ANN algorithms. The cost of this flexibility is the declaration of pure virtual methods which (in some circumstances) impose run-time penalties. In nanoflann all those virtual methods have been replaced by a combination of the Curiously Recurring Template Pattern (CRTP) and inlined methods, which are much faster.
    • For radiusSearch(), there is no need to make a call to determine the number of points within the radius and then call it again to get the data. By using STL containers for the output data, containers are automatically resized.
    • Users can (optionally) set the problem dimensionality at compile-time via a template argument, thus allowing the compiler to fully unroll loops.
    • nanoflann allows users to provide a precomputed bounding box of the data, if available, to avoid recomputation.
    • Indices of data points have been converted from int to size_t, which removes a limit when handling very large data sets.

File truncated at 100 lines see the full file

No version for distro noetic showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

nanoflann repository

nanoflann

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/jlblancoc/nanoflann.git
VCS Type git
VCS Version master
Last Updated 2026-06-09
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
nanoflann 1.10.1

README

nanoflann

nanoflann

CI Linux CI Check clang-format CircleCI Windows build status codecov

Distro Build dev Build releases Stable version
ROS 2 Humble (u22.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Jazzy (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Kilted (u24.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Lyrical (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version
ROS 2 Rolling (u26.04) Build Status amd64 Build Status
arm64 Build Status
Version

1. About

nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D rotation groups). No support for approximate NN is provided. nanoflann does not require compiling or installing. You just need to #include <nanoflann.hpp> in your code.

This library is a fork of the flann library by Marius Muja and David G. Lowe, and born as a child project of MRPT. Following the original license terms, nanoflann is distributed under the BSD license. Please, for bugs use the issues button or fork and open a pull request.

Cite as:

@misc{blanco2014nanoflann,
  title        = {nanoflann: a {C}++ header-only fork of {FLANN}, a library for Nearest Neighbor ({NN}) with KD-trees},
  author       = {Blanco, Jose Luis and Rai, Pranjal Kumar},
  howpublished = {\url{https://github.com/jlblancoc/nanoflann}},
  year         = {2014}
}

See the release CHANGELOG for a list of project changes.

1.1. Obtaining the code

  • Easiest way: clone this GIT repository and take the include/nanoflann.hpp file for use where you need it.
  • Debian or Ubuntu (21.04 or newer) users can install it simply with:
  $ sudo apt install libnanoflann-dev
  
  • macOS users can install nanoflann with Homebrew with:
  $ brew install brewsci/science/nanoflann
  

or

  $ brew tap brewsci/science
  $ brew install nanoflann
  

MacPorts users can use:

  $ sudo port install nanoflann
  

Although nanoflann itself doesn’t have to be compiled, you can build some examples and tests with:

$ sudo apt-get install build-essential cmake libgtest-dev libeigen3-dev
$ mkdir build && cd build && cmake ..
$ make && make test

1.2. C++ API reference

  • Browse the Doxygen documentation.

  • Important note: If L2 norms are used, notice that search radius and all passed and returned distances are actually squared distances.

1.3. Code examples

nanoflann-demo-1

1.4. Why a fork?

  • Execution time efficiency:
    • The power of the original flann library comes from the possibility of choosing between different ANN algorithms. The cost of this flexibility is the declaration of pure virtual methods which (in some circumstances) impose run-time penalties. In nanoflann all those virtual methods have been replaced by a combination of the Curiously Recurring Template Pattern (CRTP) and inlined methods, which are much faster.
    • For radiusSearch(), there is no need to make a call to determine the number of points within the radius and then call it again to get the data. By using STL containers for the output data, containers are automatically resized.
    • Users can (optionally) set the problem dimensionality at compile-time via a template argument, thus allowing the compiler to fully unroll loops.
    • nanoflann allows users to provide a precomputed bounding box of the data, if available, to avoid recomputation.
    • Indices of data points have been converted from int to size_t, which removes a limit when handling very large data sets.

File truncated at 100 lines see the full file