EVOLUTION-MANAGER
Edit File: simplify.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: Simple 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 simplify {igraph}"><tr><td>simplify {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Simple graphs</h2> <h3>Description</h3> <p>Simple graphs are graphs which do not contain loop and multiple edges. </p> <h3>Usage</h3> <pre> simplify( graph, remove.multiple = TRUE, remove.loops = TRUE, edge.attr.comb = igraph_opt("edge.attr.comb") ) is_simple(graph) simplify_and_colorize(graph) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>graph</code></td> <td> <p>The graph to work on.</p> </td></tr> <tr valign="top"><td><code>remove.multiple</code></td> <td> <p>Logical, whether the multiple edges are to be removed.</p> </td></tr> <tr valign="top"><td><code>remove.loops</code></td> <td> <p>Logical, whether the loop edges are to be removed.</p> </td></tr> <tr valign="top"><td><code>edge.attr.comb</code></td> <td> <p>Specifies what to do with edge attributes, if <code>remove.multiple=TRUE</code>. In this case many edges might be mapped to a single one in the new graph, and their attributes are combined. Please see <code><a href="igraph-attribute-combination.html">attribute.combination</a></code> for details on this.</p> </td></tr> </table> <h3>Details</h3> <p>A loop edge is an edge for which the two endpoints are the same vertex. Two edges are multiple edges if they have exactly the same two endpoints (for directed graphs order does matter). A graph is simple is it does not contain loop edges and multiple edges. </p> <p><code>is_simple</code> checks whether a graph is simple. </p> <p><code>simplify</code> removes the loop and/or multiple edges from a graph. If both <code>remove.loops</code> and <code>remove.multiple</code> are <code>TRUE</code> the function returns a simple graph. </p> <p><code>simplify_and_colorize</code> constructs a new, simple graph from a graph and also sets a <code>color</code> attribute on both the vertices and the edges. The colors of the vertices represent the number of self-loops that were originally incident on them, while the colors of the edges represent the multiplicities of the same edges in the original graph. This allows one to take into account the edge multiplicities and the number of loop edges in the VF2 isomorphism algorithm. Other graph, vertex and edge attributes from the original graph are discarded as the primary purpose of this function is to facilitate the usage of multigraphs with the VF2 algorithm. </p> <h3>Value</h3> <p>a new graph object with the edges deleted. </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="which_multiple.html">which_loop</a></code>, <code><a href="which_multiple.html">which_multiple</a></code> and <code><a href="which_multiple.html">count_multiple</a></code>, <code><a href="delete_edges.html">delete_edges</a></code>, <code><a href="delete_vertices.html">delete_vertices</a></code> </p> <h3>Examples</h3> <pre> g <- graph( c(1,2,1,2,3,3) ) is_simple(g) is_simple(simplify(g, remove.loops=FALSE)) is_simple(simplify(g, remove.multiple=FALSE)) is_simple(simplify(g)) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>