Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Multi set backed by IntMap
.
Synopsis
- type MultiSet = (Int, IntMap Int)
- emptyMS :: MultiSet
- singletonMS :: Int -> MultiSet
- fromListMS :: [Int] -> MultiSet
- incMS :: Int -> MultiSet -> MultiSet
- decMS :: Int -> MultiSet -> MultiSet
- addMS :: Int -> Int -> MultiSet -> MultiSet
- subMS :: Int -> Int -> MultiSet -> MultiSet
- memberMS :: Int -> MultiSet -> Bool
- notMemberMS :: Int -> MultiSet -> Bool
- decFindMinMS :: MultiSet -> (Int, MultiSet)
- decFindMaxMS :: MultiSet -> (Int, MultiSet)
- lookupMS :: Int -> MultiSet -> Maybe Int
- getMS :: HasCallStack => Int -> MultiSet -> Int
- innerMS :: MultiSet -> IntMap Int
Documentation
singletonMS :: Int -> MultiSet #
\(O(1)\)
fromListMS :: [Int] -> MultiSet #
\(O(N W)\)
notMemberMS :: Int -> MultiSet -> Bool #
\(O(W)\)
decFindMinMS :: MultiSet -> (Int, MultiSet) #
\(O(W)\)
decFindMaxMS :: MultiSet -> (Int, MultiSet) #
\(O(W)\)