spectral_radius: Spectral radius of a symmetric matrix

View source: R/RcppExports.R

spectral_radiusR Documentation

Spectral radius of a symmetric matrix

Description

Calculates the spectral radius of a symmetric matrix A (the largest absolute eigenvalue)

Usage

spectral_radius(A)

Arguments

A

matrix

Value

The spectral radius (largest absolute eigenvalue) of A

Examples

# symmetric matrix
# should equal 2.5
spectral_radius(matrix(c(2, 0.5, 0.5, 2), nrow = 2, ncol = 2))
# non-symmetric matrix
# should equal 10
spectral_radius(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.