CCMultiMap.S
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 iter
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, i.e. 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.
submap m1 m2
true
m1
m2
val to_iter : t -> (key * value) iter
val of_iter : ?init:t -> (key * value) iter -> t
val keys : t -> key iter
val values : t -> value iter
Some values may occur several times.