EVOLUTION-MANAGER
Edit File: decompose.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: Decompose a graph into components</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 decompose {igraph}"><tr><td>decompose {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Decompose a graph into components</h2> <h3>Description</h3> <p>Creates a separate graph for each component of a graph. </p> <h3>Usage</h3> <pre> decompose(graph, mode = c("weak", "strong"), max.comps = NA, min.vertices = 0) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>graph</code></td> <td> <p>The original graph.</p> </td></tr> <tr valign="top"><td><code>mode</code></td> <td> <p>Character constant giving the type of the components, wither <code>weak</code> for weakly connected components or <code>strong</code> for strongly connected components.</p> </td></tr> <tr valign="top"><td><code>max.comps</code></td> <td> <p>The maximum number of components to return. The first <code>max.comps</code> components will be returned (which hold at least <code>min.vertices</code> vertices, see the next parameter), the others will be ignored. Supply <code>NA</code> here if you don't want to limit the number of components.</p> </td></tr> <tr valign="top"><td><code>min.vertices</code></td> <td> <p>The minimum number of vertices a component should contain in order to place it in the result list. Eg. supply 2 here to ignore isolate vertices.</p> </td></tr> </table> <h3>Value</h3> <p>A list of graph objects. </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">is_connected</a></code> to decide whether a graph is connected, <code><a href="components.html">components</a></code> to calculate the connected components of a graph. </p> <h3>Examples</h3> <pre> # the diameter of each component in a random graph g <- sample_gnp(1000, 1/1000) components <- decompose(g, min.vertices=2) sapply(components, diameter) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>