make_max_clique_graph(G, create_using=None)
The nodes of the maximal clique graph of G
are the cliques of G
and an edge joins two cliques if the cliques are not disjoint.
This function behaves like the following code:
import networkx as nx G = nx.make_clique_bipartite(G) cliques = [v for v in G.nodes() if G.nodes[v]['bipartite'] == 0] G = nx.bipartite.projected_graph(G, cliques) G = nx.relabel_nodes(G, {-v: v - 1 for v in G})
It should be faster, though, since it skips all the intermediate steps.
Graph type to create. If graph instance, then cleared before populated.
A graph whose nodes are the cliques of G
and whose edges join two cliques if they are not disjoint.
Returns the maximal clique graph of the given graph.
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them