add lo hi v t adds the interval (lo, hi) labeled with value v to the contents of t. Note that in contrast to sets, identical intervals (even with identical labels) may be *repeated* in an interval tree. E.g., add 1 2 () (add 1 2 ()) contains 2 intervals.
val to_backwards_seq : 'at->(int * int * 'a)Stdlib.Seq.t
Searching and filtering
val find_closest : 'at->int ->int -> int * int * 'a * int
find_closest lo hi t returns the interval in t which is at minimal distance of the interval [lo;hi]. The resulting tuple contains from left to right, left-end of the interval, right-end of the interval, value associated to the interval and distance to the interval given in argument. Overlapping intervals are at distance 0 of each other.
Raises Empty_tree if t is empty
val find_intersecting_elem :
'at->int ->int ->(int * int * 'a)Stdlib.Seq.t
find_intersecting_elem a b t is equivalent to Seq.filter (fun
(x,y,_) -> intersects x y t) (to_seq t) but is more efficient.
val filter_overlapping : 'at->low:int ->high:int ->'at
Create an interval tree with the elements which overlap with [low, high].