Hoogle Search
Within Stackage Nightly 2025-10-07 (ghc-9.12.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
monoidmap-internal Data.MonoidMap.Internal.RecoveredMap No documentation available.
-
An efficient implementation of multisets of integers, also sometimes called bags. A multiset is like a set, but it can contain multiple copies of the same element. Since many function names (but not the type name) clash with Prelude names, this module is usually imported qualified, e.g.
import Data.IntMultiSet (IntMultiSet) import qualified Data.IntMultiSet as IntMultiSet
The implementation of IntMultiSet is based on the Data.IntMap module. Many operations have a worst-case complexity of O(min(n,W)). This means that the operation can become linear in the number of elements with a maximum of W -- the number of bits in an Int (32 or 64). Here n refers to the number of distinct elements, t is the total number of elements. -
multiset Data.IntMultiSet A multiset of integers. The same value can occur multiple times.
fromSet :: IntSet -> IntMultiSetmultiset Data.IntMultiSet O(n). Convert an IntMap to a multiset.
isProperSubsetOf :: IntMultiSet -> IntMultiSet -> Boolmultiset Data.IntMultiSet O(n+m). Is this a proper subset? (ie. a subset but not equal).
isSubsetOf :: IntMultiSet -> IntMultiSet -> Boolmultiset Data.IntMultiSet O(n+m). Is this a subset? (s1 `isSubsetOf` s2) tells whether s1 is a subset of s2.
toSet :: IntMultiSet -> IntSetmultiset Data.IntMultiSet O(n). Convert a multiset to an IntMap, removing duplicates.
-
An efficient implementation of multisets, also sometimes called bags. A multiset is like a set, but it can contain multiple copies of the same element. Unless otherwise specified all insert and remove opertions affect only a single copy of an element. For example the minimal element before and after deleteMin could be the same, only with one less occurrence. Since many function names (but not the type name) clash with Prelude names, this module is usually imported qualified, e.g.
import Data.MultiSet (MultiSet) import qualified Data.MultiSet as MultiSet
The implementation of MultiSet is based on the Data.Map module. Note that the implementation is left-biased -- the elements of a first argument are always preferred to the second, for example in union or insert. Of course, left-biasing can only be observed when equality is an equivalence relation instead of structural equality. In the complexity of functions n refers to the number of distinct elements, t is the total number of elements. -
multiset Data.MultiSet A multiset of values a. The same value can occur multiple times.
fromSet :: Set a -> MultiSet amultiset Data.MultiSet O(n). Convert a Set to a multiset.