| igraph Reference Manual |
|---|
int igraph_erdos_renyi_game(igraph_t *graph, igraph_erdos_renyi_t type, igraph_integer_t n, igraph_real_t p_or_m, igraph_bool_t directed, igraph_bool_t loops);
Arguments:
|
Pointer to an uninitialized graph object. |
||||
|
The type of the random graph, possible values:
|
||||
|
The number of vertices in the graph. |
||||
|
This is the p parameter for G(n,p) graphs and the m parameter for G(n,m) graphs. |
||||
|
Logical, whether to generate a directed graph. |
||||
|
Logical, whether to generate loops (self) edges. |
Returns:
Error code:
|
Time complexity: O(|V|+|E|), the number of vertices plus the number of edges in the graph.
See also:
<< 2.3. igraph_nonlinear_barabasi_game — Generates graph with non-linear preferential attachment |
2.5. igraph_watts_strogatz_game — The Watts-Strogatz small-world model >> |