EVOLUTION-MANAGER
Edit File: erdos.renyi.game.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Generate random graphs according to the Erdos-Renyi model</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for erdos.renyi.game {igraph}"><tr><td>erdos.renyi.game {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Generate random graphs according to the Erdos-Renyi model</h2> <h3>Description</h3> <p>This model is very simple, every possible edge is created with the same constant probability. </p> <h3>Usage</h3> <pre> erdos.renyi.game( n, p.or.m, type = c("gnp", "gnm"), directed = FALSE, loops = FALSE ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>n</code></td> <td> <p>The number of vertices in the graph.</p> </td></tr> <tr valign="top"><td><code>p.or.m</code></td> <td> <p>Either the probability for drawing an edge between two arbitrary vertices (G(n,p) graph), or the number of edges in the graph (for G(n,m) graphs).</p> </td></tr> <tr valign="top"><td><code>type</code></td> <td> <p>The type of the random graph to create, either <code>gnp</code> (G(n,p) graph) or <code>gnm</code> (G(n,m) graph).</p> </td></tr> <tr valign="top"><td><code>directed</code></td> <td> <p>Logical, whether the graph will be directed, defaults to FALSE.</p> </td></tr> <tr valign="top"><td><code>loops</code></td> <td> <p>Logical, whether to add loop edges, defaults to FALSE.</p> </td></tr> </table> <h3>Details</h3> <p>In G(n,p) graphs, the graph has ‘n’ vertices and for each edge the probability that it is present in the graph is ‘p’. </p> <p>In G(n,m) graphs, the graph has ‘n’ vertices and ‘m’ edges, and the ‘m’ edges are chosen uniformly randomly from the set of all possible edges. This set includes loop edges as well if the <code>loops</code> parameter is TRUE. </p> <p><code>random.graph.game</code> is an alias to this function. </p> <h3>Value</h3> <p>A graph object. </p> <h3>Deprecated</h3> <p>Since igraph version 0.8.0, both <code>erdos.renyi.game</code> and <code>random.graph.game</code> are deprecated, and <code><a href="sample_gnp.html">sample_gnp</a></code> and <code><a href="sample_gnm.html">sample_gnm</a></code> should be used instead. </p> <h3>Author(s)</h3> <p>Gabor Csardi <a href="mailto:csardi.gabor@gmail.com">csardi.gabor@gmail.com</a> </p> <h3>References</h3> <p>Erdos, P. and Renyi, A., On random graphs, <em>Publicationes Mathematicae</em> 6, 290–297 (1959). </p> <h3>See Also</h3> <p><code><a href="sample_pa.html">sample_pa</a></code> </p> <h3>Examples</h3> <pre> g <- erdos.renyi.game(1000, 1/1000) degree_distribution(g) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>