Data.Edison.Coll.UnbalancedSet

EdisonCore-1.3.1.1: A library of efficent, purely-functional data structures (Core Implementations)

Copyright | Copyright (c) 1998-1999, 2008 Chris Okasaki
License | MIT; see COPYRIGHT file for terms and conditions
Maintainer | robdockins AT fastmail DOT fm
Stability | stable
Portability | GHC, Hugs (MPTC and FD)
Safe Haskell | None
Language | Haskell2010

Data.Edison.Coll.UnbalancedSet

Contents

- Set type
- CollX operations
- Coll operations
- OrdCollX operations
- OrdColl operations
- SetX operations
- Set operations
- Documentation

Description

Sets implemented as unbalanced binary search trees.

Synopsis

- data Set a
- empty :: Set a
- singleton :: a -> Set a
- fromSeq :: (Ord a, Sequence seq) => seq a -> Set a
- insert :: Ord a => a -> Set a -> Set a
- insertSeq :: (Ord a, Sequence seq) => seq a -> Set a -> Set a
- union :: Ord a => Set a -> Set a -> Set a
- unionSeq :: (Ord a, Sequence seq) => seq (Set a) -> Set a
- delete :: Ord a => a -> Set a -> Set a
- deleteAll :: Ord a => a -> Set a -> Set a
- deleteSeq :: (Ord a, Sequence seq) => seq a -> Set a -> Set a
- null :: Set a -> Bool
- size :: Set a -> Int
- member :: Ord a => a -> Set a -> Bool
- count :: Ord a => a -> Set a -> Int
- strict :: Set a -> Set a
- structuralInvariant :: Ord a => Set a -> Bool
- toSeq :: (Ord a, Sequence seq) => Set a -> seq a
- lookup :: Ord a => a -> Set a -> a
- lookupM :: (Ord a, Monad m) => a -> Set a -> m a
- lookupAll :: (Ord a, Sequence seq) => a -> Set a -> seq a
- lookupWithDefault :: Ord a => a -> a -> Set a -> a
- fold :: (a -> b -> b) -> b -> Set a -> b
- fold' :: (a -> b -> b) -> b -> Set a -> b
- fold1 :: (a -> a -> a) -> Set a -> a
- fold1' :: (a -> a -> a) -> Set a -> a
- filter :: Ord a => (a -> Bool) -> Set a -> Set a
- partition :: Ord a => (a -> Bool) -> Set a -> (Set a, Set a)
- strictWith :: (a -> b) -> Set a -> Set a
- deleteMin :: Ord a => Set a -> Set a
- deleteMax :: Ord a => Set a -> Set a
- unsafeInsertMin :: Ord a => a -> Set a -> Set a
- unsafeInsertMax :: Ord a => a -> Set a -> Set a
- unsafeFromOrdSeq :: (Ord a, Sequence seq) => seq a -> Set a
- unsafeAppend :: Ord a => Set a -> Set a -> Set a
- filterLT :: Ord a => a -> Set a -> Set a
- filterLE :: Ord a => a -> Set a -> Set a
- filterGT :: Ord a => a -> Set a -> Set a
- filterGE :: Ord a => a -> Set a -> Set a
- partitionLT_GE :: Ord a => a -> Set a -> (Set a, Set a)
- partitionLE_GT :: Ord a => a -> Set a -> (Set a, Set a)
- partitionLT_GT :: Ord a => a -> Set a -> (Set a, Set a)
- minView :: Monad m => Set a -> m (a, Set a)
- minElem :: Set a -> a
- maxView :: Monad m => Set a -> m (a, Set a)
- maxElem :: Set a -> a
- foldr :: (a -> b -> b) -> b -> Set a -> b
- foldr' :: (a -> b -> b) -> b -> Set a -> b
- foldl :: (b -> a -> b) -> b -> Set a -> b
- foldl' :: (b -> a -> b) -> b -> Set a -> b
- foldr1 :: (a -> a -> a) -> Set a -> a
- foldr1' :: (a -> a -> a) -> Set a -> a
- foldl1 :: (a -> a -> a) -> Set a -> a
- foldl1' :: (a -> a -> a) -> Set a -> a
- toOrdSeq :: (Ord a, Sequence seq) => Set a -> seq a
- unsafeMapMonotonic :: Ord a => (a -> a) -> Set a -> Set a
- intersection :: Ord a => Set a -> Set a -> Set a
- difference :: Ord a => Set a -> Set a -> Set a
- symmetricDifference :: Ord a => Set a -> Set a -> Set a
- properSubset :: Ord a => Set a -> Set a -> Bool
- subset :: Ord a => Set a -> Set a -> Bool
- fromSeqWith :: (Ord a, Sequence seq) => (a -> a -> a) -> seq a -> Set a
- insertWith :: Ord a => (a -> a -> a) -> a -> Set a -> Set a
- insertSeqWith :: (Ord a, Sequence seq) => (a -> a -> a) -> seq a -> Set a -> Set a
- unionl :: Ord a => Set a -> Set a -> Set a
- unionr :: Ord a => Set a -> Set a -> Set a
- unionWith :: Ord a => (a -> a -> a) -> Set a -> Set a -> Set a
- unionSeqWith :: (Ord a, Sequence seq) => (a -> a -> a) -> seq (Set a) -> Set a
- intersectionWith :: Ord a => (a -> a -> a) -> Set a -> Set a -> Set a
- moduleName :: String

