package rtree
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
A pure OCaml R-Tree implementation
Install
dune-project
Dependency
Authors
Maintainers
Sources
rtree-0.3.0.tbz
sha256=1cf52e63601cfeaaae8b37ce8afaa6ef41dcadd575fc2bff15be14414bb4622c
sha512=57e1695156518793b705411e91648e7f2524f7bb5415c661ae47af59ef376b9d057bb612c3d1409fcc73d64b50d5df3030d7d0b533ec18c4d04bc63a35d0eb7e
doc/CHANGES.html
v0.3.0 2026-09-18 Belfast
This release removed the dependency on repr (which pulled in at least 6 additional dependencies). This is a breaking change to the interfaces for constructing rtrees. However, seeing as we are <1.0.0 it is being released as a minor bump.
Existing rtree instantiations can easily fulfil the module interface using their repr runtime type representation like so:
module Line = struct
type t = { p0 : float * float; p1 : float * float }
let t =
let open Repr in
record "line" (fun p0 p1 -> { p0; p1 })
|+ field "p0" (pair float float) (fun t -> t.p0)
|+ field "p1" (pair float float) (fun t -> t.p1)
|> sealr
(* ADDED: New lines that add [equal] and [pp] functions defined
using the existing runtime type representation. *)
let equal = Repr.equal t |> Repr.unstage
let pp = Repr.pp t
type envelope = Rtree.Rectangle.t
let envelope { p0 = (x1, y1); p1 = (x2, y2) } =
let x0 = Float.min x1 x2 in
let x1 = Float.max x1 x2 in
let y0 = Float.min y1 y2 in
let y1 = Float.max y1 y2 in
Rtree.Rectangle.v ~x0 ~y0 ~x1 ~y1
end
module R = Rtree.Make(Rtree.Rectangle)(Line)This is a quick fix. Users are advised to remove their dependency on repr and hand-write equal and pp functions.
Changes
- Remove dependency on
repr. Users of this library will now have to provide their ownequalandppfunctions for the values they are storing in their rtree (#45, @patricoferris).
v0.2.0 2026-05-05 Belfast
- Add a set of
removefunctions (#44, @FayCarsons)
Bugs, Fixes and Optimisations
- Fix
valuesnot returning entire tree (#40, @mdales) - Added bounds function to get overall tree dimensions (#42, @mdales)
v0.1.1 2023-08-17 Cambridge
Bugs, Fixes and Optimisations
- Remove extra length calculations (#16, @lindig)
- Remove some polymorphic comparisons and replace with
Floatfunctions (#15, @patricoferris) - Fix stack overflows in OMT and Rectangle.merge (#14, @patricoferris, reported by @lindig)
v0.1.0 2023-08-08 Munich
- Initial release
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page