EVOLUTION-MANAGER
Edit File: is_weighted.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: Weighted 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 is_weighted {igraph}"><tr><td>is_weighted {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Weighted graphs</h2> <h3>Description</h3> <p>In weighted graphs, a real number is assigned to each (directed or undirected) edge. </p> <h3>Usage</h3> <pre> is_weighted(graph) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>graph</code></td> <td> <p>The input graph.</p> </td></tr> </table> <h3>Details</h3> <p>In igraph edge weights are represented via an edge attribute, called ‘weight’. The <code>is_weighted</code> function only checks that such an attribute exists. (It does not even checks that it is a numeric edge attribute.) </p> <p>Edge weights are used for different purposes by the different functions. E.g. shortest path functions use it as the cost of the path; community finding methods use it as the strength of the relationship between two vertices, etc. Check the manual pages of the functions working with weighted graphs for details. </p> <h3>Value</h3> <p>A logical scalar. </p> <h3>Author(s)</h3> <p>Gabor Csardi <a href="mailto:csardi.gabor@gmail.com">csardi.gabor@gmail.com</a> </p> <h3>Examples</h3> <pre> g <- make_ring(10) shortest_paths(g, 8, 2) E(g)$weight <- seq_len(ecount(g)) shortest_paths(g, 8, 2) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>