EVOLUTION-MANAGER
Edit File: sample_grg.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: Geometric random graphs</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_grg {igraph}"><tr><td>sample_grg {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Geometric random graphs</h2> <h3>Description</h3> <p>Generate a random graph based on the distance of random point on a unit square </p> <h3>Usage</h3> <pre> sample_grg(nodes, radius, torus = FALSE, coords = FALSE) grg(...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>nodes</code></td> <td> <p>The number of vertices in the graph.</p> </td></tr> <tr valign="top"><td><code>radius</code></td> <td> <p>The radius within which the vertices will be connected by an edge.</p> </td></tr> <tr valign="top"><td><code>torus</code></td> <td> <p>Logical constant, whether to use a torus instead of a square.</p> </td></tr> <tr valign="top"><td><code>coords</code></td> <td> <p>Logical scalar, whether to add the positions of the vertices as vertex attributes called ‘<code>x</code>’ and ‘<code>y</code>’.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Passed to <code>sample_grg</code>.</p> </td></tr> </table> <h3>Details</h3> <p>First a number of points are dropped on a unit square, these points correspond to the vertices of the graph to create. Two points will be connected with an undirected edge if they are closer to each other in Euclidean norm than a given radius. If the <code>torus</code> argument is <code>TRUE</code> then a unit area torus is used instead of a square. </p> <h3>Value</h3> <p>A graph object. If <code>coords</code> is <code>TRUE</code> then with vertex attributes ‘<code>x</code>’ and ‘<code>y</code>’. </p> <h3>Author(s)</h3> <p>Gabor Csardi <a href="mailto:csardi.gabor@gmail.com">csardi.gabor@gmail.com</a>, first version was written by Keith Briggs (<a href="http://keithbriggs.info/">http://keithbriggs.info/</a>). </p> <h3>See Also</h3> <p><code><a href="sample_gnp.html">sample_gnp</a></code> </p> <h3>Examples</h3> <pre> g <- sample_grg(1000, 0.05, torus=FALSE) g2 <- sample_grg(1000, 0.05, torus=TRUE) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>