C++ API
nanoflann C++ API documentation
nanoflann is a C++ header-only library for building KD-Trees, mostly optimized for 2D or 3D point clouds.
nanoflann does not require compiling or installing, just an #include <nanoflann.hpp> in your code.
Macros that can be defined by the user to configure nanoflann:
NANOFLANN_NO_THREADS: If defined, multithreading is disabled, so the library can be used without linking against a threads library. Requesting a multi-threaded index build (
n_thread_build != 1) then throws.NANOFLANN_FIRST_MATCH: If defined, in case of a tie in distances the item with the smallest index will be returned.
NANOFLANN_NODE_ALIGNMENT: The memory alignment, in bytes, for kd-tree nodes. Default: 16.
Macros defined internally by nanoflann (not meant to be set by the user):
NANOFLANN_RESTRICT: Expands to the compiler-specific
restrictpointer qualifier (__restrict__,__restrict) when available, empty otherwise.NANOFLANN_NODISCARD: Expands to
[[nodiscard]]when the compiler supports it, empty otherwise.NANOFLANN_VERSION: Library version as 0xMmP (M=Major, m=minor, P=patch).
See the README for usage details and examples.
See:
Class Hierarchy
-
- Namespace nanoflann
- Template Struct array_or_vector
- Template Struct array_or_vector< -1, T >
- Template Struct has_assign
- Template Struct has_assign< T, decltype((void) std::declval< T >, ().assign(1, 0), 0) >
- Template Struct has_resize
- Template Struct has_resize< T, decltype((void) std::declval< T >, ().resize(1), 0) >
- Struct IndexDist_Sorter
- Template Struct KDTreeEigenMatrixAdaptor
- Struct KDTreeIncrementalIndexParams
- Struct KDTreeSingleIndexAdaptorParams
- Template Struct L1_Adaptor
- Template Struct L2_Adaptor
- Template Struct L2_Simple_Adaptor
- Struct Metric
- Struct metric_L1
- Template Struct metric_L1::traits
- Struct metric_L2
- Template Struct metric_L2::traits
- Struct metric_L2_Simple
- Template Struct metric_L2_Simple::traits
- Struct metric_SO2
- Template Struct metric_SO2::traits
- Struct metric_SO3
- Template Struct metric_SO3::traits
- Template Struct ResultItem
- Struct SearchParameters
- Template Struct SO2_Adaptor
- Template Struct SO3_Adaptor
- Template Class BoxResultSet
- Template Class KDTreeBaseClass
- Struct KDTreeBaseClass::Interval
- Struct KDTreeBaseClass::Node
- Template Class KDTreeSingleIndexAdaptor
- Template Class KDTreeSingleIndexDynamicAdaptor
- Template Class KDTreeSingleIndexDynamicAdaptor_
- Template Class KDTreeSingleIndexIncrementalAdaptor
- Template Class KDTreeSingleIndexIncrementalAdaptorMT
- Template Class KNNResultSet
- Class PooledAllocator
- Template Class RadiusResultSet
- Template Class RKNNResultSet
- Enum KDTreeSingleIndexAdaptorFlags
- Namespace nanoflann
File Hierarchy
-
- Directory include
- File nanoflann.hpp
- Directory include