Module CCMultiSet.Make
Parameters
O : Set.OrderedType
Signature
type elt= O.ttype t
val empty : tval is_empty : t -> boolval mem : t -> elt -> boolval count : t -> elt -> intval singleton : elt -> tval add : t -> elt -> tval remove : t -> elt -> tval add_mult : t -> elt -> int -> tadd_mult set x naddsnoccurrences ofxtoset.- raises Invalid_argument
 if
n < 0.
- since
 - 0.6
 
val remove_mult : t -> elt -> int -> tremove_mult set x nremoves at mostnoccurrences ofxfromset.- raises Invalid_argument
 if
n < 0.
- since
 - 0.6
 
val update : t -> elt -> (int -> int) -> tupdate set x fcallsf nwherenis the current multiplicity ofxinset(0to indicate its absence); the result off nis the new multiplicity ofx.- raises Invalid_argument
 if
f n < 0.
- since
 - 0.6
 
val union : t -> t -> tunion a bcontains as many occurrences of an elementxascount a x + count b x.
val meet : t -> t -> tmeet a bis a multiset such thatcount (meet a b) x = max (count a x) (count b x).
val intersection : t -> t -> tintersection a bis a multiset such thatcount (intersection a b) x = min (count a x) (count b x).
val compare : t -> t -> intval equal : t -> t -> boolval cardinal : t -> intNumber of distinct elements.