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

Eigenvalues of a square matrix. More...

Public Member Functions

complex(sp) function, dimension(:), allocatable la_eigvals_standard_s (a, err)
 
complex(sp) function, dimension(:), allocatable la_eigvals_noerr_standard_s (a)
 
complex(sp) function, dimension(:), allocatable la_eigvals_generalized_s (a, b, err)
 
complex(sp) function, dimension(:), allocatable la_eigvals_noerr_generalized_s (a, b)
 
complex(dp) function, dimension(:), allocatable la_eigvals_standard_d (a, err)
 
complex(dp) function, dimension(:), allocatable la_eigvals_noerr_standard_d (a)
 
complex(dp) function, dimension(:), allocatable la_eigvals_generalized_d (a, b, err)
 
complex(dp) function, dimension(:), allocatable la_eigvals_noerr_generalized_d (a, b)
 
complex(qp) function, dimension(:), allocatable la_eigvals_standard_q (a, err)
 
complex(qp) function, dimension(:), allocatable la_eigvals_noerr_standard_q (a)
 
complex(qp) function, dimension(:), allocatable la_eigvals_generalized_q (a, b, err)
 
complex(qp) function, dimension(:), allocatable la_eigvals_noerr_generalized_q (a, b)
 
complex(sp) function, dimension(:), allocatable la_eigvals_standard_c (a, err)
 
complex(sp) function, dimension(:), allocatable la_eigvals_noerr_standard_c (a)
 
complex(sp) function, dimension(:), allocatable la_eigvals_generalized_c (a, b, err)
 
complex(sp) function, dimension(:), allocatable la_eigvals_noerr_generalized_c (a, b)
 
complex(dp) function, dimension(:), allocatable la_eigvals_standard_z (a, err)
 
complex(dp) function, dimension(:), allocatable la_eigvals_noerr_standard_z (a)
 
complex(dp) function, dimension(:), allocatable la_eigvals_generalized_z (a, b, err)
 
complex(dp) function, dimension(:), allocatable la_eigvals_noerr_generalized_z (a, b)
 
complex(qp) function, dimension(:), allocatable la_eigvals_standard_w (a, err)
 
complex(qp) function, dimension(:), allocatable la_eigvals_noerr_standard_w (a)
 
complex(qp) function, dimension(:), allocatable la_eigvals_generalized_w (a, b, err)
 
complex(qp) function, dimension(:), allocatable la_eigvals_noerr_generalized_w (a, b)
 

Detailed Description

Eigenvalues of a square matrix.

Summary

This interface provides methods for computing the eigenvalues of a real or complex square matrix. It supports both standard and generalized eigenvalue problems, allowing for the decomposition of matrix A alone or a pair of matrices (A, B) in the generalized case.

Description

Given a square 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 .

In the generalized eigenvalue problem case, the routine solves:

A v = \lambda B v

This computation supports both real and complex matrices. The eigenvalues are returned in a complex array, even for real matrices. The function also provides an optional error state argument to handle error reporting without halting execution.

Note
The solution is based on LAPACK's GEEV and GGEV routines.

Arguments

  • a: A real or complex matrix of size [n,n] , representing the input matrix to be decomposed.
  • b (optional): A real or complex matrix of size [n,n] , representing the second matrix in the generalized eigenvalue problem.
  • err (optional): A la_state variable to handle errors. If not provided, execution will stop on errors.

Return value

  • lambda: A complex array of eigenvalues, computed from the input matrix A (and B if in the generalized case).

Errors

  • Raises LINALG_VALUE_ERROR if the matrices have 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 complex values, even if the matrix is real.
  • This routine is based on LAPACK's GEEV and GGEV routines.
  • The generalized eigenvalue problem requires matrix B to be provided and may modify it in-place.

Member Function/Subroutine Documentation

◆ la_eigvals_generalized_c()

