EVOLUTION-MANAGER
Edit File: subcomponent.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: In- or out- component of a vertex</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 subcomponent {igraph}"><tr><td>subcomponent {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>In- or out- component of a vertex</h2> <h3>Description</h3> <p>Finds all vertices reachable from a given vertex, or the opposite: all vertices from which a given vertex is reachable via a directed path. </p> <h3>Usage</h3> <pre> subcomponent(graph, v, mode = c("all", "out", "in")) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>graph</code></td> <td> <p>The graph to analyze.</p> </td></tr> <tr valign="top"><td><code>v</code></td> <td> <p>The vertex to start the search from.</p> </td></tr> <tr valign="top"><td><code>mode</code></td> <td> <p>Character string, either “in”, “out” or “all”. If “in” all vertices from which <code>v</code> is reachable are listed. If “out” all vertices reachable from <code>v</code> are returned. If “all” returns the union of these. It is ignored for undirected graphs.</p> </td></tr> </table> <h3>Details</h3> <p>A breadth-first search is conducted starting from vertex <code>v</code>. </p> <h3>Value</h3> <p>Numeric vector, the ids of the vertices in the same component as <code>v</code>. </p> <h3>Author(s)</h3> <p>Gabor Csardi <a href="mailto:csardi.gabor@gmail.com">csardi.gabor@gmail.com</a> </p> <h3>See Also</h3> <p><code><a href="components.html">components</a></code> </p> <h3>Examples</h3> <pre> g <- sample_gnp(100, 1/200) subcomponent(g, 1, "in") subcomponent(g, 1, "out") subcomponent(g, 1, "all") </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>