package qcow

  1. Overview
  2. Docs
type elt = cluster

The type of the set elements

type interval

An interval: a range (x, y) of set values where all the elements from x to y inclusive are in the set

module Interval : sig ... end
type t

The type of sets

include sig ... end
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val empty : t

The empty set

val is_empty : t -> bool

Test whether a set is empty or not

val mem : elt -> t -> bool

mem elt t tests whether elt is in set t

val fold : (interval -> 'a -> 'a) -> t -> 'a -> 'a

fold f t acc folds f across all the intervals in t

val fold_s : (interval -> 'a -> 'a Lwt.t) -> t -> 'a -> 'a Lwt.t

fold_s f t acc folds f across all the intervals in t

val add : interval -> t -> t

add interval t returns the set consisting of t plus interval

val remove : interval -> t -> t

remove interval t returns the set consisting of t minus interval

val min_elt : t -> interval

min_elt t returns the smallest (in terms of the ordering) interval in t, or raises Not_found if the set is empty.

val max_elt : t -> interval

max_elt t returns the largest (in terms of the ordering) interval in t, or raises Not_found if the set is empty.

val choose : t -> interval

choose t returns one interval, or raises Not_found if the set is empty

val union : t -> t -> t

set union

val diff : t -> t -> t

set difference

val inter : t -> t -> t

set intersection

OCaml

Innovation. Community. Security.