diet-0.1.0.0: Discrete Interval Encoding Trees

Data.Diet.Set.Unboxed

Contents

Synopsis

# Documentation

data Set a Source #

Instances

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

Arguments

 :: (Ord a, Prim a) => a inclusive lower bound -> a inclusive upper bound -> Set a

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

member :: (Ord a, Prim a) => a -> Set a -> Bool Source #

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

# List Conversion

toList :: Prim a => Set a -> [(a, a)] Source #

fromList :: (Ord a, Enum a, Prim a) => [(a, a)] -> Set a Source #

Arguments

 :: (Ord a, Enum a, Prim a) => Int expected size of resulting diet Set -> [(a, a)] key-value pairs -> Set a