powered by
Compute unnormalized, normalized, or random-walk Laplacian from an adjacency matrix.
cal_laplacian(W, type = c("unnormalized", "normalized", "randomwalk"))
Laplacian matrix of the same class as input.
A square adjacency matrix (can be dense or sparse).
Type of Laplacian to compute: "unnormalized", "normalized", or "randomwalk".
# \donttest{ W <- matrix(c(0, 1, 1, 1, 0, 1, 1, 1, 0), nrow = 3) cal_laplacian(W, type = "normalized") # }
Run the code above in your browser using DataLab