# Set type

data Set a #

Instances

Ord a => Eq (Set a) # |
Methods (==) :: Set a -> Set a -> Bool # (/=) :: Set a -> Set a -> Bool #
Ord a => Ord (Set a) # |
Methods compare :: 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 #
(Ord a, Read a) => Read (Set a) # |
Methods readsPrec :: Int -> ReadS (Set a) # readList :: ReadS [Set a] # readPrec :: ReadPrec (Set a) # readListPrec :: ReadPrec [Set a] #
(Ord a, Show a) => Show (Set a) # |
Methods showsPrec :: Int -> Set a -> ShowS # show :: Set a -> String # showList :: [Set a] -> ShowS #
Ord a => Monoid (Set a) # |
Methods mempty :: Set a # mappend :: Set a -> Set a -> Set a # mconcat :: [Set a] -> Set a #
(Ord a, Arbitrary a) => Arbitrary (Set a) # |
Methods arbitrary :: Gen (Set a) # shrink :: Set a -> [Set a] #
(Ord a, CoArbitrary a) => CoArbitrary (Set a) # |
Methods coarbitrary :: Set a -> Gen b -> Gen b #
Ord a => CollX (Set a) a # |
Methods singleton :: a -> Set a # fromSeq :: Sequence seq => seq a -> Set a # unionSeq :: Sequence seq => seq (Set a) -> Set a # insert :: a -> Set a -> Set a # insertSeq :: Sequence seq => seq a -> Set a -> Set a # delete :: a -> Set a -> Set a # deleteAll :: a -> Set a -> Set a # deleteSeq :: Sequence seq => seq a -> Set a -> Set a # null :: Set a -> Bool # size :: Set a -> Int # member :: a -> Set a -> Bool # count :: a -> Set a -> Int # strict :: Set a -> Set a # structuralInvariant :: Set a -> Bool # instanceName :: Set a -> String #
Ord a => OrdCollX (Set a) a # |
Methods deleteMin :: Set a -> Set a # deleteMax :: Set a -> Set a # unsafeInsertMin :: a -> Set a -> Set a # unsafeInsertMax :: a -> Set a -> Set a # unsafeFromOrdSeq :: Sequence seq => seq a -> Set a # unsafeAppend :: Set a -> Set a -> Set a # filterLT :: a -> Set a -> Set a # filterLE :: a -> Set a -> Set a # filterGT :: a -> Set a -> Set a # filterGE :: a -> Set a -> Set a # partitionLT_GE :: a -> Set a -> (Set a, Set a) # partitionLE_GT :: a -> Set a -> (Set a, Set a) # partitionLT_GT :: a -> Set a -> (Set a, Set a) #
Ord a => SetX (Set a) a # |
Methods intersection :: Set a -> Set a -> Set a # difference :: Set a -> Set a -> Set a # symmetricDifference :: Set a -> Set a -> Set a # properSubset :: Set a -> Set a -> Bool # subset :: Set a -> Set a -> Bool #
Ord a => OrdSetX (Set a) a # |
Ord a => Coll (Set a) a # |
Methods toSeq :: Sequence seq => Set a -> seq a # lookup :: a -> Set a -> a # lookupM :: Monad m => a -> Set a -> m a # lookupAll :: Sequence seq => a -> Set a -> seq a # lookupWithDefault :: a -> a -> Set a -> a # fold :: (a -> b -> b) -> b -> Set a -> b # fold' :: (a -> b -> b) -> b -> Set a -> b # fold1 :: (a -> a -> a) -> Set a -> a # fold1' :: (a -> a -> a) -> Set a -> a # filter :: (a -> Bool) -> Set a -> Set a # partition :: (a -> Bool) -> Set a -> (Set a, Set a) # strictWith :: (a -> b) -> Set a -> Set a #
Ord a => OrdColl (Set a) a # |
Methods minView :: Monad m => Set a -> m (a, Set a) # minElem :: Set a -> a # maxView :: Monad m => Set a -> m (a, Set a) # maxElem :: Set a -> a # foldr :: (a -> b -> b) -> b -> Set a -> b # foldr' :: (a -> b -> b) -> b -> Set a -> b # foldl :: (b -> a -> b) -> b -> Set a -> b # foldl' :: (b -> a -> b) -> b -> Set a -> b # foldr1 :: (a -> a -> a) -> Set a -> a # foldr1' :: (a -> a -> a) -> Set a -> a # foldl1 :: (a -> a -> a) -> Set a -> a # foldl1' :: (a -> a -> a) -> Set a -> a # toOrdSeq :: Sequence seq => Set a -> seq a # unsafeMapMonotonic :: (a -> a) -> Set a -> Set a #
Ord a => Set (Set a) a # |
Methods fromSeqWith :: Sequence seq => (a -> a -> a) -> seq a -> Set a # insertWith :: (a -> a -> a) -> a -> Set a -> Set a # insertSeqWith :: Sequence seq => (a -> a -> a) -> seq a -> Set a -> Set a # unionl :: Set a -> Set a -> Set a # unionr :: Set a -> Set a -> Set a # unionWith :: (a -> a -> a) -> Set a -> Set a -> Set a # unionSeqWith :: Sequence seq => (a -> a -> a) -> seq (Set a) -> Set a # intersectionWith :: (a -> a -> a) -> Set a -> Set a -> Set a #
Ord a => OrdSet (Set a) a # |

