fgl-5.4.2.3: Martin Erwig's Functional Graph Library

Data.Graph.Inductive.Internal.Heap

Contents

Description

Pairing heap implementation of dictionary

Synopsis

Type

data Ord a => Heap a b Source

Constructors

Empty 
Node a b [Heap a b] 

Instances

(Eq b, Ord a) => Eq (Heap a b) 
(Show a, Ord a, Show b) => Show (Heap a b) 

Operations

empty :: Ord a => Heap a bSource

unit :: Ord a => a -> b -> Heap a bSource

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

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

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

isEmpty :: Ord a => Heap a b -> BoolSource

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

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

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

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

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

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