package rtree

  1. Overview
  2. Docs

Parameters

module Envelope : sig ... end
module Value : sig ... end

Signature

type t

An Rtree.

val t : t Repr.t

A runtime representation of the rtree.

module Envelope = Envelope

Envelopes for the Rtree.

module Value = Value

Values stored in the Rtree.

type tree =
  1. | Node of (Envelope.t * tree) list
  2. | Leaf of (Envelope.t * Value.t) list
  3. | Empty
    (*

    The representation of a tree

    *)
val tree : t -> tree

Get a representation of the tree. There is no guarantee that this is the same representation used internally.

val empty : int -> t

The empty tree configured with a maximum load size. This is the number of children allowed at a level.

val insert : t -> Value.t -> t

Insert a new element into the tree

val find : t -> Envelope.t -> Value.t list

find tree env find all value contained by env in tree.

val size : t -> int

size tree returns the number of element in the tree.

val values : t -> Value.t list

Returns all the values currently in the index.

val load : ?max_node_load:int -> Value.t list -> t

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.

OCaml

Innovation. Community. Security.