NetworkX

Previous topic

networkx.dense_gnm_random_graph

Next topic

networkx.erdos_renyi_graph

networkx.gnm_random_graph

gnm_random_graph(n, m, create_using=None, seed=None)

Return the random graph G_{n,m}.

Gives a graph picked randomly out of the set of all graphs with n nodes and m edges.

Parameters:

n : int

The number of nodes.

m : int

The number of edges.

create_using : graph, optional (default Graph)

Use specified graph as a container.

seed : int, optional

Seed for random number generator (default=None).