graphite-0.9.5.0: Graphs and networks library

Safe HaskellSafe
LanguageHaskell2010

Data.Graph.Generation

Synopsis

Documentation

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

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

Same as rndGraph but uses attributeless edges

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

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

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

Generate a random adjacency matrix | Useful for use with fromAdjacencyMatrix