package qcow

  1. Overview
  2. Docs
type elt = int64

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

val make_empty : initial_size:int -> maximum_size:int -> t

make_empty n creates a set of initial_size which can be resized up to maximum size, initially empty

val make_full : initial_size:int -> maximum_size:int -> t

make_full n creates a set of initial_size which can be resized up to maximum size, initially full

val copy : t -> t

copy t returns a duplicate of 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 -> unit

add interval t adds the interval to t in-place

val remove : interval -> t -> unit

remove interval t removes the interval from t in-place

val min_elt : t -> elt

min_elt t returns the smallest element, or raises Not_found if the set is empty.

val to_string : t -> string
module Test : sig ... end
OCaml

Innovation. Community. Security.