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

CopyrightCopyright (c) 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.MinHeap

Contents

Description

A generic adaptor for bags to keep the minimum element separately.

Synopsis

Min heap adaptor type

data Min h a Source

Instances

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

CollX operations

singleton :: (CollX h a, Ord a) => a -> Min h a Source

fromSeq :: (OrdColl h a, Ord a, Sequence s) => s a -> Min h a Source

insert :: (OrdCollX h a, Ord a) => a -> Min h a -> Min h a Source

insertSeq :: (OrdColl h a, Ord a, Sequence s) => s a -> Min h a -> Min h a Source

union :: (OrdCollX h a, Ord a) => Min h a -> Min h a -> Min h a Source

unionSeq :: (OrdColl h a, Ord a, Sequence s) => s (Min h a) -> Min h a Source

delete :: (OrdColl h a, Ord a) => a -> Min h a -> Min h a Source

deleteAll :: (OrdColl h a, Ord a) => a -> Min h a -> Min h a Source

deleteSeq :: (OrdColl h a, Ord a, Sequence s) => s a -> Min h a -> Min h a Source

null :: Min h a -> Bool Source

size :: CollX h a => Min h a -> Int Source

member :: (CollX h a, Ord a) => a -> Min h a -> Bool Source

count :: (CollX h a, Ord a) => a -> Min h a -> Int Source

strict :: (CollX h a, Ord a) => Min h a -> Min h a Source

Coll operations

toSeq :: (Coll h a, Sequence s) => Min h a -> s a Source

lookup :: (Coll h a, Ord a) => a -> Min h a -> a Source

lookupM :: (Coll h a, Ord a, Monad m) => a -> Min h a -> m a Source

lookupAll :: (Coll h a, Ord a, Sequence s) => a -> Min h a -> s a Source

lookupWithDefault :: (Coll h a, Ord a) => a -> a -> Min h a -> a Source

fold :: Coll h a => (a -> b -> b) -> b -> Min h a -> b Source

fold' :: Coll h a => (a -> b -> b) -> b -> Min h a -> b Source

fold1 :: Coll h a => (a -> a -> a) -> Min h a -> a Source

fold1' :: Coll h a => (a -> a -> a) -> Min h a -> a Source

filter :: OrdColl h a => (a -> Bool) -> Min h a -> Min h a Source

partition :: OrdColl h a => (a -> Bool) -> Min h a -> (Min h a, Min h a) Source

strictWith :: OrdColl h a => (a -> b) -> Min h a -> Min h a Source

OrdCollX operations

deleteMin :: (OrdColl h a, Ord a) => Min h a -> Min h a Source

deleteMax :: (OrdCollX h a, Ord a) => Min h a -> Min h a Source

unsafeInsertMin :: (OrdCollX h a, Ord a) => a -> Min h a -> Min h a Source

unsafeInsertMax :: (OrdCollX h a, Ord a) => a -> Min h a -> Min h a Source

unsafeFromOrdSeq :: (OrdCollX h a, Ord a, Sequence s) => s a -> Min h a Source

unsafeAppend :: (OrdCollX h a, Ord a) => Min h a -> Min h a -> Min h a Source

filterLT :: (OrdCollX h a, Ord a) => a -> Min h a -> Min h a Source

filterLE :: (OrdCollX h a, Ord a) => a -> Min h a -> Min h a Source

filterGT :: (OrdColl h a, Ord a) => a -> Min h a -> Min h a Source

filterGE :: (OrdColl h a, Ord a) => a -> Min h a -> Min h a Source

partitionLT_GE :: (OrdColl h a, Ord a) => a -> Min h a -> (Min h a, Min h a) Source

partitionLE_GT :: (OrdColl h a, Ord a) => a -> Min h a -> (Min h a, Min h a) Source

partitionLT_GT :: (OrdColl h a, Ord a) => a -> Min h a -> (Min h a, Min h a) Source

OrdColl operations

minView :: (OrdColl h a, Ord a, Monad m) => Min h a -> m (a, Min h a) Source

minElem :: (OrdColl h a, Ord a) => Min h a -> a Source

maxView :: (OrdColl h a, Ord a, Monad m) => Min h a -> m (a, Min h a) Source

maxElem :: (OrdColl h a, Ord a) => Min h a -> a Source

foldr :: (OrdColl h a, Ord a) => (a -> b -> b) -> b -> Min h a -> b Source

foldr' :: (OrdColl h a, Ord a) => (a -> b -> b) -> b -> Min h a -> b Source

foldl :: (OrdColl h a, Ord a) => (b -> a -> b) -> b -> Min h a -> b Source

foldl' :: (OrdColl h a, Ord a) => (b -> a -> b) -> b -> Min h a -> b Source

foldr1 :: (OrdColl h a, Ord a) => (a -> a -> a) -> Min h a -> a Source

foldr1' :: (OrdColl h a, Ord a) => (a -> a -> a) -> Min h a -> a Source

foldl1 :: (OrdColl h a, Ord a) => (a -> a -> a) -> Min h a -> a Source

foldl1' :: (OrdColl h a, Ord a) => (a -> a -> a) -> Min h a -> a Source

toOrdSeq :: (OrdColl h a, Ord a, Sequence s) => Min h a -> s a Source

unsafeMapMonotonic :: (OrdColl h a, Ord a) => (a -> a) -> Min h a -> Min h a Source

Other supported operations

toColl :: OrdColl h a => Min h a -> h Source

fromColl :: OrdColl h a => h -> Min h a Source

Documentation