Module type Knn.S


module type S = sig .. end
This is the interface to the structure.

type a 
type +'a t 
val empty : 'a t
The empty tree.
val create_balanced : (a * 'a) list -> 'a t
As above, but tries to balance the tree
val add : a -> 'a -> 'a t -> 'a t
Adds a point to the tree. (I hadn't realized this before, but the tree is purely functional.)
val find_k_nearest : 'a t -> int -> float -> a -> (float * a * 'a) list
Finds the k nearest things in the tree.
val contents : 'a t -> (a * 'a) list
Flattens the tree to a list.
val rebalance : 'a t -> 'a t
Rebalances the tree. Slow!