abs_eigenvals: Absolute eigenvalues of a matrix

View source: R/RcppExports.R

abs_eigenvalsR Documentation

Absolute eigenvalues of a matrix

Description

Calculates the absolute eigenvalues of a matrix

Usage

abs_eigenvals(A)

Arguments

A

matrix matrix

Value

The absolute eigenvalues of A

Examples

# symmetric matrix
# should equal 2.5, 1.5
abs_eigenvals(matrix(c(2, 0.5, 0.5, 2), nrow = 2, ncol = 2))
# non-symmetric matrix
# should equal 10, 10, 5
abs_eigenvals(matrix(c(9, -1, 2, -2, 8, 4, 1, 1, 8), nrow = 3, ncol = 3, byrow = T))

rchan26/hierarchicalFusion documentation built on Sept. 11, 2022, 10:30 p.m.