Provides a support for various linear algebra procedures (Specification)
Computes the cross product of two vectors, returning a rank-1 and size-3 array (Specification)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | a(3) | |||
complex(kind=dp), | intent(in) | :: | b(3) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in) | :: | a(3) | |||
complex(kind=sp), | intent(in) | :: | b(3) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int16), | intent(in) | :: | a(3) | |||
integer(kind=int16), | intent(in) | :: | b(3) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | a(3) | |||
integer(kind=int32), | intent(in) | :: | b(3) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | a(3) | |||
integer(kind=int64), | intent(in) | :: | b(3) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int8), | intent(in) | :: | a(3) | |||
integer(kind=int8), | intent(in) | :: | b(3) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | a(3) | |||
real(kind=dp), | intent(in) | :: | b(3) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | a(3) | |||
real(kind=sp), | intent(in) | :: | b(3) |
Computes the determinant of a square matrix (Specification)
Interface for computing matrix determinant.
This interface provides methods for computing the determinant of a matrix.
Supported data types include real
and complex
.
Note
The provided functions are intended for square matrices only.
Note
BLAS/LAPACK backends do not currently support extended precision (xdp
).
real(sp) :: a(3,3), d
type(linalg_state_type) :: state
a = reshape([1, 2, 3, 4, 5, 6, 7, 8, 9], [3, 3])
! ...
d = det(a,err=state)
if (state%ok()) then
print *, 'Success! det=',d
else
print *, state%print()
endif
! ...
Creates a diagonal array or extract the diagonal elements of an array (Specification)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | v(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | v(:) | |||
integer, | intent(in) | :: | k |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | A(:,:) | |||
integer, | intent(in) | :: | k |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in) | :: | v(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in) | :: | v(:) | |||
integer, | intent(in) | :: | k |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in) | :: | A(:,:) | |||
integer, | intent(in) | :: | k |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int16), | intent(in) | :: | v(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int16), | intent(in) | :: | v(:) | |||
integer, | intent(in) | :: | k |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int16), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int16), | intent(in) | :: | A(:,:) | |||
integer, | intent(in) | :: | k |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | v(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | v(:) | |||
integer, | intent(in) | :: | k |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:,:) | |||
integer, | intent(in) | :: | k |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | v(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | v(:) | |||
integer, | intent(in) | :: | k |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:,:) | |||
integer, | intent(in) | :: | k |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int8), | intent(in) | :: | v(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int8), | intent(in) | :: | v(:) | |||
integer, | intent(in) | :: | k |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int8), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int8), | intent(in) | :: | A(:,:) | |||
integer, | intent(in) | :: | k |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | v(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | v(:) | |||
integer, | intent(in) | :: | k |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | A(:,:) | |||
integer, | intent(in) | :: | k |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | v(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | v(:) | |||
integer, | intent(in) | :: | k |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | A(:,:) | |||
integer, | intent(in) | :: | k |
Checks if a matrix (rank-2 array) is diagonal (Specification)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int8), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int16), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:,:) |
Checks if a matrix (rank-2 array) is Hermitian (Specification)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int8), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int16), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:,:) |
Checks if a matrix (rank-2 array) is Hessenberg (Specification)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | A(:,:) | |||
character(len=1), | intent(in) | :: | uplo |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | A(:,:) | |||
character(len=1), | intent(in) | :: | uplo |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in) | :: | A(:,:) | |||
character(len=1), | intent(in) | :: | uplo |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | A(:,:) | |||
character(len=1), | intent(in) | :: | uplo |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int8), | intent(in) | :: | A(:,:) | |||
character(len=1), | intent(in) | :: | uplo |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int16), | intent(in) | :: | A(:,:) | |||
character(len=1), | intent(in) | :: | uplo |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:,:) | |||
character(len=1), | intent(in) | :: | uplo |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:,:) | |||
character(len=1), | intent(in) | :: | uplo |
Checks if a matrix (rank-2 array) is skew-symmetric (Specification)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int8), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int16), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:,:) |
Checks if a matrix (rank-2 array) is square (Specification)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int8), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int16), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:,:) |
Checks if a matrix (rank-2 array) is symmetric (Specification)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int8), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int16), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:,:) |
Checks if a matrix (rank-2 array) is triangular (Specification)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | A(:,:) | |||
character(len=1), | intent(in) | :: | uplo |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | A(:,:) | |||
character(len=1), | intent(in) | :: | uplo |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in) | :: | A(:,:) | |||
character(len=1), | intent(in) | :: | uplo |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | A(:,:) | |||
character(len=1), | intent(in) | :: | uplo |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int8), | intent(in) | :: | A(:,:) | |||
character(len=1), | intent(in) | :: | uplo |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int16), | intent(in) | :: | A(:,:) | |||
character(len=1), | intent(in) | :: | uplo |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:,:) | |||
character(len=1), | intent(in) | :: | uplo |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:,:) | |||
character(len=1), | intent(in) | :: | uplo |
Computes the Kronecker product of two arrays of size M1xN1, and of M2xN2, returning an (M1M2)x(N1N2) array (Specification)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | A(:,:) | |||
complex(kind=dp), | intent(in) | :: | B(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in) | :: | A(:,:) | |||
complex(kind=sp), | intent(in) | :: | B(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int16), | intent(in) | :: | A(:,:) | |||
integer(kind=int16), | intent(in) | :: | B(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:,:) | |||
integer(kind=int32), | intent(in) | :: | B(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:,:) | |||
integer(kind=int64), | intent(in) | :: | B(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int8), | intent(in) | :: | A(:,:) | |||
integer(kind=int8), | intent(in) | :: | B(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | A(:,:) | |||
real(kind=dp), | intent(in) | :: | B(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | A(:,:) | |||
real(kind=sp), | intent(in) | :: | B(:,:) |
Computes the squares solution to system . (Specification)
Interface for computing least squares, i.e. the 2-norm minimizing solution.
This interface provides methods for computing the least squares of a linear matrix system.
Supported data types include real
and complex
.
Note
The solution is based on LAPACK's singular value decomposition *GELSD
methods.
Note
BLAS/LAPACK backends do not currently support extended precision (xdp
).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
complex(kind=sp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
real(kind=sp), | intent(in), | optional | :: | cond |
[optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
|
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A,b data be overwritten and destroyed? |
|
integer(kind=ilp), | intent(out), | optional | :: | rank |
[optional] Return rank of A |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Result array/matrix x[n] or x[n,nrhs]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
complex(kind=sp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
real(kind=sp), | intent(in), | optional | :: | cond |
[optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
|
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A,b data be overwritten and destroyed? |
|
integer(kind=ilp), | intent(out), | optional | :: | rank |
[optional] Return rank of A |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Result array/matrix x[n] or x[n,nrhs]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
real(kind=dp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
real(kind=dp), | intent(in), | optional | :: | cond |
[optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
|
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A,b data be overwritten and destroyed? |
|
integer(kind=ilp), | intent(out), | optional | :: | rank |
[optional] Return rank of A |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Result array/matrix x[n] or x[n,nrhs]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
real(kind=dp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
real(kind=dp), | intent(in), | optional | :: | cond |
[optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
|
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A,b data be overwritten and destroyed? |
|
integer(kind=ilp), | intent(out), | optional | :: | rank |
[optional] Return rank of A |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Result array/matrix x[n] or x[n,nrhs]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
real(kind=sp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
real(kind=sp), | intent(in), | optional | :: | cond |
[optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
|
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A,b data be overwritten and destroyed? |
|
integer(kind=ilp), | intent(out), | optional | :: | rank |
[optional] Return rank of A |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Result array/matrix x[n] or x[n,nrhs]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
real(kind=sp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
real(kind=sp), | intent(in), | optional | :: | cond |
[optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
|
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A,b data be overwritten and destroyed? |
|
integer(kind=ilp), | intent(out), | optional | :: | rank |
[optional] Return rank of A |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Result array/matrix x[n] or x[n,nrhs]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
complex(kind=dp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
real(kind=dp), | intent(in), | optional | :: | cond |
[optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
|
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A,b data be overwritten and destroyed? |
|
integer(kind=ilp), | intent(out), | optional | :: | rank |
[optional] Return rank of A |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Result array/matrix x[n] or x[n,nrhs]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
complex(kind=dp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
real(kind=dp), | intent(in), | optional | :: | cond |
[optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
|
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A,b data be overwritten and destroyed? |
|
integer(kind=ilp), | intent(out), | optional | :: | rank |
[optional] Return rank of A |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Result array/matrix x[n] or x[n,nrhs]
Computes the integer, real [, complex] working space required by the least-squares solver (Specification)
This interface provides sizes of integer, real [, complex] working spaces required by the least-squares solver. These sizes can be used to pre-allocated working arrays in case several repeated least-squares solutions to a same system are sought. If pre-allocated working arrays are provided, no internal allocations will take place.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in), | target | :: | a(:,:) |
Input matrix a[m,n] |
|
complex(kind=sp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
integer(kind=ilp), | intent(out) | :: | lrwork |
Size of the working space arrays |
||
integer(kind=ilp), | intent(out) | :: | liwork |
Size of the working space arrays |
||
integer(kind=ilp), | intent(out) | :: | lcwork |
Size of the working space arrays |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in), | target | :: | a(:,:) |
Input matrix a[m,n] |
|
complex(kind=sp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
integer(kind=ilp), | intent(out) | :: | lrwork |
Size of the working space arrays |
||
integer(kind=ilp), | intent(out) | :: | liwork |
Size of the working space arrays |
||
integer(kind=ilp), | intent(out) | :: | lcwork |
Size of the working space arrays |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in), | target | :: | a(:,:) |
Input matrix a[m,n] |
|
real(kind=dp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
integer(kind=ilp), | intent(out) | :: | lrwork |
Size of the working space arrays |
||
integer(kind=ilp), | intent(out) | :: | liwork |
Size of the working space arrays |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in), | target | :: | a(:,:) |
Input matrix a[m,n] |
|
real(kind=dp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
integer(kind=ilp), | intent(out) | :: | lrwork |
Size of the working space arrays |
||
integer(kind=ilp), | intent(out) | :: | liwork |
Size of the working space arrays |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in), | target | :: | a(:,:) |
Input matrix a[m,n] |
|
real(kind=sp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
integer(kind=ilp), | intent(out) | :: | lrwork |
Size of the working space arrays |
||
integer(kind=ilp), | intent(out) | :: | liwork |
Size of the working space arrays |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in), | target | :: | a(:,:) |
Input matrix a[m,n] |
|
real(kind=sp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
integer(kind=ilp), | intent(out) | :: | lrwork |
Size of the working space arrays |
||
integer(kind=ilp), | intent(out) | :: | liwork |
Size of the working space arrays |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in), | target | :: | a(:,:) |
Input matrix a[m,n] |
|
complex(kind=dp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
integer(kind=ilp), | intent(out) | :: | lrwork |
Size of the working space arrays |
||
integer(kind=ilp), | intent(out) | :: | liwork |
Size of the working space arrays |
||
integer(kind=ilp), | intent(out) | :: | lcwork |
Size of the working space arrays |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in), | target | :: | a(:,:) |
Input matrix a[m,n] |
|
complex(kind=dp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
integer(kind=ilp), | intent(out) | :: | lrwork |
Size of the working space arrays |
||
integer(kind=ilp), | intent(out) | :: | liwork |
Size of the working space arrays |
||
integer(kind=ilp), | intent(out) | :: | lcwork |
Size of the working space arrays |
Determinant operator of a square matrix (Specification)
Pure operator interface for computing matrix determinant.
This pure operator interface provides a convenient way to compute the determinant of a matrix. Supported data types include real and complex.
Note
The provided functions are intended for square matrices.
Note
BLAS/LAPACK backends do not currently support extended precision (xdp
).
! ...
real(sp) :: matrix(3,3), d
matrix = reshape([1, 2, 3, 4, 5, 6, 7, 8, 9], [3, 3])
d = .det.matrix
! ...
Computes the outer product of two vectors, returning a rank-2 array (Specification)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | u(:) | |||
complex(kind=dp), | intent(in) | :: | v(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in) | :: | u(:) | |||
complex(kind=sp), | intent(in) | :: | v(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int16), | intent(in) | :: | u(:) | |||
integer(kind=int16), | intent(in) | :: | v(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | u(:) | |||
integer(kind=int32), | intent(in) | :: | v(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | u(:) | |||
integer(kind=int64), | intent(in) | :: | v(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int8), | intent(in) | :: | u(:) | |||
integer(kind=int8), | intent(in) | :: | v(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | u(:) | |||
real(kind=dp), | intent(in) | :: | v(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | u(:) | |||
real(kind=sp), | intent(in) | :: | v(:) |
Solves the linear system for the unknown vector from a square matrix . (Specification)
Interface for solving a linear system arising from a general matrix.
This interface provides methods for computing the solution of a linear matrix system.
Supported data types include real
and complex
. No assumption is made on the matrix
structure.
The function can solve simultaneously either one (from a 1-d right-hand-side vector b(:)
)
or several (from a 2-d right-hand-side vector b(:,:)
) systems.
Note
The solution is based on LAPACK's generic LU decomposition based solvers *GESV
.
Note
BLAS/LAPACK backends do not currently support extended precision (xdp
).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in) | :: | a(:,:) |
Input matrix a[n,n] |
||
complex(kind=sp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
Result array/matrix x[n] or x[n,nrhs]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in) | :: | a(:,:) |
Input matrix a[n,n] |
||
complex(kind=sp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
Result array/matrix x[n] or x[n,nrhs]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
complex(kind=sp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
type(linalg_state_type), | intent(out) | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Result array/matrix x[n] or x[n,nrhs]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
complex(kind=sp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
type(linalg_state_type), | intent(out) | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Result array/matrix x[n] or x[n,nrhs]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | a(:,:) |
Input matrix a[n,n] |
||
real(kind=dp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
Result array/matrix x[n] or x[n,nrhs]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | a(:,:) |
Input matrix a[n,n] |
||
real(kind=dp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
Result array/matrix x[n] or x[n,nrhs]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
real(kind=dp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
type(linalg_state_type), | intent(out) | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Result array/matrix x[n] or x[n,nrhs]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
real(kind=dp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
type(linalg_state_type), | intent(out) | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Result array/matrix x[n] or x[n,nrhs]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | a(:,:) |
Input matrix a[n,n] |
||
real(kind=sp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
Result array/matrix x[n] or x[n,nrhs]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | a(:,:) |
Input matrix a[n,n] |
||
real(kind=sp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
Result array/matrix x[n] or x[n,nrhs]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
real(kind=sp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
type(linalg_state_type), | intent(out) | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Result array/matrix x[n] or x[n,nrhs]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
real(kind=sp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
type(linalg_state_type), | intent(out) | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Result array/matrix x[n] or x[n,nrhs]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | a(:,:) |
Input matrix a[n,n] |
||
complex(kind=dp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
Result array/matrix x[n] or x[n,nrhs]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | a(:,:) |
Input matrix a[n,n] |
||
complex(kind=dp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
Result array/matrix x[n] or x[n,nrhs]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
complex(kind=dp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
type(linalg_state_type), | intent(out) | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Result array/matrix x[n] or x[n,nrhs]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
complex(kind=dp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A data be overwritten and destroyed? |
|
type(linalg_state_type), | intent(out) | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Result array/matrix x[n] or x[n,nrhs]
Computes the squares solution to system . (Specification)
Subroutine interface for computing least squares, i.e. the 2-norm minimizing solution.
This interface provides methods for computing the least squares of a linear matrix system using
a subroutine. Supported data types include real
and complex
. If pre-allocated work spaces
are provided, no internal memory allocations take place when using this interface.
Note
The solution is based on LAPACK's singular value decomposition *GELSD
methods.
Note
BLAS/LAPACK backends do not currently support extended precision (xdp
).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
complex(kind=sp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
complex(kind=sp), | intent(inout), | contiguous, target | :: | x(:,:) |
Result array/matrix x[n] or x[n,nrhs] |
|
real(kind=sp), | intent(inout), | optional, | target | :: | real_storage(:) |
[optional] real working storage space |
integer(kind=ilp), | intent(inout), | optional, | target | :: | int_storage(:) |
[optional] integer working storage space |
complex(kind=sp), | intent(inout), | optional, | target | :: | cmpl_storage(:) |
[optional] complex working storage space |
real(kind=sp), | intent(in), | optional | :: | cond |
[optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
|
real(kind=sp), | intent(out), | optional, | target | :: | singvals(:) |
[optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD |
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A,b data be overwritten and destroyed? |
|
integer(kind=ilp), | intent(out), | optional | :: | rank |
[optional] Return rank of A |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
complex(kind=sp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
complex(kind=sp), | intent(inout), | contiguous, target | :: | x(:) |
Result array/matrix x[n] or x[n,nrhs] |
|
real(kind=sp), | intent(inout), | optional, | target | :: | real_storage(:) |
[optional] real working storage space |
integer(kind=ilp), | intent(inout), | optional, | target | :: | int_storage(:) |
[optional] integer working storage space |
complex(kind=sp), | intent(inout), | optional, | target | :: | cmpl_storage(:) |
[optional] complex working storage space |
real(kind=sp), | intent(in), | optional | :: | cond |
[optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
|
real(kind=sp), | intent(out), | optional, | target | :: | singvals(:) |
[optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD |
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A,b data be overwritten and destroyed? |
|
integer(kind=ilp), | intent(out), | optional | :: | rank |
[optional] Return rank of A |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
real(kind=dp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
real(kind=dp), | intent(inout), | contiguous, target | :: | x(:,:) |
Result array/matrix x[n] or x[n,nrhs] |
|
real(kind=dp), | intent(inout), | optional, | target | :: | real_storage(:) |
[optional] real working storage space |
integer(kind=ilp), | intent(inout), | optional, | target | :: | int_storage(:) |
[optional] integer working storage space |
real(kind=dp), | intent(in), | optional | :: | cond |
[optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
|
real(kind=dp), | intent(out), | optional, | target | :: | singvals(:) |
[optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD |
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A,b data be overwritten and destroyed? |
|
integer(kind=ilp), | intent(out), | optional | :: | rank |
[optional] Return rank of A |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
real(kind=dp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
real(kind=dp), | intent(inout), | contiguous, target | :: | x(:) |
Result array/matrix x[n] or x[n,nrhs] |
|
real(kind=dp), | intent(inout), | optional, | target | :: | real_storage(:) |
[optional] real working storage space |
integer(kind=ilp), | intent(inout), | optional, | target | :: | int_storage(:) |
[optional] integer working storage space |
real(kind=dp), | intent(in), | optional | :: | cond |
[optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
|
real(kind=dp), | intent(out), | optional, | target | :: | singvals(:) |
[optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD |
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A,b data be overwritten and destroyed? |
|
integer(kind=ilp), | intent(out), | optional | :: | rank |
[optional] Return rank of A |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
real(kind=sp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
real(kind=sp), | intent(inout), | contiguous, target | :: | x(:,:) |
Result array/matrix x[n] or x[n,nrhs] |
|
real(kind=sp), | intent(inout), | optional, | target | :: | real_storage(:) |
[optional] real working storage space |
integer(kind=ilp), | intent(inout), | optional, | target | :: | int_storage(:) |
[optional] integer working storage space |
real(kind=sp), | intent(in), | optional | :: | cond |
[optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
|
real(kind=sp), | intent(out), | optional, | target | :: | singvals(:) |
[optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD |
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A,b data be overwritten and destroyed? |
|
integer(kind=ilp), | intent(out), | optional | :: | rank |
[optional] Return rank of A |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
real(kind=sp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
real(kind=sp), | intent(inout), | contiguous, target | :: | x(:) |
Result array/matrix x[n] or x[n,nrhs] |
|
real(kind=sp), | intent(inout), | optional, | target | :: | real_storage(:) |
[optional] real working storage space |
integer(kind=ilp), | intent(inout), | optional, | target | :: | int_storage(:) |
[optional] integer working storage space |
real(kind=sp), | intent(in), | optional | :: | cond |
[optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
|
real(kind=sp), | intent(out), | optional, | target | :: | singvals(:) |
[optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD |
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A,b data be overwritten and destroyed? |
|
integer(kind=ilp), | intent(out), | optional | :: | rank |
[optional] Return rank of A |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
complex(kind=dp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
complex(kind=dp), | intent(inout), | contiguous, target | :: | x(:,:) |
Result array/matrix x[n] or x[n,nrhs] |
|
real(kind=dp), | intent(inout), | optional, | target | :: | real_storage(:) |
[optional] real working storage space |
integer(kind=ilp), | intent(inout), | optional, | target | :: | int_storage(:) |
[optional] integer working storage space |
complex(kind=dp), | intent(inout), | optional, | target | :: | cmpl_storage(:) |
[optional] complex working storage space |
real(kind=dp), | intent(in), | optional | :: | cond |
[optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
|
real(kind=dp), | intent(out), | optional, | target | :: | singvals(:) |
[optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD |
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A,b data be overwritten and destroyed? |
|
integer(kind=ilp), | intent(out), | optional | :: | rank |
[optional] Return rank of A |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
complex(kind=dp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
complex(kind=dp), | intent(inout), | contiguous, target | :: | x(:) |
Result array/matrix x[n] or x[n,nrhs] |
|
real(kind=dp), | intent(inout), | optional, | target | :: | real_storage(:) |
[optional] real working storage space |
integer(kind=ilp), | intent(inout), | optional, | target | :: | int_storage(:) |
[optional] integer working storage space |
complex(kind=dp), | intent(inout), | optional, | target | :: | cmpl_storage(:) |
[optional] complex working storage space |
real(kind=dp), | intent(in), | optional | :: | cond |
[optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
|
real(kind=dp), | intent(out), | optional, | target | :: | singvals(:) |
[optional] list of singular values [min(m,n)], in descending magnitude order, returned by the SVD |
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[optional] Can A,b data be overwritten and destroyed? |
|
integer(kind=ilp), | intent(out), | optional | :: | rank |
[optional] Return rank of A |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[optional] state return flag. On error if not requested, the code will stop |
Solves the linear system for the unknown vector from a square matrix . (Specification)
Subroutine interface for solving a linear system using LU decomposition.
This interface provides methods for computing the solution of a linear matrix system using
a subroutine. Supported data types include real
and complex
. No assumption is made on the matrix
structure. Preallocated space for the solution vector x
is user-provided, and it may be provided
for the array of pivot indices, pivot
. If all pre-allocated work spaces are provided, no internal
memory allocations take place when using this interface.
The function can solve simultaneously either one (from a 1-d right-hand-side vector b(:)
)
or several (from a 2-d right-hand-side vector b(:,:)
) systems.
Note
The solution is based on LAPACK's generic LU decomposition based solvers *GESV
.
Note
BLAS/LAPACK backends do not currently support extended precision (xdp
).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
complex(kind=sp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
complex(kind=sp), | intent(inout), | contiguous, target | :: | x(:,:) |
Result array/matrix x[n] or x[n,nrhs] |
|
integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) |
[optional] Storage array for the diagonal pivot indices |
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 |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
complex(kind=sp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
complex(kind=sp), | intent(inout), | contiguous, target | :: | x(:) |
Result array/matrix x[n] or x[n,nrhs] |
|
integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) |
[optional] Storage array for the diagonal pivot indices |
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 |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
real(kind=dp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
real(kind=dp), | intent(inout), | contiguous, target | :: | x(:,:) |
Result array/matrix x[n] or x[n,nrhs] |
|
integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) |
[optional] Storage array for the diagonal pivot indices |
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 |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
real(kind=dp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
real(kind=dp), | intent(inout), | contiguous, target | :: | x(:) |
Result array/matrix x[n] or x[n,nrhs] |
|
integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) |
[optional] Storage array for the diagonal pivot indices |
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 |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
real(kind=sp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
real(kind=sp), | intent(inout), | contiguous, target | :: | x(:,:) |
Result array/matrix x[n] or x[n,nrhs] |
|
integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) |
[optional] Storage array for the diagonal pivot indices |
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 |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
real(kind=sp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
real(kind=sp), | intent(inout), | contiguous, target | :: | x(:) |
Result array/matrix x[n] or x[n,nrhs] |
|
integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) |
[optional] Storage array for the diagonal pivot indices |
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 |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
complex(kind=dp), | intent(in) | :: | b(:,:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
complex(kind=dp), | intent(inout), | contiguous, target | :: | x(:,:) |
Result array/matrix x[n] or x[n,nrhs] |
|
integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) |
[optional] Storage array for the diagonal pivot indices |
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 |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(inout), | target | :: | a(:,:) |
Input matrix a[n,n] |
|
complex(kind=dp), | intent(in) | :: | b(:) |
Right hand side vector or array, b[n] or b[n,nrhs] |
||
complex(kind=dp), | intent(inout), | contiguous, target | :: | x(:) |
Result array/matrix x[n] or x[n,nrhs] |
|
integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) |
[optional] Storage array for the diagonal pivot indices |
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 |
Computes the trace of a matrix (Specification)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int8), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int16), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | A(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | A(:,:) |
Constructs the identity matrix. (Specification)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | dim1 | |||
integer, | intent(in), | optional | :: | dim2 |