Safe Haskell | None |
---|---|

Language | Haskell2010 |

# Documentation

The k-d tree is a data structure capable of efficiently answering
nearest neighbor search queries in low-dimensional spaces. As a rule
of thumb, for efficient lookups the number of points in `k`

dimensions
should greatly exceed `2^k`

# Construction

fromVector :: (Ord a, Vector v (f a)) => [E f] -> v (f a) -> KdTree f a Source

Construct a `KdTree`

from a vector of points

# Queries

nearest :: forall f a. (Ord a, Num a, Metric f) => f a -> KdTree f a -> Maybe (f a) Source

Find the point nearest to the given point