hgraph-1.10.0.0: Tools for working on (di)graphs.
Safe HaskellSafe-Inferred
LanguageHaskell2010

HGraph.Directed.Generator

Synopsis

Documentation

bidirectedCycle :: (Mutable t, Num a, Enum a) => t a -> a -> t a Source #

A cycle where vertices are connected in both directions

randomAcyclicDigraph :: forall {g} {t} {t}. (RandomGen g, Mutable t, DirectedGraph t, Integral t, Random t, Adjacency t) => t t -> t -> t -> StateT g Identity (t t) Source #

Generate a random weakly-connected acyclic digraph with n vertices and m + n - 1 arcs.

randomDigraph :: (Integral t, Mutable t, DirectedGraph t, Random t, RandomGen g, Adjacency t) => t t -> t -> t -> StateT g Identity (t t) Source #

oneWayGrid :: (Mutable t, DirectedGraph t, Num a, Enum a) => t a -> a -> a -> t a Source #