SkillAgentSearch skills...

KDTree

Simple C++ KD-Tree implementation

Install / Use

/learn @crvs/KDTree
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

KDTree

Simple C++ static KD-Tree implementation with minimal functionality.

  • points are given as STL vectors (and inserted in their own STL vector) so supports n-dimensional points for any n
  • makes full trees, (i.e. does not cut-off the branching at some arbitrary level) giving the nearest neighbor query have (strong) logarithmic complexity.
  • builds the tree in one go (does not support adding nodes, the tree is built from a list of points and cannot be altered afterwards)
  • points are assumed to be STL vectors
  • it provides the following queries:
    • nearest neighbor
    • neighbors within a given distance
    • k nearest neighbours

News

Version 2.0.0

  • Added K nearest neighbours query.

License and copyright

© J. Frederico Carvalho Licensed under the BSD3 License

View on GitHub
GitHub Stars224
CategoryDevelopment
Updated1mo ago
Forks76

Languages

C++

Security Score

95/100

Audited on Feb 21, 2026

No findings