HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulefgl-5.8.2.0Haskell98

Data.Graph.Inductive.Basic

Basic Graph Algorithms

  • 13 values
  • Packagefgl-5.8.2.0
  • Exports13
  • LanguageHaskell98
  • LicenceBSD-3-Clause
  • SourceBasic.hs

Graph Operations

5 declarations
valuegrev :: DynGraph gr => gr a b -> gr a b
#

Reverse the direction of all edges.

valueundir :: (Eq b, DynGraph gr) => gr a b -> gr a b
#

Make the graph undirected, i.e. for every edge from A to B, there exists an edge from B to A.

valueunlab :: DynGraph gr => gr a b -> gr () ()
#

Remove all labels.

valuegfold
  1. :: Graph gr
  2. => (Context a b -> [Node])

    direction of fold

  3. -> (Context a b -> c -> d)

    depth aggregation

  4. -> (Maybe d -> c -> c, c)

    breadth/level aggregation

  5. -> [Node]
  6. -> gr a b
  7. -> c
#

Directed graph fold.

Filter Operations

2 declarations
valueelfilter :: DynGraph gr => (b -> Bool) -> gr a b -> gr a b
#

Filter based on edge label property.

Predicates and Classifications

2 declarations

Tree Operations

4 declarations
valuepostorder :: Tree a -> [a]
#

Flatten a Tree, returning the elements in post-order.