cabal-install-solver-3.10.1.0: The command-line interface for Cabal and Hackage.

Safe Haskell | Safe-Inferred
Language | Haskell2010

Distribution.Solver.Modular.LabeledGraph

Contents

- Graphs
  - Building graphs
  - Graph properties
  - Operations on the underlying unlabeled graph

Description

Wrapper around Data.Graph with support for edge labels

Synopsis

- type Graph e = Array Vertex [(e, Vertex)]
- type Vertex = Int
- graphFromEdges :: forall key node edge. Ord key => [(node, key, [(edge, key)])] -> (Graph edge, Vertex -> (node, key, [(edge, key)]), key -> Maybe Vertex)
- graphFromEdges' :: Ord key => [(node, key, [(edge, key)])] -> (Graph edge, Vertex -> (node, key, [(edge, key)]))
- buildG :: Bounds -> [Edge e] -> Graph e
- transposeG :: Graph e -> Graph e
- vertices :: Graph e -> [Vertex]
- edges :: Graph e -> [Edge e]
- forgetLabels :: Graph e -> Graph
- topSort :: Graph e -> [Vertex]

# Graphs

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

type Vertex = Int #

## Building graphs

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

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)])) #

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

transposeG :: Graph e -> Graph e #

## Graph properties

vertices :: Graph e -> [Vertex] #

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

## Operations on the underlying unlabeled graph

forgetLabels :: Graph e -> Graph #

topSort :: Graph e -> [Vertex] #