A small library for generating, well, random graphs. Not that many models at the moment, feel free to jump in and add some more. The algorithms were partly ported and double-checked with the Gephi implementations (thx @jacomyal for the link).
##randomgraph.BalancedTree(r, h) Simple balanced tree
Params
- r
Number
- number of children each node has - h
Number
- height of the tree
##randomgraph.BarabasiAlbert(N, m0, M) Barabási–Albert
Params
- N
Number
- total number of nodes N > 0 - m0
Number
- m0 > 0 && m0 < N - M
Number
- M > 0 && M <= m0
##randomgraph.ErdosRenyi Members
###ErdosRenyi.np(n, p) Erdős–Rényi aka Gilbert
Params
- n
Number
- number of nodes - p
Number
- probability of a edge between any two nodes
###ErdosRenyi.nm(n, M) Erdős–Rényi
Params
- n
Number
- number of nodes - M
Number
- number of edges
##randomgraph.WattsStrogatz Members
###WattsStrogatz.alpha(n, K, alpha) Watts-Strogatz Small World model Alpha
Params
- n
Number
- number of nodes - K
Number
- mean degree (even integer) - alpha
Number
- rewiring probability [0..1]
###WattsStrogatz.beta(n, K, beta) Watts-Strogatz Small World model Beta
Params
- n
Number
- number of nodes - K
Number
- mean degree (even integer) - beta
Number
- rewiring probability [0..1]