EVOLUTION-MANAGER
Edit File: keeping_degseq.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: Graph rewiring while preserving the degree distribution</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 keeping_degseq {igraph}"><tr><td>keeping_degseq {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Graph rewiring while preserving the degree distribution</h2> <h3>Description</h3> <p>This function can be used together with <code><a href="rewire.html">rewire</a></code> to randomly rewire the edges while preserving the original graph's degree distribution. </p> <h3>Usage</h3> <pre> keeping_degseq(loops = FALSE, niter = 100) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>loops</code></td> <td> <p>Whether to allow destroying and creating loop edges.</p> </td></tr> <tr valign="top"><td><code>niter</code></td> <td> <p>Number of rewiring trials to perform.</p> </td></tr> </table> <h3>Details</h3> <p>The rewiring algorithm chooses two arbitrary edges in each step ((a,b) and (c,d)) and substitutes them with (a,d) and (c,b), if they not already exists in the graph. The algorithm does not create multiple edges. </p> <h3>Author(s)</h3> <p>Tamas Nepusz <a href="mailto:ntamas@gmail.com">ntamas@gmail.com</a> and Gabor Csardi <a href="mailto:csardi.gabor@gmail.com">csardi.gabor@gmail.com</a> </p> <h3>See Also</h3> <p><code><a href="sample_degseq.html">sample_degseq</a></code> </p> <p>Other rewiring functions: <code><a href="each_edge.html">each_edge</a>()</code>, <code><a href="rewire.html">rewire</a>()</code> </p> <h3>Examples</h3> <pre> g <- make_ring(10) g %>% rewire(keeping_degseq(niter = 20)) %>% degree() print_all(rewire(g, with = keeping_degseq(niter = vcount(g) * 10))) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>