NetworkX

Previous topic

networkx.generators.bipartite.bipartite_preferential_attachment_graph

Next topic

networkx.generators.line.line_graph

networkx.generators.bipartite.bipartite_random_regular_graph

bipartite_random_regular_graph(d, n, create_using=None, seed=None)

UNTESTED: Generate a random bipartite graph.

Parameters:

d : integer

Degree of graph.

n : integer

Number of nodes in graph.

create_using : NetworkX graph instance, optional

Return graph of this type.

seed : integer, optional

Seed for random number generator.

Notes

Nodes are numbered 0...n-1.

Restrictions on n and d:
  • n must be even
  • n>=2*d

Algorithm inspired by random_regular_graph()