EVOLUTION-MANAGER
Edit File: has_eulerian_path.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: Find Eulerian paths or cycles in a graph</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 has_eulerian_path {igraph}"><tr><td>has_eulerian_path {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Find Eulerian paths or cycles in a graph</h2> <h3>Description</h3> <p><code>has_eulerian_path</code> and <code>has_eulerian_cycle</code> checks whether there is an Eulerian path or cycle in the input graph. <code>eulerian_path</code> and <code>eulerian_cycle</code> return such a path or cycle if it exists, and throws an error otherwise. </p> <h3>Usage</h3> <pre> has_eulerian_path(graph) has_eulerian_cycle(graph) eulerian_path(graph) eulerian_cycle(graph) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>graph</code></td> <td> <p>An igraph graph object</p> </td></tr> </table> <h3>Details</h3> <p><code>has_eulerian_path</code> decides whether the input graph has an Eulerian <em>path</em>, i.e. a path that passes through every edge of the graph exactly once, and returns a logical value as a result. <code>eulerian_path</code> returns a possible Eulerian path, described with its edge and vertex sequence, or throws an error if no such path exists. </p> <p><code>has_eulerian_cycle</code> decides whether the input graph has an Eulerian <em>cycle</em>, i.e. a path that passes through every edge of the graph exactly once and that returns to its starting point, and returns a logical value as a result. <code>eulerian_cycle</code> returns a possible Eulerian cycle, described with its edge and vertex sequence, or throws an error if no such cycle exists. </p> <h3>Value</h3> <p>For <code>has_eulerian_path</code> and <code>has_eulerian_cycle</code>, a logical value that indicates whether the graph contains an Eulerian path or cycle. For <code>eulerian_path</code> and <code>eulerian_cycle</code>, a named list with two entries: </p> <table summary="R valueblock"> <tr valign="top"><td><code>epath</code></td> <td> <p>A vector containing the edge ids along the Eulerian path or cycle.</p> </td></tr> <tr valign="top"><td><code>vpath</code></td> <td> <p>A vector containing the vertex ids along the Eulerian path or cycle.</p> </td></tr> </table> <h3>Examples</h3> <pre> g <- make_graph( ~ A-B-C-D-E-A-F-D-B-F-E ) has_eulerian_path(g) eulerian_path(g) has_eulerian_cycle(g) ## Not run: eulerian_cycle(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>