This documents the development version of NetworkX. Documentation for the current release can be found here.
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.
Number of cliques
Size of cliques
- GNetworkX Graph
ring of cliques graph
If the number of cliques is lower than 2 or if the size of cliques is smaller than 2.
connected_caveman_graphgraph removes a link from each clique to connect it with the next clique. Instead, the
ring_of_cliquesgraph simply adds the link without removing any link from the cliques.
>>> G = nx.ring_of_cliques(8, 4)