digraph-0.2: Directed Graphs

CopyrightCopyright © 2019 - 2020 Kadena LLC.
LicenseMIT
MaintainerLars Kuhtz <lars@kadena.io>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Data.DiGraph.Random

Contents

Description

Throughout the module an undirected graph is a directed graph that is symmetric and irreflexive.

Synopsis

Random Regular Graph

type UniformRng m = (Int, Int) -> m Int Source #

Type of a random number generator that uniformily chooses an element from a range.

rrgIO :: Natural -> Natural -> IO (Maybe (DiGraph Int)) Source #

Undirected, irreflexive random regular graph.

The algorithm here is incomplete. For a complete approach see for instance https://users.cecs.anu.edu.au/~bdm/papers/RandRegGen.pdf

rrg Source #

Arguments

:: Monad m 
=> UniformRng m

a uniform random number generator

-> Natural 
-> Natural 
-> m (Maybe (DiGraph Int)) 

Undirected, irreflexive random regular graph.

The algorithm here is incomplete. For a complete approach see for instance https://users.cecs.anu.edu.au/~bdm/papers/RandRegGen.pdf

Random Graphs in the \(G_{n,p}\) model

gnp :: forall m. Monad m => UniformRng m -> Natural -> Double -> m (DiGraph Int) Source #

Undirected irreflexive random graph in the \(G_{n,p}\) model.