relaxed_caveman_graph¶
-
relaxed_caveman_graph
(l, k, p, seed=None)[source]¶ Return a relaxed caveman graph.
A relaxed caveman graph starts with
l
cliques of sizek
. Edges are then randomly rewired with probabilityp
to link different cliques.Parameters: Returns: G – Relaxed Caveman Graph
Return type: NetworkX Graph
Raises: NetworkXError: – If p is not in [0,1]
Examples
>>> G = nx.relaxed_caveman_graph(2, 3, 0.1, seed=42)
References
[1] Santo Fortunato, Community Detection in Graphs, Physics Reports Volume 486, Issues 3-5, February 2010, Pages 75-174. http://arxiv.org/abs/0906.0612