weightToLaplacian | R Documentation |
Helper function to convert Weight Matrix to Laplacian Matrix
weightToLaplacian(W)
W |
The weight matrix for n nodes which should be |
L n
xn
Laplacian matrix.
set.seed(20231201)
p <- 5
W <- matrix(0, nrow = p, ncol = p)
W[lower.tri(W)] <- runif(p*(p-1)/2, 0, 1)
W[upper.tri(W)] <- t(W)[upper.tri(W)]
diag(W) <- 1
(L <- weightToLaplacian(W))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.