cabal-install-solver
Safe HaskellSafe-Inferred
LanguageHaskell2010

Distribution.Solver.Modular.LabeledGraph

Description

Wrapper around Data.Graph with support for edge labels

Synopsis

Graphs

type Graph e = Array Vertex [(e, Vertex)] Source #

type Vertex = Int #

Abstract representation of vertices.

Building graphs

graphFromEdges :: forall key node edge. Ord key => [(node, key, [(edge, key)])] -> (Graph edge, Vertex -> (node, key, [(edge, key)]), key -> Maybe Vertex) Source #

Construct an edge-labeled graph

This is a simple adaptation of the definition in Data.Graph

graphFromEdges' :: Ord key => [(node, key, [(edge, key)])] -> (Graph edge, Vertex -> (node, key, [(edge, key)])) Source #

buildG :: Bounds -> [Edge e] -> Graph e Source #

Graph properties

edges :: Graph e -> [Edge e] Source #

Operations on the underlying unlabeled graph