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

CopyrightCopyright (c) 1998-1999, 2008 Chris Okasaki
LicenseMIT; see COPYRIGHT file for terms and conditions
Maintainerrobdockins AT fastmail DOT fm
Stabilitystable
PortabilityGHC, Hugs (MPTC and FD)
Safe HaskellNone
LanguageHaskell2010

Data.Edison.Coll.SkewHeap

Contents

Description

Skew heaps.

References:

  • Daniel Sleator and Robert Tarjan. "Self-Adjusting Heaps". SIAM Journal on Computing, 15(1):52-69, February 1986.

Synopsis

Type of skew heaps

data Heap a Source

Instances

Ord a => Eq (Heap a) Source 
Ord a => Ord (Heap a) Source 
(Ord a, Read a) => Read (Heap a) Source 
(Ord a, Show a) => Show (Heap a) Source 
(Ord a, Arbitrary a) => Arbitrary (Heap a) Source 
(Ord a, CoArbitrary a) => CoArbitrary (Heap a) Source 
Ord a => Monoid (Heap a) Source 
Ord a => CollX (Heap a) a Source 
Ord a => OrdCollX (Heap a) a Source 
Ord a => Coll (Heap a) a Source 
Ord a => OrdColl (Heap a) a Source 

CollX operations

empty :: Ord a => Heap a Source

singleton :: Ord a => a -> Heap a Source

fromSeq :: (Ord a, Sequence seq) => seq a -> Heap a Source

insert :: Ord a => a -> Heap a -> Heap a Source

insertSeq :: (Ord a, Sequence seq) => seq a -> Heap a -> Heap a Source

union :: Ord a => Heap a -> Heap a -> Heap a Source

unionSeq :: (Ord a, Sequence seq) => seq (Heap a) -> Heap a Source

delete :: Ord a => a -> Heap a -> Heap a Source

deleteAll :: Ord a => a -> Heap a -> Heap a Source

deleteSeq :: (Ord a, Sequence seq) => seq a -> Heap a -> Heap a Source

null :: Ord a => Heap a -> Bool Source

size :: Ord a => Heap a -> Int Source

member :: Ord a => a -> Heap a -> Bool Source

count :: Ord a => a -> Heap a -> Int Source

Coll operations

toSeq :: (Ord a, Sequence seq) => Heap a -> seq a Source

lookup :: Ord a => a -> Heap a -> a Source

lookupM :: (Ord a, Monad m) => a -> Heap a -> m a Source

lookupAll :: (Ord a, Sequence seq) => a -> Heap a -> seq a Source

lookupWithDefault :: Ord a => a -> a -> Heap a -> a Source

fold :: Ord a => (a -> b -> b) -> b -> Heap a -> b Source

fold' :: Ord a => (a -> b -> b) -> b -> Heap a -> b Source

fold1 :: Ord a => (a -> a -> a) -> Heap a -> a Source

fold1' :: Ord a => (a -> a -> a) -> Heap a -> a Source

filter :: Ord a => (a -> Bool) -> Heap a -> Heap a Source

partition :: Ord a => (a -> Bool) -> Heap a -> (Heap a, Heap a) Source

strictWith :: (a -> b) -> Heap a -> Heap a Source

OrdCollX operations

deleteMin :: Ord a => Heap a -> Heap a Source

deleteMax :: Ord a => Heap a -> Heap a Source

unsafeInsertMin :: Ord a => a -> Heap a -> Heap a Source

unsafeInsertMax :: Ord a => a -> Heap a -> Heap a Source

unsafeFromOrdSeq :: (Ord a, Sequence seq) => seq a -> Heap a Source

unsafeAppend :: Ord a => Heap a -> Heap a -> Heap a Source

filterLT :: Ord a => a -> Heap a -> Heap a Source

filterLE :: Ord a => a -> Heap a -> Heap a Source

filterGT :: Ord a => a -> Heap a -> Heap a Source

filterGE :: Ord a => a -> Heap a -> Heap a Source

partitionLT_GE :: Ord a => a -> Heap a -> (Heap a, Heap a) Source

partitionLE_GT :: Ord a => a -> Heap a -> (Heap a, Heap a) Source

partitionLT_GT :: Ord a => a -> Heap a -> (Heap a, Heap a) Source

OrdColl operations

minView :: (Ord a, Monad m) => Heap a -> m (a, Heap a) Source

minElem :: Ord a => Heap a -> a Source

maxView :: (Ord a, Monad m) => Heap a -> m (a, Heap a) Source

maxElem :: Ord a => Heap a -> a Source

foldr :: Ord a => (a -> b -> b) -> b -> Heap a -> b Source

foldr' :: Ord a => (a -> b -> b) -> b -> Heap a -> b Source

foldl :: Ord a => (b -> a -> b) -> b -> Heap a -> b Source

foldl' :: Ord a => (b -> a -> b) -> b -> Heap a -> b Source

foldr1 :: Ord a => (a -> a -> a) -> Heap a -> a Source

foldr1' :: Ord a => (a -> a -> a) -> Heap a -> a Source

foldl1 :: Ord a => (a -> a -> a) -> Heap a -> a Source

foldl1' :: Ord a => (a -> a -> a) -> Heap a -> a Source

toOrdSeq :: (Ord a, Sequence seq) => Heap a -> seq a Source

unsafeMapMonotonic :: Ord a => (a -> a) -> Heap a -> Heap a Source

Documentation