|
numerics 0.1.0
|
Sequential cyclic Jacobi eigensolver. More...
Go to the source code of this file.
Namespaces | |
| namespace | num |
| namespace | num::backends |
| namespace | num::backends::seq |
Functions | |
| EigenResult | num::backends::seq::eig_sym (const Matrix &A, real tol, idx max_sweeps) |
Sequential cyclic Jacobi eigensolver.
Reference: Golub & Van Loan "Matrix Computations" section 8.4
Each sweep visits every off-diagonal pair (p,q) and applies a 2x2 similarity rotation that zeros A[p,q]. The rotation angle satisfies:
tau = (A[q,q] - A[p,p]) / (2*A[p,q]) t = sign(tau) / (|tau| + sqrt(1 + tau^2)) c = 1/sqrt(1+t^2), s = c*t
Definition in file jacobi_eig.cpp.