package rtree
Module type Rtree.SSource
module Envelope : sig ... endEnvelopes for the Rtree.
module Value : sig ... endValues stored in the Rtree.
type tree = | Node of (Envelope.t * tree) list| Leaf of (Envelope.t * Value.t) list| Empty(*The representation of a tree
*)
Get a representation of the tree. There is no guarantee that this is the same representation used internally.
val empty : int -> tThe empty tree configured with a maximum load size. This is the number of children allowed at a level.
remove tree element removes all elements with equality to the element passed, returning them and the new tree, or None if none are found
remove_eq tree pred removes all elements where pred returns true, returning them and the new tree. If the values returned is empty then no elements were found and the tree is unchanged.
val remove_env : t -> Envelope.t -> Value.t list * tremove_env tree envelope removes all elements within a certain envelope, returning them and the new tree or None if none are found
val find : t -> Envelope.t -> Value.t listfind tree env find all value contained by env in tree.
val size : t -> intsize tree returns the number of element in the tree.
val bounds : t -> Envelope.t optionbounds tree returns the overall bounds of the tree. None is returned for the empty tree.
load vs will "bulk" load values into an r-tree. This will produce a better tree and is preferred over folding with insert.
It uses the OMT algorithm.
val depth : t -> intdepth tree returns the depth of the tree.
iter tree f will apply f to every internal tree node in t. For a Node this will first apply f then descend into the children.
val pp : Format.formatter -> t -> unit