Compute a matrix Laplacian

Laplacian(W)

Arguments

W

Squared weight matrix

Value

The matrix Laplacian of W

Examples

uniformeW=matrix(1,3,3) Laplacian(uniformeW)
#> [,1] [,2] [,3] #> [1,] 2 -1 -1 #> [2,] -1 2 -1 #> [3,] -1 -1 2