linalg::factor::eigh
Symmetric eigenproblem: Householder reduction to tridiagonal form (tred2), then the implicit QL algorithm with Wilkinson-like shifts (tql2), as in EISPACK and JAMA. Backward stable: the eigenvalues are exact for a matrix within n * eps * ||A|| of A. O(4n^3/3) for the reduction plus about 6n^3 for the QL sweeps with vectors.
Structs
EighSource
pub struct Eigh<T>A = V diag(w) V^T of a real symmetric matrix: eigenvalues w
rising, orthonormal eigenvectors as the columns of V. Only the
lower triangle of A is read.
nabi
use core::array::Matrix;
let a: Matrix<f64> = [[2, 1], [1, 2]];
let e = try linalg::eigh(a);
let w = e.values();
assert((w[0] - 1.0).abs() < 1e-12 && (w[1] - 3.0).abs() < 1e-12);
The eigenvalues, smallest first.
The eigenvectors: column
jbelongs tovalues()[j].