kdtree 0.1.0

A k-dimensional tree implementation for D.


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

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

Authors: Mihail-K

Dependencies: none

Versions:
0.1.0 2016-Mar-25
~master 2016-Mar-25
Show all 2 versions
Stats:
  • 0 downloads today

  • 1 downloads this week

  • 4 downloads this month

  • 59 downloads total