module Make (
K
:
OrderedType
)
(
V
:
OrderedType
)
: S
with type key = K.t and type value = V.t
type
key
type
value
type
t
val empty : t
Empty multimap
val is_empty : t -> bool
Empty multimap?
val add : t -> key -> value -> t
Add a key/value binding
val remove : t -> key -> value -> t
Remove the binding
val remove_all : t -> key -> t
Remove the key from the map
val mem : t -> key -> bool
Is there a binding for this key?
val find : t -> key -> value list
List of values for this key
val find_iter : t -> key -> (value -> unit) -> unit
Iterate on bindings for this key
val count : t -> key -> int
Number of bindings for this key
val iter : t -> (key -> value -> unit) -> unit
Iterate on all key/value
val fold : t ->
'a -> ('a -> key -> value -> 'a) -> 'a
Fold on all key/value
val size : t -> int
Number of keys
val union : t -> t -> t
Union of multimaps
val inter : t -> t -> t
Intersection of multimaps
val diff : t -> t -> t
Difference of maps, ie bindings of the first that are not
in the second
val equal : t -> t -> bool
Same multimap
val compare : t -> t -> int
Total order on multimaps
val submap : t -> t -> bool
submap m1 m2
is true iff all bindings of m1
are also in m2
val to_seq : t -> (key * value) CCMultiMap.sequence
val of_seq : ?init:t ->
(key * value) CCMultiMap.sequence -> t
val keys : t -> key CCMultiMap.sequence
val values : t -> value CCMultiMap.sequence
Some values may occur several times