Copyright | Copyright © 2019 - 2020 Kadena LLC. |
---|---|

License | MIT |

Maintainer | Lars Kuhtz <lars@kadena.io> |

Stability | experimental |

Safe Haskell | None |

Language | Haskell2010 |

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

# 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

:: 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