toy-lib-0.1.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.MultiSetVec

Description

Dense, mutable multi set.

Typical problems

Synopsis

Documentation

data MultiSetVec s #

Dense, mutable multi set.

Constructors

MultiSetVec (MVector s Int) (MVector s Int) 

newMSV :: PrimMonad m => Int -> m (MultiSetVec (PrimState m)) #

\(O(N)\)

clearMSV :: PrimMonad m => MultiSetVec (PrimState m) -> m () #

\(O(N)\)

countMSV :: PrimMonad m => MultiSetVec (PrimState m) -> m Int #

\(O(1)\) Returns the number of keys in the multiset.

nullMSV :: PrimMonad m => MultiSetVec (PrimState m) -> m Bool #

\(O(1)\)

readMSV :: PrimMonad m => MultiSetVec (PrimState m) -> Int -> m Int #

\(O(1)\)

incMSV :: PrimMonad m => MultiSetVec (PrimState m) -> Int -> m () #

\(O(1)\)

decMSV :: PrimMonad m => MultiSetVec (PrimState m) -> Int -> m () #

\(O(1)\)

minMSV :: PrimMonad m => MultiSetVec (PrimState m) -> m (Maybe (Int, Int)) #

\(O(N)\) Finds the minimum key element

maxMSV :: PrimMonad m => MultiSetVec (PrimState m) -> m (Maybe (Int, Int)) #

\(O(N)\) Finds the maximum key element