[ANN] minivpt 2.0.0 in opam

The vantage point tree implementation in OCaml has a new functorial interface.
Thanks to Ilias Garnier for contributing.

Toplevel usage example:
#require “minivpt”;;

module Point_2D =
struct
type t = float * float
let dist (x0, y0) (x1, y1) =
let square x =
x *. x
in
sqrt (square (x0 -. x1) +. square (y0 -. y1))
end

module Vpt = Vp_tree.Make(Point_2D)

–>

module Vpt :
sig
type t = Vp_tree.Make(Point_2D).t
val create : Point_2D.t list -> t
val nearest_neighbor : Point_2D.t -> t -> float * Point_2D.t
val to_list : t -> Point_2D.t list
val is_empty : t -> bool
end

For those of us who are unaware, what is a vantage point tree?

1 Like