fnss.topologies.randmodels.erdos_renyi_topology¶
-
erdos_renyi_topology
(n, p, seed=None, fast=False)[source]¶ Return a random graph
(Erdos-Renyi graph, binomial graph).
Chooses each of the possible edges with probability p.
Parameters: n : int
The number of nodes.
p : float
Probability for edge creation.
seed : int, optional
Seed for random number generator (default=None).
fast : boolean, optional
Uses the algorithm proposed by [R3737], which is faster for small p
References
[R3537] - Erdos and A. Renyi, On Random Graphs, Publ. Math. 6, 290 (1959).
[R3637] - Gilbert, Random Graphs, Ann. Math. Stat., 30, 1141 (1959).
[R3737] (1, 2) Vladimir Batagelj and Ulrik Brandes, “Efficient generation of large random networks”, Phys. Rev. E, 71, 036113, 2005.