Matrix exponential: subroutine interface version : experimental
Computes the exponential of a matrix using a rational Pade approximation. (Specification)
This interface provides methods for computing the exponential of a matrix
represented as a standard Fortran rank-2 array. Supported data types include
real
and complex
.
By default, the order of the Pade approximation is set to 10. It can be changed
via the order
argument that must be non-negative.
If the input matrix is non-square or the order of the Pade approximation is negative, the function returns an error state.
real(dp) :: A(3, 3), E(3, 3)
A = reshape([1, 2, 3, 4, 5, 6, 7, 8, 9], [3, 3])
! Default Pade approximation of the matrix exponential.
call matrix_exp(A, E) ! Out-of-place
! call matrix_exp(A) for in-place computation.
! Pade approximation with specified order.
call matrix_exp(A, E, order=12)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in) | :: | A(:,:) |
Input matrix A(n, n) |
||
complex(kind=sp), | intent(out) | :: | E(:,:) |
Output matrix exponential E = exp(A) |
||
integer(kind=ilp), | intent(in), | optional | :: | order |
[optional] Order of the Pade approximation (default |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] Error handling. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(inout) | :: | A(:,:) |
Input matrix A(n, n) / Output matrix E = exp(A) |
||
integer(kind=ilp), | intent(in), | optional | :: | order |
[optional] Order of the Pade approximation (default |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] Error handling. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | A(:,:) |
Input matrix A(n, n) |
||
real(kind=dp), | intent(out) | :: | E(:,:) |
Output matrix exponential E = exp(A) |
||
integer(kind=ilp), | intent(in), | optional | :: | order |
[optional] Order of the Pade approximation (default |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] Error handling. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout) | :: | A(:,:) |
Input matrix A(n, n) / Output matrix E = exp(A) |
||
integer(kind=ilp), | intent(in), | optional | :: | order |
[optional] Order of the Pade approximation (default |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] Error handling. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | A(:,:) |
Input matrix A(n, n) |
||
real(kind=sp), | intent(out) | :: | E(:,:) |
Output matrix exponential E = exp(A) |
||
integer(kind=ilp), | intent(in), | optional | :: | order |
[optional] Order of the Pade approximation (default |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] Error handling. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(inout) | :: | A(:,:) |
Input matrix A(n, n) / Output matrix E = exp(A) |
||
integer(kind=ilp), | intent(in), | optional | :: | order |
[optional] Order of the Pade approximation (default |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] Error handling. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | A(:,:) |
Input matrix A(n, n) |
||
complex(kind=dp), | intent(out) | :: | E(:,:) |
Output matrix exponential E = exp(A) |
||
integer(kind=ilp), | intent(in), | optional | :: | order |
[optional] Order of the Pade approximation (default |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] Error handling. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(inout) | :: | A(:,:) |
Input matrix A(n, n) / Output matrix E = exp(A) |
||
integer(kind=ilp), | intent(in), | optional | :: | order |
[optional] Order of the Pade approximation (default |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] Error handling. |