EVOLUTION-MANAGER
Edit File: sample_smallworld.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: The Watts-Strogatz small-world 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 sample_smallworld {igraph}"><tr><td>sample_smallworld {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>The Watts-Strogatz small-world model</h2> <h3>Description</h3> <p>Generate a graph according to the Watts-Strogatz network model. </p> <h3>Usage</h3> <pre> sample_smallworld(dim, size, nei, p, loops = FALSE, multiple = FALSE) smallworld(...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>dim</code></td> <td> <p>Integer constant, the dimension of the starting lattice.</p> </td></tr> <tr valign="top"><td><code>size</code></td> <td> <p>Integer constant, the size of the lattice along each dimension.</p> </td></tr> <tr valign="top"><td><code>nei</code></td> <td> <p>Integer constant, the neighborhood within which the vertices of the lattice will be connected.</p> </td></tr> <tr valign="top"><td><code>p</code></td> <td> <p>Real constant between zero and one, the rewiring probability.</p> </td></tr> <tr valign="top"><td><code>loops</code></td> <td> <p>Logical scalar, whether loops edges are allowed in the generated graph.</p> </td></tr> <tr valign="top"><td><code>multiple</code></td> <td> <p>Logical scalar, whether multiple edges are allowed int the generated graph.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Passed to <code>sample_smallworld</code>.</p> </td></tr> </table> <h3>Details</h3> <p>First a lattice is created with the given <code>dim</code>, <code>size</code> and <code>nei</code> arguments. Then the edges of the lattice are rewired uniformly randomly with probability <code>p</code>. </p> <p>Note that this function might create graphs with loops and/or multiple edges. You can use <code><a href="simplify.html">simplify</a></code> to get rid of these. </p> <h3>Value</h3> <p>A graph object. </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>Duncan J Watts and Steven H Strogatz: Collective dynamics of ‘small world’ networks, Nature 393, 440-442, 1998. </p> <h3>See Also</h3> <p><code><a href="make_lattice.html">make_lattice</a></code>, <code><a href="rewire.html">rewire</a></code> </p> <h3>Examples</h3> <pre> g <- sample_smallworld(1, 100, 5, 0.05) mean_distance(g) transitivity(g, type="average") </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>