Data.Graph.Inductive.Internal.Heap

fgl-5.7.0.1: Martin Erwig's Functional Graph Library

Safe Haskell | Safe
Language | Haskell98

Data.Graph.Inductive.Internal.Heap

Contents

- Type
- Operations

Description

Pairing heap implementation of dictionary

Synopsis

- data Heap a b
  - = Empty
  - | Node a b [Heap a b]
- prettyHeap :: (Show a, Show b) => Heap a b -> String
- printPrettyHeap :: (Show a, Show b) => Heap a b -> IO ()
- empty :: Heap a b
- unit :: a -> b -> Heap a b
- insert :: Ord a => (a, b) -> Heap a b -> Heap a b
- merge :: Ord a => Heap a b -> Heap a b -> Heap a b
- mergeAll :: Ord a => [Heap a b] -> Heap a b
- isEmpty :: Heap a b -> Bool
- findMin :: Heap a b -> (a, b)
- deleteMin :: Ord a => Heap a b -> Heap a b
- splitMin :: Ord a => Heap a b -> (a, b, Heap a b)
- build :: Ord a => [(a, b)] -> Heap a b
- toList :: Ord a => Heap a b -> [(a, b)]
- heapsort :: Ord a => [a] -> [a]

# Type

data Heap a b #

Constructors

Empty |
Node a b [Heap a b] |

Instances

(Eq a, Eq b) => Eq (Heap a b) # |
Instance details Defined in Data.Graph.Inductive.Internal.Heap Methods (==) :: Heap a b -> Heap a b -> Bool # (/=) :: Heap a b -> Heap a b -> Bool #
(Read a, Read b) => Read (Heap a b) # |
Instance details Defined in Data.Graph.Inductive.Internal.Heap Methods readsPrec :: Int -> ReadS (Heap a b) # readList :: ReadS [Heap a b] # readPrec :: ReadPrec (Heap a b) # readListPrec :: ReadPrec [Heap a b] #
(Show a, Show b) => Show (Heap a b) # |
Instance details Defined in Data.Graph.Inductive.Internal.Heap 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) # |
Instance details Defined in Data.Graph.Inductive.Internal.Heap Methods rnf :: Heap a b -> () #

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

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

# Operations

empty :: Heap a b #

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

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

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

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

isEmpty :: Heap a b -> Bool #

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

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

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

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

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

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