package owee

  1. Overview
  2. Docs

Originally from: https://github.com/UnixJunkie/interval-tree Instead of "Int64.t", we use "Int64.t".

type 'a t
module Interval : sig ... end
Constructors
val create : 'a Interval.t list -> 'a t

create intervals_list : interval tree of all intervals in the list

val of_triplets : (Int64.t * Int64.t * 'a) list -> 'a t

of_triplets interval_triplets : interval tree of all intervals whose bounds and values are given in a list

Query
val query : 'a t -> Int64.t -> 'a Interval.t list

query tree q : list of intervals in the tree t containing the Int64.t q

val iter : 'a t -> f:('a Interval.t -> unit) -> unit

iter tree ~f calls applies f to each interval that has been added to tree. Traversal order is not specified.

OCaml

Innovation. Community. Security.