This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.
complete_bipartite_graph(n1, n2, create_using=None)¶
Return the complete bipartite graph .
Composed of two partitions with nodes in the first and nodes in the second. Each node in the first is connected to each node in the second.
- n1 (integer) – Number of nodes for node set A.
- n2 (integer) – Number of nodes for node set B.
- create_using (NetworkX graph instance, optional) – Return graph of this type.
Node labels are the integers 0 to .
The nodes are assigned the attribute ‘bipartite’ with the value 0 or 1 to indicate which bipartite set the node belongs to.