EVOLUTION-MANAGER
Edit File: laplacian_matrix.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: Graph Laplacian</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 laplacian_matrix {igraph}"><tr><td>laplacian_matrix {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Graph Laplacian</h2> <h3>Description</h3> <p>The Laplacian of a graph. </p> <h3>Usage</h3> <pre> laplacian_matrix( graph, normalized = FALSE, weights = NULL, sparse = igraph_opt("sparsematrices") ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>graph</code></td> <td> <p>The input graph.</p> </td></tr> <tr valign="top"><td><code>normalized</code></td> <td> <p>Whether to calculate the normalized Laplacian. See definitions below.</p> </td></tr> <tr valign="top"><td><code>weights</code></td> <td> <p>An optional vector giving edge weights for weighted Laplacian matrix. If this is <code>NULL</code> and the graph has an edge attribute called <code>weight</code>, then it will be used automatically. Set this to <code>NA</code> if you want the unweighted Laplacian on a graph that has a <code>weight</code> edge attribute.</p> </td></tr> <tr valign="top"><td><code>sparse</code></td> <td> <p>Logical scalar, whether to return the result as a sparse matrix. The <code>Matrix</code> package is required for sparse matrices.</p> </td></tr> </table> <h3>Details</h3> <p>The Laplacian Matrix of a graph is a symmetric matrix having the same number of rows and columns as the number of vertices in the graph and element (i,j) is d[i], the degree of vertex i if if i==j, -1 if i!=j and there is an edge between vertices i and j and 0 otherwise. </p> <p>A normalized version of the Laplacian Matrix is similar: element (i,j) is 1 if i==j, -1/sqrt(d[i] d[j]) if i!=j and there is an edge between vertices i and j and 0 otherwise. </p> <p>The weighted version of the Laplacian simply works with the weighted degree instead of the plain degree. I.e. (i,j) is d[i], the weighted degree of vertex i if if i==j, -w if i!=j and there is an edge between vertices i and j with weight w, and 0 otherwise. The weighted degree of a vertex is the sum of the weights of its adjacent edges. </p> <h3>Value</h3> <p>A numeric matrix. </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) laplacian_matrix(g) laplacian_matrix(g, norm=TRUE) laplacian_matrix(g, norm=TRUE, sparse=FALSE) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>