sgtl.random.erdos_renyi#

sgtl.random.erdos_renyi(n, p)#

Generate a random graph from the Erdos-Renyi model.

\(G(n, p)\) is a random graph on \(n\) vertices such that for any pair of vertices \(u\) and \(v\) the edge \((u, v)\) is included with probability \(p\).

Parameters:
  • n – The number of vertices in the graph.

  • p – The probability of an edge between each pair of vertices.

Returns:

The generated graph as an sgtl.Graph object.