more-containers-0.2.1.0: A few more collections

Safe HaskellNone
LanguageHaskell2010

Data.Multimap.Set

Description

This module provides set-specific multimap functionality.

Synopsis

Documentation

type SetMultimap = Multimap Set Source #

A multimap with Set values. This multimap implementation will automatically deduplicate values per key. For example:

let mm = fromList [('a', 1), ('a', 1)] :: SetMultimap Char Int
size mm == 1 -- True

See Data.Multimap.Set for operations specific to this type.

map :: (Ord k, Ord v1, Ord v2) => (v1 -> v2) -> SetMultimap k v1 -> SetMultimap k v2 Source #

O(n * log n) Maps over the multimap's values. This function is useful since Set is not a functor.

delete :: (Ord k, Ord v) => k -> v -> SetMultimap k v -> SetMultimap k v Source #

O(log m) Deletes an entry from the multimap.

member' :: (Ord k, Ord v) => k -> v -> SetMultimap k v -> Bool Source #

O(log n) Checks whether an entry (key plus value) is a member of the multimap.

notMember' :: (Ord k, Ord v) => k -> v -> SetMultimap k v -> Bool Source #

O(log n) Checks whether an entry (key plus value) is a not member of the multimap.