graphene-0.1.0.4: A minimal Graph Theory library.

Safe HaskellNone

Graphene.Instances

Synopsis

Documentation

data Graph e v Source

Graph with edge type e and vertex type v

Constructors

Graph 

Fields

_vertices :: [v]
 
_edges :: [(e, (v, v))]
 

Instances

Bifunctor Graph

map over both vertices and edges

Bifoldable Graph

fold over both vertices and edges

Functor (Graph e)

map over vertices

Foldable (Graph e)

fold over vertices

(Eq e, Eq v) => Eq (Graph e v) 
(Show e, Show v) => Show (Graph e v) 
Monoid (Graph v e)

identity + binary function (mappend)

emptyGraph :: Graph e vSource

a graph with no vertices or edges