Skip to main content

eigh

Function eigh 

Source
pub fn eigh<T: LinalgScalar>(
    a: &[T],
    batch: usize,
    n: usize,
    lower: bool,
    jacobi: bool,
) -> (Vec<T>, Vec<T::LinalgReal>)
Expand description

The eigendecomposition A = V diag(w) V^H of each Hermitian (symmetric for real numbers) n x n matrix of a batch, reading the triangle given by lower (LAPACK’s syevd and heevd; only the real part of the diagonal is read), by the reduction to tridiagonal form and the QL or QR algorithm (LAPACK’s syev), or with jacobi, by cyclic Jacobi rotations.

Returns the eigenvectors (V, one per column) and the real eigenvalues (w, in ascending order, which sort_eigenvalues = false allows but does not require changing). Matrices with infinities or NaNs in the triangle give NaNs.

§Panics

Panics if a does not have batch * n * n elements.