discrimination-0.4: Fast generic linear-time sorting, joins and container construction.

Copyright(c) Edward Kmett 2015
LicenseBSD-style
MaintainerEdward Kmett <ekmett@gmail.com>
Portabilitynon-portable
Safe HaskellTrustworthy
LanguageHaskell2010

Data.Discrimination.Internal.WordMap

Description

This module suppose a Word64-based array-mapped PATRICIA Trie.

The most significant nybble is isolated by using techniques based on https://www.fpcomplete.com/user/edwardk/revisiting-matrix-multiplication/part-4 but modified to work nybble-by-nybble rather than bit-by-bit.

Synopsis

Documentation

data WordMap v Source #

Instances
Functor WordMap Source # 
Instance details

Defined in Data.Discrimination.Internal.WordMap

Methods

fmap :: (a -> b) -> WordMap a -> WordMap b #

(<$) :: a -> WordMap b -> WordMap a #

Foldable WordMap Source # 
Instance details

Defined in Data.Discrimination.Internal.WordMap

Methods

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

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

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

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

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

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

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

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

toList :: WordMap a -> [a] #

null :: WordMap a -> Bool #

length :: WordMap a -> Int #

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

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

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

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

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

Traversable WordMap Source # 
Instance details

Defined in Data.Discrimination.Internal.WordMap

Methods

traverse :: Applicative f => (a -> f b) -> WordMap a -> f (WordMap b) #

sequenceA :: Applicative f => WordMap (f a) -> f (WordMap a) #

mapM :: Monad m => (a -> m b) -> WordMap a -> m (WordMap b) #

sequence :: Monad m => WordMap (m a) -> m (WordMap a) #

Show v => Show (WordMap v) Source # 
Instance details

Defined in Data.Discrimination.Internal.WordMap

Methods

showsPrec :: Int -> WordMap v -> ShowS #

show :: WordMap v -> String #

showList :: [WordMap v] -> ShowS #

NFData v => NFData (WordMap v) Source # 
Instance details

Defined in Data.Discrimination.Internal.WordMap

Methods

rnf :: WordMap v -> () #

singleton :: Key -> v -> WordMap v Source #

Build a singleton WordMap

insert :: Key -> v -> WordMap v -> WordMap v Source #

lookup :: Key -> WordMap v -> Maybe v Source #

member :: Key -> WordMap v -> Bool Source #

fromList :: [(Word64, v)] -> WordMap v Source #