KdTree: KdTree, for efficient search in K-dimensional point clouds.

[ bsd3, data-mining, data-structures, graphics, library, machine-learning ] [ Propose Tags ]

This is a simple library for k-d trees in Haskell. It enables searching through collections of points in O(log N) average time, using the nearestNeighbor function.


[Skip to Readme]

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1, 0.2, 0.2.1, 0.2.1.1, 0.2.2.0, 0.2.2.1
Dependencies base (<5), QuickCheck [details]
License BSD-3-Clause
Copyright Copyright 2011, Issac Trotts & Contributors
Author Issac Trotts
Maintainer jesse.kempf@binarysunrise.io
Category Data Mining, Data Structures, Graphics, Machine Learning
Home page https://github.com/binarysunrise-io/kdtree
Source repo head: git clone git@github.com:binarysunrise-io/kdtree.git
Uploaded by jessekempf at 2017-09-29T05:51:50Z
Distributions NixOS:0.2.2.1
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 5902 total (19 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-09-29 [all 1 reports]

Readme for KdTree-0.2.2.1

[back to package description]
This is a simple library for k-d trees in Haskell, based on the algorithms
at http://en.wikipedia.org/wiki/K-d_tree.

It enables efficient searching through collections of points in O(log N) time
for randomly distributed points, using the nearestNeighbor function.

Here is an example of an interactive session using this module:

[ ~/haskell/KdTree ] ghci
GHCi, version 7.0.3: http://www.haskell.org/ghc/  :? for help
...
Prelude> :m Data.Trees.KdTree 
Prelude Data.Trees.KdTree> import Test.QuickCheck
Prelude Data.Trees.KdTree Test.QuickCheck> points <- sample' arbitrary :: IO [Point3d]
...
Prelude Data.Trees.KdTree Test.QuickCheck> let tree = fromList points
Prelude Data.Trees.KdTree Test.QuickCheck> nearestNeighbor tree (head points)
Just (Point3d {p3x = 0.0, p3y = 0.0, p3z = 0.0})
Prelude Data.Trees.KdTree Test.QuickCheck> head points
Point3d {p3x = 0.0, p3y = 0.0, p3z = 0.0}