powered by
The Jacobi Algorithm
JacobiR(x, symmetric = TRUE, only.values = FALSE, eps = if (!only.values) .Machine$double.eps else sqrt(.Machine$double.eps))
a real symmetric matrix
a logical value. Is the matrix symmetric? (Only symmetric matrices are allowed.)
A logical value: Do you want only the eigenvalues?
a small positive error tolerance
a list of two components as for base::eigen
base::eigen
Eigenvalues and optionally, eigenvectore of a real symmetric matrix using the classical Jacobi algorithm, (Jacobi, 1854)
# NOT RUN { V <- crossprod(matrix(rnorm(25), 5)) JacobiR(V) identical(Jacobi(V), JacobiR(V)) all.equal(Jacobi(V)$values, base::eigen(V)$values) # }
Run the code above in your browser using DataLab