hiperwalk.WeightedGraph.laplacian_matrix#

WeightedGraph.laplacian_matrix()[source]#

Return the graph’s Laplacian matrix.

See also

adjacency_matrix

Notes

The Laplacian matrix is given by

\[L = W - A,\]

where \(A\) is the graph’s adjacency matrix and \(W\) is a diagonal matrix whose entries are the sum of the weights of the edges incident to a given vertex.

\[\begin{split}W_{i, j} = \begin{cases} \sum_{k = 0}^{|V| - 1}A_{ik}, & \text{if } i = j\\ 0, & \text{otherwise}. \end{cases}\end{split}\]