Returns the connectance of a network (square matrix), defined as the proportion of non-zero off-diagonal elements.

get_C(mat)

Arguments

mat

The matrix to be valuated

Value

The complexity of the matrix mat

Examples

eg_mat <- matrix(dat = rnorm(n = 16), nrow = 4); mat_cmp <- get_C(mat = eg_mat);