fgl-5.5.3.0: Martin Erwig's Functional Graph Library

Safe HaskellSafe
LanguageHaskell98

Data.Graph.Inductive.Internal.Heap

Contents

Description

Pairing heap implementation of dictionary

Synopsis

Type

data Heap a b Source #

Constructors

Empty 
Node a b [Heap a b] 

Instances

(Eq b, Eq a) => Eq (Heap a b) Source # 

Methods

(==) :: Heap a b -> Heap a b -> Bool #

(/=) :: Heap a b -> Heap a b -> Bool #

(Read b, Read a) => Read (Heap a b) Source # 

Methods

readsPrec :: Int -> ReadS (Heap a b) #

readList :: ReadS [Heap a b] #

readPrec :: ReadPrec (Heap a b) #

readListPrec :: ReadPrec [Heap a b] #

(Show b, Show a) => Show (Heap a b) Source # 

Methods

showsPrec :: Int -> Heap a b -> ShowS #

show :: Heap a b -> String #

showList :: [Heap a b] -> ShowS #

(NFData a, NFData b) => NFData (Heap a b) Source # 

Methods

rnf :: Heap a b -> () #

prettyHeap :: (Show a, Show b) => Heap a b -> String Source #

printPrettyHeap :: (Show a, Show b) => Heap a b -> IO () Source #

Operations

unit :: a -> b -> Heap a b Source #

insert :: Ord a => (a, b) -> Heap a b -> Heap a b Source #

merge :: Ord a => Heap a b -> Heap a b -> Heap a b Source #

mergeAll :: Ord a => [Heap a b] -> Heap a b Source #

findMin :: Heap a b -> (a, b) Source #

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

splitMin :: Ord a => Heap a b -> (a, b, Heap a b) Source #

build :: Ord a => [(a, b)] -> Heap a b Source #

toList :: Ord a => Heap a b -> [(a, b)] Source #

heapsort :: Ord a => [a] -> [a] Source #