diet-0.1.0.0: Discrete Interval Encoding Trees

Data.Diet.Map.Unboxed.Lifted

Contents

Synopsis

# Documentation

data Map k v Source #

Instances

 (Prim k, Ord k, Enum k, Eq v) => IsList (Map k v) Source # Associated Typestype Item (Map k v) :: * # MethodsfromList :: [Item (Map k v)] -> Map k v #fromListN :: Int -> [Item (Map k v)] -> Map k v #toList :: Map k v -> [Item (Map k v)] # (Prim k, Eq k, Eq v) => Eq (Map k v) Source # Methods(==) :: Map k v -> Map k v -> Bool #(/=) :: Map k v -> Map k v -> Bool # (Prim k, Show k, Show v) => Show (Map k v) Source # MethodsshowsPrec :: Int -> Map k v -> ShowS #show :: Map k v -> String #showList :: [Map k v] -> ShowS # (Prim k, Ord k, Enum k, Semigroup v, Eq v) => Semigroup (Map k v) Source # Methods(<>) :: Map k v -> Map k v -> Map k v #sconcat :: NonEmpty (Map k v) -> Map k v #stimes :: Integral b => b -> Map k v -> Map k v # (Prim k, Ord k, Enum k, Semigroup v, Eq v) => Monoid (Map k v) Source # Methodsmempty :: Map k v #mappend :: Map k v -> Map k v -> Map k v #mconcat :: [Map k v] -> Map k v # type Item (Map k v) Source # type Item (Map k v) = (k, k, v)

Arguments

 :: (Prim k, Ord k) => k inclusive lower bound -> k inclusive upper bound -> v value -> Map k v

O(1) Create a diet map with a single element.

lookup :: (Prim k, Ord k) => k -> Map k v -> Maybe v Source #

O(log n) Lookup the value at a key in the map.

# List Conversion

fromList :: (Ord k, Enum k, Prim k, Eq v) => [(k, k, v)] -> Map k v Source #

fromListAppend :: (Ord k, Enum k, Prim k, Semigroup v, Eq v) => [(k, k, v)] -> Map k v Source #

Arguments

 :: (Ord k, Enum k, Prim k, Eq v) => Int expected size of resulting Map -> [(k, k, v)] key-value pairs -> Map k v

Arguments

 :: (Ord k, Enum k, Prim k, Semigroup v, Eq v) => Int expected size of resulting Map -> [(k, k, v)] key-value pairs -> Map k v