Computes eigenvalues and eigenvectors of a real symmetric matrix by
dispatching to the active backend via eigen with
symmetric = TRUE.
Arguments
- x
A real symmetric numeric matrix,
adgeMatrix, or other object accepted byeigen.
Value
A list with components values (numeric vector of eigenvalues
in ascending order) and vectors (numeric matrix whose columns are
the corresponding eigenvectors).
Examples
S <- crossprod(matrix(rnorm(25), nrow = 5))
ev <- eigh(adgeMatrix(S))
length(ev$values)
#> [1] 5