KDTREE 2: Fortran 95 and C++ software to efficiently search for near neighbors in a multi-dimensional Euclidean space
arXiv:physics/0408067
Abstract
Many data-based statistical algorithms require that one find \textit{near or nearest neighbors} to a given vector among a set of points in that vector space, usually with Euclidean topology. The k-d data structure and search algorithms are the generalization of classical binary search trees to higher dimensional spaces, so that one may locate near neighbors to an example vector in time instead of the brute-force O(N) time, with being the size of the data base. KDTREE2 is a Fortran 95 module, and a parallel set of C++ classes which implement tree construction and search routines to find either a set of nearest neighbors to an example, or all the neighbors within some Euclidean distance The two versions are independent and function fully on their own. Considerable care has been taken in the implementation of the search methods, resulting in substantially higher computational efficiency (up to an order of magnitude faster) than the author's previous Internet-distributed version. Architectural improvements include rearrangement for memory cache-friendly performance, heap-based priority queues for large searches, and more effective pruning of search paths by geometrical constraints to avoid wasted effort. The improvements are the most potent in the more difficult and slowest cases: larger data base sizes, higher dimensionality manifolds containing the data set, and larger numbers of neighbors to search for. The C++ implementation requires the Standard Template Library as well as the BOOST C++ library be installed.
arXiv commentSoftware is available at ftp://lyapunov.ucsd.edu/pub/nonlinear/kd_tree/kdtree2.tar.gz
Cited by in corpus (11)
- Controlling the weights of simulation particles: adaptive particle management using k-d trees
- Accelerating and parallelizing Lagrangian simulations of mixing-limited reactive transport
- The Timepix Telescope for High Performance Particle Tracking
- Parallel HOP: A Scalable Halo Finder for Massive Cosmological Data Sets
- Conformal Tracking for all-silicon trackers at future electron-positron colliders
- A workflow for seismic imaging with quantified uncertainty
- On the detection and classification of material defects in crystalline solids after energetic particle impact simulations
- Non-isothermal direct bundle simulation of SMC compression molding with a non-Newtonian compressible matrix
- Deterministic Iteratively Built KD-Tree with KNN Search for Exact Applications
- FaVAD: A software workflow for characterisation and visualizing of defects in crystalline structures
- On the classification and quantification of crystal defects after energetic bombardment by machine learned molecular dynamics simulations