powered by
The Classical Jacobi Algorithm
Jacobi(x, symmetric = TRUE, only.values = FALSE, eps = 0)
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?
an error tolerance. 0.0 implies .Machine$double.eps and sqrt(.Machine$double.eps) if only.values = TRUE
.Machine$double.eps
sqrt(.Machine$double.eps)
only.values = TRUE
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(runif(40, -1, 1), 8)) Jacobi(V) identical(Jacobi(V), JacobiR(V)) all.equal(Jacobi(V)$values, base::eigen(V)$values) # }
Run the code above in your browser using DataLab