# CollX operations

empty :: Set a #

singleton :: a -> Set a #

fromSeq :: (Ord a, Sequence seq) => seq a -> Set a #

insert :: Ord a => a -> Set a -> Set a #

insertSeq :: (Ord a, Sequence seq) => seq a -> Set a -> Set a #

union :: Ord a => Set a -> Set a -> Set a #

unionSeq :: (Ord a, Sequence seq) => seq (Set a) -> Set a #

delete :: Ord a => a -> Set a -> Set a #

deleteAll :: Ord a => a -> Set a -> Set a #

deleteSeq :: (Ord a, Sequence seq) => seq a -> Set a -> Set a #

null :: Set a -> Bool #

size :: Set a -> Int #

member :: Ord a => a -> Set a -> Bool #

count :: Ord a => a -> Set a -> Int #

strict :: Set a -> Set a #

structuralInvariant :: Ord a => Set a -> Bool #

# Coll operations

toSeq :: (Ord a, Sequence seq) => Set a -> seq a #

lookup :: Ord a => a -> Set a -> a #

lookupM :: (Ord a, Monad m) => a -> Set a -> m a #

lookupAll :: (Ord a, Sequence seq) => a -> Set a -> seq a #

lookupWithDefault :: Ord a => a -> a -> Set a -> a #

fold :: (a -> b -> b) -> b -> Set a -> b #

fold' :: (a -> b -> b) -> b -> Set a -> b #

fold1 :: (a -> a -> a) -> Set a -> a #

fold1' :: (a -> a -> a) -> Set a -> a #

filter :: Ord a => (a -> Bool) -> Set a -> Set a #

partition :: Ord a => (a -> Bool) -> Set a -> (Set a, Set a) #

strictWith :: (a -> b) -> Set a -> Set a #

# OrdCollX operations

deleteMin :: Ord a => Set a -> Set a #

deleteMax :: Ord a => Set a -> Set a #

unsafeInsertMin :: Ord a => a -> Set a -> Set a #

unsafeInsertMax :: Ord a => a -> Set a -> Set a #

unsafeFromOrdSeq :: (Ord a, Sequence seq) => seq a -> Set a #

unsafeAppend :: Ord a => Set a -> Set a -> Set a #

filterLT :: Ord a => a -> Set a -> Set a #

filterLE :: Ord a => a -> Set a -> Set a #

filterGT :: Ord a => a -> Set a -> Set a #

filterGE :: Ord a => a -> Set a -> Set a #

partitionLT_GE :: Ord a => a -> Set a -> (Set a, Set a) #

partitionLE_GT :: Ord a => a -> Set a -> (Set a, Set a) #

partitionLT_GT :: Ord a => a -> Set a -> (Set a, Set a) #

# OrdColl operations

minView :: Monad m => Set a -> m (a, Set a) #

minElem :: Set a -> a #

maxView :: Monad m => Set a -> m (a, Set a) #

maxElem :: Set a -> a #

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

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

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

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

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

foldr1' :: (a -> a -> a) -> Set a -> a #

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

foldl1' :: (a -> a -> a) -> Set a -> a #

toOrdSeq :: (Ord a, Sequence seq) => Set a -> seq a #

unsafeMapMonotonic :: Ord a => (a -> a) -> Set a -> Set a #

# SetX operations

intersection :: Ord a => Set a -> Set a -> Set a #

difference :: Ord a => Set a -> Set a -> Set a #

symmetricDifference :: Ord a => Set a -> Set a -> Set a #

properSubset :: Ord a => Set a -> Set a -> Bool #

subset :: Ord a => Set a -> Set a -> Bool #

# Set operations

fromSeqWith :: (Ord a, Sequence seq) => (a -> a -> a) -> seq a -> Set a #

insertWith :: Ord a => (a -> a -> a) -> a -> Set a -> Set a #

insertSeqWith :: (Ord a, Sequence seq) => (a -> a -> a) -> seq a -> Set a -> Set a #

unionl :: Ord a => Set a -> Set a -> Set a #

unionr :: Ord a => Set a -> Set a -> Set a #

unionWith :: Ord a => (a -> a -> a) -> Set a -> Set a -> Set a #

unionSeqWith :: (Ord a, Sequence seq) => (a -> a -> a) -> seq (Set a) -> Set a #

intersectionWith :: Ord a => (a -> a -> a) -> Set a -> Set a -> Set a #

# Documentation

moduleName :: String #