Processing math: 100%
fortran-lapack
All Classes Namespaces Files Functions Variables Pages
la_eig::eigvalsh Interface Reference

Eigenvalues of a real symmetric or complex Hermitian matrix. More...

Public Member Functions

real(sp) function, dimension(:), allocatable la_eigvalsh_s (a, upper_a, err)
 Return an array of eigenvalues of real symmetric / complex hermitian A.
 
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.
 
real(dp) function, dimension(:), allocatable la_eigvalsh_noerr_d (a, upper_a)
 Return an array of eigenvalues of real symmetric / complex hermitian A.
 
real(qp) function, dimension(:), allocatable la_eigvalsh_q (a, upper_a, err)
 Return an array of eigenvalues of real symmetric / complex hermitian A.
 
real(qp) function, dimension(:), allocatable la_eigvalsh_noerr_q (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.
 
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.
 
real(dp) function, dimension(:), allocatable la_eigvalsh_noerr_z (a, upper_a)
 Return an array of eigenvalues of real symmetric / complex hermitian A.
 
real(qp) function, dimension(:), allocatable la_eigvalsh_w (a, upper_a, err)
 Return an array of eigenvalues of real symmetric / complex hermitian A.
 
real(qp) function, dimension(:), allocatable la_eigvalsh_noerr_w (a, upper_a)
 Return an array of eigenvalues of real symmetric / complex hermitian A.
 

Detailed Description

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. If not provided, 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.

Member Function/Subroutine Documentation

◆ la_eigvalsh_c()

real(sp) function, dimension(:), allocatable la_eig::eigvalsh::la_eigvalsh_c ( complex(sp), dimension(:,:), intent(in), target a,
logical(lk), intent(in), optional upper_a,
type(la_state), intent(out) err )

Return an array of eigenvalues of real symmetric / complex hermitian A.

Parameters
[in]aInput matrix A[m,n]
[in]upper_a[optional] Should the upper/lower half of A be used? Default: lower
[out]err[optional] state return flag. On error if not requested, the code will stop
Returns
Array of singular values

◆ la_eigvalsh_d()

real(dp) function, dimension(:), allocatable la_eig::eigvalsh::la_eigvalsh_d ( real(dp), dimension(:,:), intent(in), target a,
logical(lk), intent(in), optional upper_a,
type(la_state), intent(out) err )

Return an array of eigenvalues of real symmetric / complex hermitian A.

Parameters
[in]aInput matrix A[m,n]
[in]upper_a[optional] Should the upper/lower half of A be used? Default: lower
[out]err[optional] state return flag. On error if not requested, the code will stop
Returns
Array of singular values

◆ la_eigvalsh_noerr_c()

real(sp) function, dimension(:), allocatable la_eig::eigvalsh::la_eigvalsh_noerr_c ( complex(sp), dimension(:,:), intent(in), target a,
logical(lk), intent(in), optional upper_a )

Return an array of eigenvalues of real symmetric / complex hermitian A.

Parameters
[in]aInput matrix A[m,n]
[in]upper_a[optional] Should the upper/lower half of A be used? Default: lower
Returns
Array of singular values

◆ la_eigvalsh_noerr_d()

real(dp) function, dimension(:), allocatable la_eig::eigvalsh::la_eigvalsh_noerr_d ( real(dp), dimension(:,:), intent(in), target a,
logical(lk), intent(in), optional upper_a )

Return an array of eigenvalues of real symmetric / complex hermitian A.

Parameters
[in]aInput matrix A[m,n]
[in]upper_a[optional] Should the upper/lower half of A be used? Default: lower
Returns
Array of singular values

◆ la_eigvalsh_noerr_q()

real(qp) function, dimension(:), allocatable la_eig::eigvalsh::la_eigvalsh_noerr_q ( real(qp), dimension(:,:), intent(in), target a,
logical(lk), intent(in), optional upper_a )

Return an array of eigenvalues of real symmetric / complex hermitian A.

Parameters
[in]aInput matrix A[m,n]
[in]upper_a[optional] Should the upper/lower half of A be used? Default: lower
Returns
Array of singular values

◆ la_eigvalsh_noerr_s()

real(sp) function, dimension(:), allocatable la_eig::eigvalsh::la_eigvalsh_noerr_s ( real(sp), dimension(:,:), intent(in), target a,
logical(lk), intent(in), optional upper_a )

Return an array of eigenvalues of real symmetric / complex hermitian A.

Parameters
[in]aInput matrix A[m,n]
[in]upper_a[optional] Should the upper/lower half of A be used? Default: lower
Returns
Array of singular values

◆ la_eigvalsh_noerr_w()

real(qp) function, dimension(:), allocatable la_eig::eigvalsh::la_eigvalsh_noerr_w ( complex(qp), dimension(:,:), intent(in), target a,
logical(lk), intent(in), optional upper_a )

Return an array of eigenvalues of real symmetric / complex hermitian A.

Parameters
[in]aInput matrix A[m,n]
[in]upper_a[optional] Should the upper/lower half of A be used? Default: lower
Returns
Array of singular values

◆ la_eigvalsh_noerr_z()

real(dp) function, dimension(:), allocatable la_eig::eigvalsh::la_eigvalsh_noerr_z ( complex(dp), dimension(:,:), intent(in), target a,
logical(lk), intent(in), optional upper_a )

Return an array of eigenvalues of real symmetric / complex hermitian A.

Parameters
[in]aInput matrix A[m,n]
[in]upper_a[optional] Should the upper/lower half of A be used? Default: lower
Returns
Array of singular values

◆ la_eigvalsh_q()

real(qp) function, dimension(:), allocatable la_eig::eigvalsh::la_eigvalsh_q ( real(qp), dimension(:,:), intent(in), target a,
logical(lk), intent(in), optional upper_a,
type(la_state), intent(out) err )

Return an array of eigenvalues of real symmetric / complex hermitian A.

Parameters
[in]aInput matrix A[m,n]
[in]upper_a[optional] Should the upper/lower half of A be used? Default: lower
[out]err[optional] state return flag. On error if not requested, the code will stop
Returns
Array of singular values

◆ la_eigvalsh_s()

real(sp) function, dimension(:), allocatable la_eig::eigvalsh::la_eigvalsh_s ( real(sp), dimension(:,:), intent(in), target a,
logical(lk), intent(in), optional upper_a,
type(la_state), intent(out) err )

Return an array of eigenvalues of real symmetric / complex hermitian A.

Parameters
[in]aInput matrix A[m,n]
[in]upper_a[optional] Should the upper/lower half of A be used? Default: lower
[out]err[optional] state return flag. On error if not requested, the code will stop
Returns
Array of singular values

◆ la_eigvalsh_w()

real(qp) function, dimension(:), allocatable la_eig::eigvalsh::la_eigvalsh_w ( complex(qp), dimension(:,:), intent(in), target a,
logical(lk), intent(in), optional upper_a,
type(la_state), intent(out) err )

Return an array of eigenvalues of real symmetric / complex hermitian A.

Parameters
[in]aInput matrix A[m,n]
[in]upper_a[optional] Should the upper/lower half of A be used? Default: lower
[out]err[optional] state return flag. On error if not requested, the code will stop
Returns
Array of singular values

◆ la_eigvalsh_z()

real(dp) function, dimension(:), allocatable la_eig::eigvalsh::la_eigvalsh_z ( complex(dp), dimension(:,:), intent(in), target a,
logical(lk), intent(in), optional upper_a,
type(la_state), intent(out) err )

Return an array of eigenvalues of real symmetric / complex hermitian A.

Parameters
[in]aInput matrix A[m,n]
[in]upper_a[optional] Should the upper/lower half of A be used? Default: lower
[out]err[optional] state return flag. On error if not requested, the code will stop
Returns
Array of singular values

The documentation for this interface was generated from the following file: