graph.laplacian

0th

Percentile

Graph Laplacian

The Laplacian of a graph.

Keywords
graphs
Usage
graph.laplacian(graph, normalized=FALSE, weights=NULL,
   sparse=getIgraphOpt("sparsematrices"))
Arguments
graph
The input graph.
normalized
Whether to calculate the normalized Laplacian. See definitions below.
weights
An optional vector giving edge weights for weighted Laplacian matrix. If this is NULL and the graph has an edge attribute called weight, then it will be used automatically. Set this to NA if you want the
sparse
Logical scalar, whether to return the result as a sparse matrix. The Matrix package is required for sparse matrices.
Details

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.

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.

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.

Value

  • A numeric matrix.

concept

Graph Laplacian

Aliases
  • graph.laplacian
Examples
g <- graph.ring(10)
graph.laplacian(g)
graph.laplacian(g, norm=TRUE)
graph.laplacian(g, norm=TRUE, sparse=FALSE)
Documentation reproduced from package igraph, version 0.6.5-2, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.