D: Degree Matrix

Description Usage Arguments Value

Description

Compute the degree of each vertex in a weighted adjacency matrix.

Usage

1
D(w, symmetric = FALSE)

Arguments

w

A symmetric weighted adjacency matrix.

symmetric

A logical. If FALSE, then w is checked for symmetry. If it is known beforehand that w is symmetric, then it is faster to call with symmetric = TRUE.

Value

A diagonal matrix, whose values on the main diagonal represent the weighted degrees of the vertices in w—i.e., the values along the main diagonal are the row-sums of w.


patrickreidy/phoneigen documentation built on May 20, 2019, 10:22 p.m.