fgl-5.4.2.3: Martin Erwig's Functional Graph Library

Data.Graph.Inductive.Example

Contents

Description

Example Graphs

Synopsis

Auxiliary Functions

genUNodes :: Int -> [UNode]

generate list of unlabeled nodes

genLNodes :: Enum a => a -> Int -> [LNode a]

generate list of labeled nodes

labUEdges :: [Edge] -> [UEdge]

denote unlabeled edges

noEdges :: [UEdge]

empty (unlabeled) edge list

Small Dynamic Graphs

a :: Gr Char ()

b :: Gr Char ()

c :: Gr Char ()

e :: Gr Char ()

Small Static Graphs

a' :: IO (SGr Char ())

b' :: IO (SGr Char ())

c' :: IO (SGr Char ())

e' :: IO (SGr Char ())

Functions to Create (Regular) Graphs

ucycle :: Graph gr => Int -> gr () ()

star :: Graph gr => Int -> gr () ()

ucycleM :: GraphM m gr => Int -> m (gr () ())

starM :: GraphM m gr => Int -> m (gr () ())

More Graphs

clr : Cormen/Leiserson/Rivest

kin : Kingston

Dynamic Versions

Static Versions