# Jacobi: The Jacobi Algorithm using Rcpp In JacobiEigen: Classical Jacobi Eigenvalue Algorithm

## Description

The Classical Jacobi Algorithm

## Usage

 `1` ```Jacobi(x, symmetric = TRUE, only.values = FALSE, eps = 0) ```

## Arguments

 `x` A real symmetric matrix `symmetric` a logical value. Is the matrix symmetric? (Only symmetric matrices are allowed.) `only.values` A logical value: do you want only the eigenvalues? `eps` an error tolerance. 0.0 implies `.Machine\$double.eps` and `sqrt(.Machine\$double.eps)` if `only.values = TRUE`

## Details

Eigenvalues and optionally, eigenvectore, of a real symmetric matrix using the classical Jacobi algorithm, (Jacobi, 1854)

## Value

a list of two components as for `base::eigen`

## Examples

 ```1 2 3 4``` ```V <- crossprod(matrix(runif(40, -1, 1), 8)) Jacobi(V) identical(Jacobi(V), JacobiR(V)) all.equal(Jacobi(V)\$values, base::eigen(V)\$values) ```

### Example output

```\$values
 3.8295873 2.9634209 2.1540343 1.7205096 0.9341117

\$vectors
[,1]        [,2]       [,3]        [,4]       [,5]
[1,]  0.5998277  0.05870473  0.4455547 -0.21073409  0.6275608
[2,]  0.5901163  0.40729883 -0.6672423 -0.11363479 -0.1665692
[3,] -0.5171593  0.63414430 -0.1869099 -0.09873786  0.5345304
[4,]  0.1098265 -0.16633551 -0.2468741  0.86976662  0.3779284
[5,] -0.1115966 -0.63313104 -0.5102810 -0.42004184  0.3871297

 TRUE
 TRUE
```

JacobiEigen documentation built on April 17, 2021, 9:06 a.m.