mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-07 19:55:31 -05:00
comments in CCMultiSet.mli, to explain meet/intersection/union
This commit is contained in:
parent
6d0e2fdd2d
commit
432f0f0abd
2 changed files with 14 additions and 4 deletions
|
|
@ -46,18 +46,28 @@ module type S = sig
|
|||
val remove : t -> elt -> t
|
||||
|
||||
val min : t -> elt
|
||||
(** Minimal element w.r.t the total ordering on elements *)
|
||||
|
||||
val max : t -> elt
|
||||
|
||||
val union : t -> t -> t
|
||||
(** [union a b] contains as many occurrences of an element [x]
|
||||
as [count a x + count b x]. *)
|
||||
|
||||
val meet : t -> t -> t
|
||||
(** [meet a b] is a multiset such that
|
||||
[count (meet a b) x = max (count a x) (count b x)] *)
|
||||
|
||||
val intersection : t -> t -> t
|
||||
(** [intersection a b] is a multiset such that
|
||||
[count (intersection a b) x = min (count a x) (count b x)] *)
|
||||
|
||||
val diff : t -> t -> t
|
||||
(** MultiSet difference.
|
||||
[count (diff a b) x = max (count a x - count b x) 0] *)
|
||||
|
||||
val contains : t -> t -> bool
|
||||
(** [contains a x = (count m x > 0)] *)
|
||||
|
||||
val compare : t -> t -> int
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue