libssrckdtree Generic k-d tree C++ template library
libssrckdtree is a C++ header-only template library of spatial data structures, currently containing only an implementation of a k-d tree largely conforming to STL associative container requirements. Additional spatial data structures may be added in the future. An older version of the software also included a Java implementation, which, by popular demand, has been repackaged as a separate libssrckdtree-j release.
libssrckdtree implements a fully generalized multi-dimensional k-d tree. You can use keys with two, three, or more dimensions and can store any value that can be stored in an STL container. Nearest neighbor and k-nearest neighbor search are implemented as of version 1.0.6.
For more information, read the overview.
|1.0.8||libssrckdtree-1.0.8.tar.xz||LICENSE||CHANGES||1.0.8 API||Test Code Coverage|
A Simple Example
kd_tree template class follows the interface of
STL map as far as possible, making it usable with some STL algorithms.
However, it implements custom functions for range searching and
optimizing end of range detection during iteration. Keys must
be compatible with the TR1 fixed size array class, supporting both
dynamic value retrieval via
operator and compile-time value
std::get. It is not possible to use a tuple as
a key, given dynamic value retrieval requirements during tree traversal.
Container elements are stored by value, per STL requirements. Any class that
can be stored in an STL container can be stored as a
The following example inserts some point/string pairs into a
kd_tree instance, demonstrates the use of an STL
algorithm, and iterates over a range to print some key-value
Unsupported Sava Algorithms Release
Sava Algorithms was something of an experiment and is not actively maintained. We make it available for those who require a Java implementation or need to use a C++ compiler that does not support C++0x. The Java implementation has been superseded by libssrckdtree-j.
|Version||Java Source||Java Binaries||C++ Source||License|