package interval-map

  1. Overview
  2. Docs

Parameters

Signature

module Bound : sig ... end
module Interval : sig ... end
module Query_results : sig ... end
type 'a t
val empty : 'a t

empty is an empty interval map.

val size : 'a t -> int

size map returns the number of values stored in the map. Multiple values may be stored with each interval, so the number of values is not necessarily the same as the number of intervals.

val add : Interval.t -> 'a -> 'a t -> 'a t

insert interval value map adds value to map associated with interval.

val query_interval : Interval.t -> 'a t -> 'a Query_results.t

query_interval interval map finds all values associated with interval in the map. Results are provided as a generator, which traverses the map as results are read.

val query_interval_list : Interval.t -> 'a t -> (Interval.t * 'a list) list

query_interval interval map finds all values associated with interval in the map and returns the results as a list.

OCaml

Innovation. Community. Security.