package mopsa

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

Sets with polymorphic values

type 'a set =
  1. | Empty
  2. | Node of {
    1. l : 'a set;
    2. v : 'a;
    3. r : 'a set;
    4. h : int;
    }
type 'a compare = 'a -> 'a -> int
type 'a t = {
  1. set : 'a set;
  2. compare : 'a compare;
}
type set_printer = {
  1. print_empty : string;
    (*

    Special text for empty sets

    *)
  2. print_begin : string;
    (*

    Text before the first element

    *)
  3. print_sep : string;
    (*

    Text between two elements

    *)
  4. print_end : string;
    (*

    Text after the last element

    *)
}
val height : 'a set -> int
val create : 'a set -> 'a -> 'a set -> 'a set
val bal : 'a set -> 'a -> 'a set -> 'a set
val add_min_element : 'a -> 'a set -> 'a set
val add_max_element : 'a -> 'a set -> 'a set
val join : 'a set -> 'a -> 'a set -> 'a set
val remove_min_elt : 'a set -> 'a set
val merge : 'a set -> 'a set -> 'a set
val concat : 'a set -> 'a set -> 'a set
type 'a enumeration =
  1. | End
  2. | More of 'a * 'a set * 'a enumeration
val cons_enum : 'a set -> 'a enumeration -> 'a enumeration
val elements_aux : 'a list -> 'a set -> 'a list
val find_first_aux : 'a -> ('a -> bool) -> 'a set -> 'a
val find_first_opt_aux : 'a -> ('a -> bool) -> 'a set -> 'a option
val find_last_aux : 'a -> ('a -> bool) -> 'a set -> 'a
val find_last_opt_aux : 'a -> ('a -> bool) -> 'a set -> 'a option
val try_join : ('a -> 'a -> int) -> 'a set -> 'a -> 'a set -> 'a set
val of_sorted_list : 'a list -> 'a set
val cut : ('a -> 'b -> int) -> 'a -> 'b set -> 'b set * bool * 'b set
val iter2 : ('a -> 'b -> int) -> ('a -> 'c) -> ('b -> 'd) -> ('a -> 'c) -> 'a set -> 'b set -> unit
val fold2 : ('a -> 'b -> int) -> ('a -> 'c -> 'c) -> ('b -> 'c -> 'c) -> ('a -> 'c -> 'c) -> 'a set -> 'b set -> 'c -> 'c
val for_all2 : ('a -> 'b -> int) -> ('a -> bool) -> ('b -> bool) -> ('a -> bool) -> 'a set -> 'b set -> bool
val exists2 : ('a -> 'b -> int) -> ('a -> bool) -> ('b -> bool) -> ('a -> bool) -> 'a set -> 'b set -> bool
val iter2_diff : ('a -> 'a -> int) -> ('a -> unit) -> ('a -> 'b) -> 'a set -> 'a set -> unit
val fold2_diff : ('a -> 'a -> int) -> ('a -> 'b -> 'b) -> ('a -> 'b -> 'b) -> 'a set -> 'a set -> 'b -> 'b
val for_all2_diff : ('a -> 'a -> int) -> ('a -> bool) -> ('a -> bool) -> 'a set -> 'a set -> bool
val exists2_diff : ('a -> 'a -> int) -> ('a -> bool) -> ('a -> bool) -> 'a set -> 'a set -> bool
val diff_list : ('a -> 'a -> int) -> 'a set -> 'a set -> 'a list
val sym_diff_list : ('a -> 'a -> int) -> 'a set -> 'a set -> 'a list * 'a list
val add_sym_diff : ('a -> 'a -> int) -> 'a set -> ('a list * 'a list) -> 'a set
val iter_slice : ('a -> 'b -> int) -> ('a -> unit) -> 'a set -> 'b -> 'b -> unit
val fold_slice : ('a -> 'b -> int) -> ('a -> 'c -> 'c) -> 'a set -> 'b -> 'b -> 'c -> 'c
val for_all_slice : ('a -> 'b -> int) -> ('a -> bool) -> 'a set -> 'b -> 'b -> bool
val exists_slice : ('a -> 'b -> int) -> ('a -> bool) -> 'a set -> 'b -> 'b -> bool
val print_gen : ('a -> string -> unit) -> set_printer -> ('a -> 'b -> 'c) -> 'a -> 'b set -> unit
val print : set_printer -> (Stdlib.out_channel -> 'a -> 'b) -> Stdlib.out_channel -> 'a set -> unit
val bprint : set_printer -> (Stdlib.Buffer.t -> 'a -> 'b) -> Stdlib.Buffer.t -> 'a set -> unit
val fprint : set_printer -> (Stdlib.Format.formatter -> 'a -> 'b) -> Stdlib.Format.formatter -> 'a set -> unit
val to_string : set_printer -> ('a -> string) -> 'a set -> string
val printer_default : set_printer

MOPSA Print as set: lem1,...,elemn

val empty : 'a compare -> 'a t
val is_empty : 'a t -> bool
val mem : 'a -> 'a t -> bool
val add : 'a -> 'a t -> 'a t
val singleton : 'a compare -> 'a -> 'a t
val remove : 'a -> 'a t -> 'a t
val union : 'a t -> 'a t -> 'a t
val inter : 'a t -> 'a t -> 'a t
val diff : 'a t -> 'a t -> 'a t
val compare : 'a t -> 'a t -> int
val equal : 'a t -> 'a t -> bool
val subset : 'a t -> 'a t -> bool
val iter : ('a -> 'b) -> 'a t -> unit
val map : ('a -> 'a) -> 'a t -> 'a t
val fold : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val for_all : ('a -> bool) -> 'a t -> bool
val exists : ('a -> bool) -> 'a t -> bool
val filter : ('a -> bool) -> 'a t -> 'a t
val partition : ('a -> bool) -> 'a t -> 'a t * 'a t
val cardinal : 'a t -> int
val elements : 'a t -> 'a list
val min_elt : 'a t -> 'a
val min_elt_opt : 'a t -> 'a option
val max_elt : 'a t -> 'a
val max_elt_opt : 'a t -> 'a option
val choose : 'a t -> 'a
val choose_opt : 'a t -> 'a option
val split : 'a -> 'a t -> 'a t * bool * 'a t
val find : 'a -> 'a t -> 'a
val find_opt : 'a -> 'a t -> 'a option
val find_first : ('a -> bool) -> 'a t -> 'a
val find_first_opt : ('a -> bool) -> 'a t -> 'a option
val find_last : ('a -> bool) -> 'a t -> 'a
val find_last_opt : ('a -> bool) -> 'a t -> 'a option
val of_list : 'a compare -> 'a list -> 'a t
OCaml

Innovation. Community. Security.