laplacian
Graph Laplacian matrix
Syntax
Description
returns the graph Laplacian matrix,L
= laplacian(G
)L
. Each diagonal entry,L(j,j)
, is given by the degree of nodej
,degree(G,j)
. The off-diagonal entries ofL
represent the edges inG
such thatL(i,j) = L(j,i) = -1
if there is an edge between nodesi
andj
; otherwise,L(i,j) = L(j,i) = 0
. The input graphG
cannot be a multigraph or contain self-loops, and edge weights are ignored.