|
| real(sp) function, dimension(:), allocatable | la_eigvalsh_s (a, upper_a, err) |
| | Return an array of eigenvalues of real symmetric / complex hermitian A.
|
| |
| pure real(sp) function, dimension(:), allocatable | la_eigvalsh_noerr_s (a, upper_a) |
| | Return an array of eigenvalues of real symmetric / complex hermitian A.
|
| |
| real(dp) function, dimension(:), allocatable | la_eigvalsh_d (a, upper_a, err) |
| | Return an array of eigenvalues of real symmetric / complex hermitian A.
|
| |
| pure real(dp) function, dimension(:), allocatable | la_eigvalsh_noerr_d (a, upper_a) |
| | Return an array of eigenvalues of real symmetric / complex hermitian A.
|
| |
| real(sp) function, dimension(:), allocatable | la_eigvalsh_c (a, upper_a, err) |
| | Return an array of eigenvalues of real symmetric / complex hermitian A.
|
| |
| pure real(sp) function, dimension(:), allocatable | la_eigvalsh_noerr_c (a, upper_a) |
| | Return an array of eigenvalues of real symmetric / complex hermitian A.
|
| |
| real(dp) function, dimension(:), allocatable | la_eigvalsh_z (a, upper_a, err) |
| | Return an array of eigenvalues of real symmetric / complex hermitian A.
|
| |
| pure real(dp) function, dimension(:), allocatable | la_eigvalsh_noerr_z (a, upper_a) |
| | Return an array of eigenvalues of real symmetric / complex hermitian A.
|
| |
Eigenvalues of a real symmetric or complex Hermitian matrix.
Summary
Compute the eigenvalues of a real symmetric or complex Hermitian matrix \( A \). The function returns the eigenvalues in an array. The user can specify whether to use the upper or lower half of the matrix for computation.
Description
Given a real symmetric or complex Hermitian matrix \( A \), this routine computes its eigenvalues \( \lambda \) from the following equation:
\[ A v = \lambda v
\]
where \( v \) represents an eigenvector corresponding to eigenvalue \( \lambda \).
The computation supports both real and complex matrices. The eigenvalues are returned in a real array. The function also provides an optional error state argument to handle error reporting without halting execution.
The user can specify whether to use the upper or lower half of the matrix \( A \) for computation (default: lower half).
- Note
- The solution is based on LAPACK's SYEV and HEEV routines.
Arguments
a: A real or complex matrix of size \( [n,n] \), representing the real symmetric or complex Hermitian matrix to be decomposed.
upper_a (optional): A logical flag indicating whether to use the upper half (.true.) or the lower half (.false.) of \( A \) for the computation. The default is lower.
err (optional): A la_state variable to handle errors. Without it the function is pure, and execution will stop on errors.
Return value
lambda: A real array with the same kind as a, containing the computed eigenvalues of the matrix \( A \).
Errors
- Raises LINALG_VALUE_ERROR if the matrix has invalid or incompatible sizes.
- Raises LINALG_ERROR if the eigendecomposition fails.
- If
err is not provided, execution will stop on errors.
Notes
- The computed eigenvalues are returned as real values for real matrices, and complex values for complex matrices.
- This routine is based on LAPACK's SYEV and HEEV routines.