make_clique_bipartite#
- make_clique_bipartite(G, fpos=None, create_using=None, name=None)[source]#
Returns the bipartite clique graph corresponding to
G
.In the returned bipartite graph, the ābottomā nodes are the nodes of
G
and the ātopā nodes represent the maximal cliques ofG
. There is an edge from node v to clique C in the returned graph if and only if v is an element of C.- Parameters:
- GNetworkX graph
An undirected graph.
- fposbool
If True or not None, the returned graph will have an additional attribute,
pos
, a dictionary mapping node to position in the Euclidean plane.- create_usingNetworkX graph constructor, optional (default=nx.Graph)
Graph type to create. If graph instance, then cleared before populated.
- Returns:
- NetworkX graph
A bipartite graph whose ābottomā set is the nodes of the graph
G
, whose ātopā set is the cliques ofG
, and whose edges join nodes ofG
to the cliques that contain them.The nodes of the graph
G
have the node attribute ābipartiteā set to 1 and the nodes representing cliques have the node attribute ābipartiteā set to 0, as is the convention for bipartite graphs in NetworkX.