Safe Haskell | Safe |
---|---|

Language | Haskell2010 |

## Synopsis

- erdosRenyi :: Graph g => Int -> Float -> IO (g Int ())
- erdosRenyiU :: Int -> Float -> IO (UGraph Int ())
- erdosRenyiD :: Int -> Float -> IO (DGraph Int ())
- rndGraph :: forall g v e. (Graph g, Hashable v, Eq v, Random e) => (e, e) -> Float -> [v] -> IO (g v e)
- rndGraph' :: forall g v. (Graph g, Hashable v, Eq v) => Float -> [v] -> IO (g v ())
- rndAdjacencyMatrix :: Int -> IO [[Int]]

# Erdős–Rényi model

erdosRenyi :: Graph g => Int -> Float -> IO (g Int ()) Source #

Generate a random Erdős–Rényi G(n, p) model graph

erdosRenyiU :: Int -> Float -> IO (UGraph Int ()) Source #

`erdosRenyi`

convinience `UGraph`

generation function

erdosRenyiD :: Int -> Float -> IO (DGraph Int ()) Source #

`erdosRenyi`

convinience `DGraph`

generation function

# General Random graphs

rndGraph :: forall g v e. (Graph g, Hashable v, Eq v, Random e) => (e, e) -> Float -> [v] -> IO (g v e) Source #

Generate a random graph for all the vertices of type *v* in the list,
random edge attributes in *e* within given bounds, and some existing
probability for each possible edge as per the Erdős–Rényi model

rndGraph' :: forall g v. (Graph g, Hashable v, Eq v) => Float -> [v] -> IO (g v ()) Source #

Same as `rndGraph`

but uses attributeless edges

# Random adjacency matrix

rndAdjacencyMatrix :: Int -> IO [[Int]] Source #

Generate a random adjacency matrix

Useful for use with `fromAdjacencyMatrix`