complex(sp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_generalized_c ( complex(sp), dimension(:,:), intent(in), target a,
complex(sp), dimension(:,:), intent(inout), target b,
type(la_state), intent(out) err )
Parameters
[in]aInput matrix A[m,n]
[in,out]bGeneralized problem matrix B[n,n]
[out]err[optional] state return flag. On error if not requested, the code will stop
Returns
Array of eigenvalues

◆ la_eigvals_generalized_d()

complex(dp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_generalized_d ( real(dp), dimension(:,:), intent(in), target a,
real(dp), dimension(:,:), intent(inout), target b,
type(la_state), intent(out) err )
Parameters
[in]aInput matrix A[m,n]
[in,out]bGeneralized problem matrix B[n,n]
[out]err[optional] state return flag. On error if not requested, the code will stop
Returns
Array of eigenvalues

◆ la_eigvals_generalized_q()

complex(qp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_generalized_q ( real(qp), dimension(:,:), intent(in), target a,
real(qp), dimension(:,:), intent(inout), target b,
type(la_state), intent(out) err )
Parameters
[in]aInput matrix A[m,n]
[in,out]bGeneralized problem matrix B[n,n]
[out]err[optional] state return flag. On error if not requested, the code will stop
Returns
Array of eigenvalues

◆ la_eigvals_generalized_s()

complex(sp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_generalized_s ( real(sp), dimension(:,:), intent(in), target a,
real(sp), dimension(:,:), intent(inout), target b,
type(la_state), intent(out) err )
Parameters
[in]aInput matrix A[m,n]
[in,out]bGeneralized problem matrix B[n,n]
[out]err[optional] state return flag. On error if not requested, the code will stop
Returns
Array of eigenvalues

◆ la_eigvals_generalized_w()

complex(qp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_generalized_w ( complex(qp), dimension(:,:), intent(in), target a,
complex(qp), dimension(:,:), intent(inout), target b,
type(la_state), intent(out) err )
Parameters
[in]aInput matrix A[m,n]
[in,out]bGeneralized problem matrix B[n,n]
[out]err[optional] state return flag. On error if not requested, the code will stop
Returns
Array of eigenvalues

◆ la_eigvals_generalized_z()

complex(dp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_generalized_z ( complex(dp), dimension(:,:), intent(in), target a,
complex(dp), dimension(:,:), intent(inout), target b,
type(la_state), intent(out) err )
Parameters
[in]aInput matrix A[m,n]
[in,out]bGeneralized problem matrix B[n,n]
[out]err[optional] state return flag. On error if not requested, the code will stop
Returns
Array of eigenvalues

◆ la_eigvals_noerr_generalized_c()

complex(sp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_noerr_generalized_c ( complex(sp), dimension(:,:), intent(in), target a,
complex(sp), dimension(:,:), intent(inout), target b )
Parameters
[in]aInput matrix A[m,n]
[in,out]bGeneralized problem matrix B[n,n]
Returns
Array of eigenvalues

◆ la_eigvals_noerr_generalized_d()

complex(dp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_noerr_generalized_d ( real(dp), dimension(:,:), intent(in), target a,
real(dp), dimension(:,:), intent(inout), target b )
Parameters
[in]aInput matrix A[m,n]
[in,out]bGeneralized problem matrix B[n,n]
Returns
Array of eigenvalues

◆ la_eigvals_noerr_generalized_q()

complex(qp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_noerr_generalized_q ( real(qp), dimension(:,:), intent(in), target a,
real(qp), dimension(:,:), intent(inout), target b )
Parameters
[in]aInput matrix A[m,n]
[in,out]bGeneralized problem matrix B[n,n]
Returns
Array of eigenvalues

◆ la_eigvals_noerr_generalized_s()

complex(sp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_noerr_generalized_s ( real(sp), dimension(:,:), intent(in), target a,
real(sp), dimension(:,:), intent(inout), target b )
Parameters
[in]aInput matrix A[m,n]
[in,out]bGeneralized problem matrix B[n,n]
Returns
Array of eigenvalues

◆ la_eigvals_noerr_generalized_w()

complex(qp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_noerr_generalized_w ( complex(qp), dimension(:,:), intent(in), target a,
complex(qp), dimension(:,:), intent(inout), target b )
Parameters
[in]aInput matrix A[m,n]
[in,out]bGeneralized problem matrix B[n,n]
Returns
Array of eigenvalues

◆ la_eigvals_noerr_generalized_z()

complex(dp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_noerr_generalized_z ( complex(dp), dimension(:,:), intent(in), target a,
complex(dp), dimension(:,:), intent(inout), target b )
Parameters
[in]aInput matrix A[m,n]
[in,out]bGeneralized problem matrix B[n,n]
Returns
Array of eigenvalues

◆ la_eigvals_noerr_standard_c()

complex(sp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_noerr_standard_c ( complex(sp), dimension(:,:), intent(in), target a)
Parameters
[in]aInput matrix A[m,n]
Returns
Array of eigenvalues

◆ la_eigvals_noerr_standard_d()

complex(dp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_noerr_standard_d ( real(dp), dimension(:,:), intent(in), target a)
Parameters
[in]aInput matrix A[m,n]
Returns
Array of eigenvalues

◆ la_eigvals_noerr_standard_q()

complex(qp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_noerr_standard_q ( real(qp), dimension(:,:), intent(in), target a)
Parameters
[in]aInput matrix A[m,n]
Returns
Array of eigenvalues

◆ la_eigvals_noerr_standard_s()

complex(sp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_noerr_standard_s ( real(sp), dimension(:,:), intent(in), target a)
Parameters
[in]aInput matrix A[m,n]
Returns
Array of eigenvalues

◆ la_eigvals_noerr_standard_w()

complex(qp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_noerr_standard_w ( complex(qp), dimension(:,:), intent(in), target a)
Parameters
[in]aInput matrix A[m,n]
Returns
Array of eigenvalues

◆ la_eigvals_noerr_standard_z()

complex(dp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_noerr_standard_z ( complex(dp), dimension(:,:), intent(in), target a)
Parameters
[in]aInput matrix A[m,n]
Returns
Array of eigenvalues

◆ la_eigvals_standard_c()

complex(sp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_standard_c ( complex(sp), dimension(:,:), intent(in), target a,
type(la_state), intent(out) err )
Parameters
[in]aInput matrix A[m,n]
[out]err[optional] state return flag. On error if not requested, the code will stop
Returns
Array of eigenvalues

◆ la_eigvals_standard_d()

complex(dp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_standard_d ( real(dp), dimension(:,:), intent(in), target a,
type(la_state), intent(out) err )
Parameters
[in]aInput matrix A[m,n]
[out]err[optional] state return flag. On error if not requested, the code will stop
Returns
Array of eigenvalues

◆ la_eigvals_standard_q()

complex(qp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_standard_q ( real(qp), dimension(:,:), intent(in), target a,
type(la_state), intent(out) err )
Parameters
[in]aInput matrix A[m,n]
[out]err[optional] state return flag. On error if not requested, the code will stop
Returns
Array of eigenvalues

◆ la_eigvals_standard_s()

complex(sp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_standard_s ( real(sp), dimension(:,:), intent(in), target a,
type(la_state), intent(out) err )
Parameters
[in]aInput matrix A[m,n]
[out]err[optional] state return flag. On error if not requested, the code will stop
Returns
Array of eigenvalues

◆ la_eigvals_standard_w()

complex(qp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_standard_w ( complex(qp), dimension(:,:), intent(in), target a,
type(la_state), intent(out) err )
Parameters
[in]aInput matrix A[m,n]
[out]err[optional] state return flag. On error if not requested, the code will stop
Returns
Array of eigenvalues

◆ la_eigvals_standard_z()

complex(dp) function, dimension(:), allocatable la_eig::eigvals::la_eigvals_standard_z ( complex(dp), dimension(:,:), intent(in), target a,
type(la_state), intent(out) err )
Parameters
[in]aInput matrix A[m,n]
[out]err[optional] state return flag. On error if not requested, the code will stop
Returns
Array of eigenvalues

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