Parallel edges accumulate; a loop contributes to the degree but not to the diagonal of L (the d_v - w(v, v) term). Vertex labels are one-based.
Details
Formula: w(u, v) = sum of the weights on {u, v}; L(u, v) = d_v - w(v, v) if u = v, -w(u, v) otherwise
References
Chung (1997), Spectral Graph Theory, CBMS 92, Section 1.4, for the weighted definition with loops.
Examples
M <- matrix(c(1, 2, 3, 4, 5, 6), nrow = 2)
Wgtlap(M)
#> $W
#> [,1] [,2] [,3] [,4]
#> [1,] 0 0 5 0
#> [2,] 0 0 0 6
#> [3,] 5 0 0 0
#> [4,] 0 6 0 0
#>
#> $L
#> [,1] [,2] [,3] [,4]
#> [1,] 5 0 -5 0
#> [2,] 0 6 0 -6
#> [3,] -5 0 5 0
#> [4,] 0 -6 0 6
#>
#> $degree
#> [1] 5 6 5 6
#>
#> $volume
#> [1] 22
#>
#> $n
#> [1] 4
#>
#> $m
#> [1] 2
#>
#> $method
#> [1] "Weighted Laplacian from an edge list"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
