NetworkX

Previous topic

networkx.dense_gnm_random_graph

Next topic

networkx.erdos_renyi_graph

Quick search

networkx.gnm_random_graph

gnm_random_graph(n, m, 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: the number of nodes
  • m: the number of edges
  • seed: seed for random number generator (default=None)