
Solves the eigendecomposition for square matrix . (Specification)
Subroutine interface for computing eigenvalues and eigenvectors of a square matrix.
This interface provides methods for computing the eigenvalues, and optionally eigenvectors,
of a general square matrix. Supported data types include real and complex, and no assumption is
made on the matrix structure. The user may request either left, right, or both
eigenvectors to be returned. They are returned as columns of a square matrix with the same size as A.
Preallocated space for both eigenvalues lambda and the eigenvector matrices must be user-provided.
Note
The solution is based on LAPACK's general eigenproblem solvers *GEEV.
Note
BLAS/LAPACK backends do not currently support extended precision (xdp).
Eigendecomposition of matrix A returning an array lambda of eigenvalues,
and optionally right or left eigenvectors.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix A[m,n] |
|
| complex(kind=sp), | intent(inout), | target | :: | b(:,:) |
Generalized problem matrix B[n,n] |
|
| complex(kind=sp), | intent(out) | :: | lambda(:) |
Array of eigenvalues |
||
| complex(kind=sp), | intent(out), | optional, | target | :: | right(:,:) |
The columns of RIGHT contain the right eigenvectors of A |
| complex(kind=sp), | intent(out), | optional, | target | :: | left(:,:) |
The columns of LEFT contain the left eigenvectors of A |
| logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
| logical(kind=lk), | intent(in), | optional | :: | overwrite_b |
[optional] Can B data be overwritten and destroyed? (default: no) |
|
| type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Eigendecomposition of matrix A returning an array lambda of eigenvalues,
and optionally right or left eigenvectors.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix A[m,n] |
|
| real(kind=dp), | intent(inout), | target | :: | b(:,:) |
Generalized problem matrix B[n,n] |
|
| complex(kind=dp), | intent(out) | :: | lambda(:) |
Array of eigenvalues |
||
| complex(kind=dp), | intent(out), | optional, | target | :: | right(:,:) |
The columns of RIGHT contain the right eigenvectors of A |
| complex(kind=dp), | intent(out), | optional, | target | :: | left(:,:) |
The columns of LEFT contain the left eigenvectors of A |
| logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
| logical(kind=lk), | intent(in), | optional | :: | overwrite_b |
[optional] Can B data be overwritten and destroyed? (default: no) |
|
| type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Eigendecomposition of matrix A returning an array lambda of eigenvalues,
and optionally right or left eigenvectors.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix A[m,n] |
|
| real(kind=sp), | intent(inout), | target | :: | b(:,:) |
Generalized problem matrix B[n,n] |
|
| complex(kind=sp), | intent(out) | :: | lambda(:) |
Array of eigenvalues |
||
| complex(kind=sp), | intent(out), | optional, | target | :: | right(:,:) |
The columns of RIGHT contain the right eigenvectors of A |
| complex(kind=sp), | intent(out), | optional, | target | :: | left(:,:) |
The columns of LEFT contain the left eigenvectors of A |
| logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
| logical(kind=lk), | intent(in), | optional | :: | overwrite_b |
[optional] Can B data be overwritten and destroyed? (default: no) |
|
| type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Eigendecomposition of matrix A returning an array lambda of eigenvalues,
and optionally right or left eigenvectors.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix A[m,n] |
|
| complex(kind=dp), | intent(inout), | target | :: | b(:,:) |
Generalized problem matrix B[n,n] |
|
| complex(kind=dp), | intent(out) | :: | lambda(:) |
Array of eigenvalues |
||
| complex(kind=dp), | intent(out), | optional, | target | :: | right(:,:) |
The columns of RIGHT contain the right eigenvectors of A |
| complex(kind=dp), | intent(out), | optional, | target | :: | left(:,:) |
The columns of LEFT contain the left eigenvectors of A |
| logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
| logical(kind=lk), | intent(in), | optional | :: | overwrite_b |
[optional] Can B data be overwritten and destroyed? (default: no) |
|
| type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Eigendecomposition of matrix A returning an array lambda of eigenvalues,
and optionally right or left eigenvectors.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix A[m,n] |
|
| complex(kind=sp), | intent(out) | :: | lambda(:) |
Array of eigenvalues |
||
| complex(kind=sp), | intent(out), | optional, | target | :: | right(:,:) |
The columns of RIGHT contain the right eigenvectors of A |
| complex(kind=sp), | intent(out), | optional, | target | :: | left(:,:) |
The columns of LEFT contain the left eigenvectors of A |
| logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
| type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Eigendecomposition of matrix A returning an array lambda of eigenvalues,
and optionally right or left eigenvectors.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix A[m,n] |
|
| complex(kind=dp), | intent(out) | :: | lambda(:) |
Array of eigenvalues |
||
| complex(kind=dp), | intent(out), | optional, | target | :: | right(:,:) |
The columns of RIGHT contain the right eigenvectors of A |
| complex(kind=dp), | intent(out), | optional, | target | :: | left(:,:) |
The columns of LEFT contain the left eigenvectors of A |
| logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
| type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Eigendecomposition of matrix A returning an array lambda of eigenvalues,
and optionally right or left eigenvectors.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix A[m,n] |
|
| complex(kind=sp), | intent(out) | :: | lambda(:) |
Array of eigenvalues |
||
| complex(kind=sp), | intent(out), | optional, | target | :: | right(:,:) |
The columns of RIGHT contain the right eigenvectors of A |
| complex(kind=sp), | intent(out), | optional, | target | :: | left(:,:) |
The columns of LEFT contain the left eigenvectors of A |
| logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
| type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Eigendecomposition of matrix A returning an array lambda of eigenvalues,
and optionally right or left eigenvectors.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix A[m,n] |
|
| complex(kind=dp), | intent(out) | :: | lambda(:) |
Array of eigenvalues |
||
| complex(kind=dp), | intent(out), | optional, | target | :: | right(:,:) |
The columns of RIGHT contain the right eigenvectors of A |
| complex(kind=dp), | intent(out), | optional, | target | :: | left(:,:) |
The columns of LEFT contain the left eigenvectors of A |
| logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
| type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Eigendecomposition of matrix A returning an array lambda of real eigenvalues,
and optionally right or left eigenvectors. Returns an error if the eigenvalues had
non-trivial imaginary parts.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix A[m,n] |
|
| complex(kind=sp), | intent(inout), | target | :: | b(:,:) |
Generalized problem matrix B[n,n] |
|
| real(kind=sp), | intent(out) | :: | lambda(:) |
Array of real eigenvalues |
||
| complex(kind=sp), | intent(out), | optional, | target | :: | right(:,:) |
The columns of RIGHT contain the right eigenvectors of A |
| complex(kind=sp), | intent(out), | optional, | target | :: | left(:,:) |
The columns of LEFT contain the left eigenvectors of A |
| logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
| logical(kind=lk), | intent(in), | optional | :: | overwrite_b |
[optional] Can B data be overwritten and destroyed? (default: no) |
|
| type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Eigendecomposition of matrix A returning an array lambda of real eigenvalues,
and optionally right or left eigenvectors. Returns an error if the eigenvalues had
non-trivial imaginary parts.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix A[m,n] |
|
| real(kind=dp), | intent(inout), | target | :: | b(:,:) |
Generalized problem matrix B[n,n] |
|
| real(kind=dp), | intent(out) | :: | lambda(:) |
Array of real eigenvalues |
||
| complex(kind=dp), | intent(out), | optional, | target | :: | right(:,:) |
The columns of RIGHT contain the right eigenvectors of A |
| complex(kind=dp), | intent(out), | optional, | target | :: | left(:,:) |
The columns of LEFT contain the left eigenvectors of A |
| logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
| logical(kind=lk), | intent(in), | optional | :: | overwrite_b |
[optional] Can B data be overwritten and destroyed? (default: no) |
|
| type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Eigendecomposition of matrix A returning an array lambda of real eigenvalues,
and optionally right or left eigenvectors. Returns an error if the eigenvalues had
non-trivial imaginary parts.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix A[m,n] |
|
| real(kind=sp), | intent(inout), | target | :: | b(:,:) |
Generalized problem matrix B[n,n] |
|
| real(kind=sp), | intent(out) | :: | lambda(:) |
Array of real eigenvalues |
||
| complex(kind=sp), | intent(out), | optional, | target | :: | right(:,:) |
The columns of RIGHT contain the right eigenvectors of A |
| complex(kind=sp), | intent(out), | optional, | target | :: | left(:,:) |
The columns of LEFT contain the left eigenvectors of A |
| logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
| logical(kind=lk), | intent(in), | optional | :: | overwrite_b |
[optional] Can B data be overwritten and destroyed? (default: no) |
|
| type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Eigendecomposition of matrix A returning an array lambda of real eigenvalues,
and optionally right or left eigenvectors. Returns an error if the eigenvalues had
non-trivial imaginary parts.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix A[m,n] |
|
| complex(kind=dp), | intent(inout), | target | :: | b(:,:) |
Generalized problem matrix B[n,n] |
|
| real(kind=dp), | intent(out) | :: | lambda(:) |
Array of real eigenvalues |
||
| complex(kind=dp), | intent(out), | optional, | target | :: | right(:,:) |
The columns of RIGHT contain the right eigenvectors of A |
| complex(kind=dp), | intent(out), | optional, | target | :: | left(:,:) |
The columns of LEFT contain the left eigenvectors of A |
| logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
| logical(kind=lk), | intent(in), | optional | :: | overwrite_b |
[optional] Can B data be overwritten and destroyed? (default: no) |
|
| type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Eigendecomposition of matrix A returning an array lambda of real eigenvalues,
and optionally right or left eigenvectors. Returns an error if the eigenvalues had
non-trivial imaginary parts.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix A[m,n] |
|
| real(kind=sp), | intent(out) | :: | lambda(:) |
Array of real eigenvalues |
||
| complex(kind=sp), | intent(out), | optional, | target | :: | right(:,:) |
The columns of RIGHT contain the right eigenvectors of A |
| complex(kind=sp), | intent(out), | optional, | target | :: | left(:,:) |
The columns of LEFT contain the left eigenvectors of A |
| logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
| type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Eigendecomposition of matrix A returning an array lambda of real eigenvalues,
and optionally right or left eigenvectors. Returns an error if the eigenvalues had
non-trivial imaginary parts.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix A[m,n] |
|
| real(kind=dp), | intent(out) | :: | lambda(:) |
Array of real eigenvalues |
||
| complex(kind=dp), | intent(out), | optional, | target | :: | right(:,:) |
The columns of RIGHT contain the right eigenvectors of A |
| complex(kind=dp), | intent(out), | optional, | target | :: | left(:,:) |
The columns of LEFT contain the left eigenvectors of A |
| logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
| type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Eigendecomposition of matrix A returning an array lambda of real eigenvalues,
and optionally right or left eigenvectors. Returns an error if the eigenvalues had
non-trivial imaginary parts.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix A[m,n] |
|
| real(kind=sp), | intent(out) | :: | lambda(:) |
Array of real eigenvalues |
||
| complex(kind=sp), | intent(out), | optional, | target | :: | right(:,:) |
The columns of RIGHT contain the right eigenvectors of A |
| complex(kind=sp), | intent(out), | optional, | target | :: | left(:,:) |
The columns of LEFT contain the left eigenvectors of A |
| logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
| type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Eigendecomposition of matrix A returning an array lambda of real eigenvalues,
and optionally right or left eigenvectors. Returns an error if the eigenvalues had
non-trivial imaginary parts.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix A[m,n] |
|
| real(kind=dp), | intent(out) | :: | lambda(:) |
Array of real eigenvalues |
||
| complex(kind=dp), | intent(out), | optional, | target | :: | right(:,:) |
The columns of RIGHT contain the right eigenvectors of A |
| complex(kind=dp), | intent(out), | optional, | target | :: | left(:,:) |
The columns of LEFT contain the left eigenvectors of A |
| logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
| type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |