hiperwalk.CompleteBipartite(num_vert1, num_vert2, multiedges=None, weights=None, copy=False)[source]#

Complete bipartite graph constructor.

A complete bipartite graph is a graph whose vertices can be divided into two disjoint and independent sets such that every vertex of the first set is connected to every vertex of the second set, and no vertex within the same set is connected.


The number of vertices in the first part of the graph.


The number of vertices in the second part of the graph.

multiedgesscipy.sparse.csr_array, optional

Allows multiple edges between the same pair of vertices. Defaults to None.

weightsscipy.sparse.csr_array, optional

Assigns weights to the edges of the graph. Defaults to None.


Returns an instance of a complete bipartite graph. Refer to Graph Constructors for more details.

See also

Graph Constructors

More information on various types of graph constructors.


The vertices in the first part are labeled from 0 to num_vert1 - 1, and the vertices in the second part are labeled from num_vert1 to num_vert1 + num_vert2 - 1.


All methods are inherited from hiperwalk.Graph, hiperwalk.Multigraph, or hiperwalk.WeightedGraph.