int-multimap-0.3.1: A data structure that associates each Int key with a set of values

Safe HaskellNone
LanguageHaskell2010

IntMultimap

Contents

Synopsis

Documentation

data IntMultimap a Source #

A multi map of integers to values a.

Instances

Foldable IntMultimap Source # 

Methods

fold :: Monoid m => IntMultimap m -> m #

foldMap :: Monoid m => (a -> m) -> IntMultimap a -> m #

foldr :: (a -> b -> b) -> b -> IntMultimap a -> b #

foldr' :: (a -> b -> b) -> b -> IntMultimap a -> b #

foldl :: (b -> a -> b) -> b -> IntMultimap a -> b #

foldl' :: (b -> a -> b) -> b -> IntMultimap a -> b #

foldr1 :: (a -> a -> a) -> IntMultimap a -> a #

foldl1 :: (a -> a -> a) -> IntMultimap a -> a #

toList :: IntMultimap a -> [a] #

null :: IntMultimap a -> Bool #

length :: IntMultimap a -> Int #

elem :: Eq a => a -> IntMultimap a -> Bool #

maximum :: Ord a => IntMultimap a -> a #

minimum :: Ord a => IntMultimap a -> a #

sum :: Num a => IntMultimap a -> a #

product :: Num a => IntMultimap a -> a #

(Eq a, Hashable a) => IsList (IntMultimap a) Source # 

Associated Types

type Item (IntMultimap a) :: * #

Eq a => Eq (IntMultimap a) Source # 
Show a => Show (IntMultimap a) Source # 
Generic (IntMultimap a) Source # 

Associated Types

type Rep (IntMultimap a) :: * -> * #

Methods

from :: IntMultimap a -> Rep (IntMultimap a) x #

to :: Rep (IntMultimap a) x -> IntMultimap a #

type Rep (IntMultimap a) Source # 
type Rep (IntMultimap a) = D1 * (MetaData "IntMultimap" "IntMultimap" "int-multimap-0.3.1-JmMMXMaYs5mfJbwP1SPFy" True) (C1 * (MetaCons "IntMultimap" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (IntMap (HashSet a)))))
type Item (IntMultimap a) Source # 
type Item (IntMultimap a) = (Int, a)

Construction

singleton :: Hashable a => Int -> a -> IntMultimap a Source #

List

toList :: IntMultimap a -> [(Int, a)] Source #

fromList :: (Eq a, Hashable a) => [(Int, a)] -> IntMultimap a Source #

Transformations

map :: (Eq b, Hashable b) => (a -> b) -> IntMultimap a -> IntMultimap b Source #

Folds

foldlWithKey' :: (Int -> a -> b -> a) -> a -> IntMultimap b -> a Source #

Basic interface

delete Source #

Arguments

:: (Hashable a, Eq a) 
=> Int

Key

-> a 
-> IntMultimap a 
-> IntMultimap a 

insert :: (Hashable a, Eq a) => Int -> a -> IntMultimap a -> IntMultimap a Source #

Conversions

Filter