package core_unix

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Interval.SetSource

Sourcetype 'a t
include Core.Bin_prot.Binable.S1 with type 'a t := 'a t
Sourceval bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
Sourceval bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
Sourceval bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
Sourceval __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
Sourceval bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
Sourceval bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
Sourceval bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
include Sexplib0.Sexpable.S1 with type 'a t := 'a t
Sourceval t_of_sexp : (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a t
Sourceval sexp_of_t : ('a -> Sexplib0.Sexp.t) -> 'a t -> Sexplib0.Sexp.t
Sourceval create_exn : ('a * 'a) list -> 'a t

create_exn creates an interval set containing intervals whose lower and upper bounds are given by the pairs passed to the function. Raises if the pairs overlap.

Sourceval create_from_intervals_exn : 'a t list -> 'a t

create_from_intervals_exn creates an interval set. Empty intervals are dropped. Raises if the nonempty intervals are not disjoint.

Sourceval contains : 'a t -> 'a -> bool
Sourceval contains_set : container:'a t -> contained:'a t -> bool

contains_set returns true iff for every interval in the contained set, there exists an interval in the container set that is its superset.

Sourceval ubound_exn : 'a t -> 'a

The largest and smallest element of the interval set, respectively. Raises Invalid_argument on empty sets.

Sourceval lbound_exn : 'a t -> 'a
Sourceval ubound : 'a t -> 'a option
Sourceval lbound : 'a t -> 'a option
Sourceval inter : 'a t -> 'a t -> 'a t

inter t1 t2 computes the intersection of sets t1 and t2. O(length t1 * length t2).

Sourceval union : 'a t -> 'a t -> 'a t

union t1 t2 computes the union of sets t1 and t2. O((length t1 + length t2) * log(length t1 + length t2)).

Sourceval union_list : 'a t list -> 'a t

union_list l computes the union of a list of sets. O(sum length * log(sum length)).

OCaml

Innovation. Community. Security.