From 2e221ffbc457c8b71c8b0eaf9210bc265346be4e Mon Sep 17 00:00:00 2001 From: Konstantinos Karakatsanis Date: Tue, 3 Nov 2015 21:25:19 +0200 Subject: [PATCH] Improve documentation --- networkx/generators/community.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/networkx/generators/community.py b/networkx/generators/community.py index 8d18c73609c..3750cd28e87 100644 --- a/networkx/generators/community.py +++ b/networkx/generators/community.py @@ -415,6 +415,9 @@ def gaussian_random_partition_graph(n, s, v, p_in, p_out, directed=False, def ring_of_cliques(num_cliques, clique_size): """Defines a "ring of cliques" graph. + A ring of cliques graph is consisting of cliques, connected through single + links. Each clique is a complete graph. + Parameters ---------- num_cliques : int @@ -448,8 +451,6 @@ def ring_of_cliques(num_cliques, clique_size): edges = itertools.combinations(range(i*clique_size, i*clique_size + clique_size), 2) G.add_edges_from(edges) - # connects the middle node of each clique - # with the first node of the next clique G.add_edge(i*clique_size+1, (i+1)*clique_size % (num_cliques*clique_size)) return G