kdtree 0.1.0
A k-dimensional tree implementation for D.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
kdtree
A k-dimensional tree implementation for D.
Example Code
import kdtree;
void main()
{
// Construct a 2-Dimensional tree of integers.
auto tree = KDNode!(2, int).build([0, 0], [0, 1], [1, 0], [1, 1]);
// Find the node closest to (-3, 5).
auto near = tree.nearest([-3, 5].kdPoint);
assert(near == [0, 1].kdPoint);
}
Caveats
kdtree is currently not intended for altering constructed trees. It's limited to constructing trees from a series of data points and performing nearest-neighbour lookups.
License
MIT
- 0.1.0 released 8 years ago
- mintyfresh/kdtree
- MIT
- Copyright © 2016, Mihail K
- Authors:
- Dependencies:
- none
- Versions:
-
0.1.0 2016-Mar-25 ~master 2016-Mar-25 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
81 downloads total
-
- Score:
- 1.5
- Short URL:
- kdtree.dub.pm