Provides derived-types and associated specialized linear algebra drivers for highly-structured matrices commonly encountered in the discretization of partial differential equations, as well as control and signal processing applications. (Specifications)
This interface provides methods to convert a matrix of one of the
types defined by stdlib_specialmatrices
to a standard rank-2 array.
(Specifications)
Convert a tridiagonal
matrix to its dense representation.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_cdp_type), | intent(in) | :: | A |
Input Tridiagonal matrix. |
Corresponding dense matrix.
Convert a tridiagonal
matrix to its dense representation.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_csp_type), | intent(in) | :: | A |
Input Tridiagonal matrix. |
Corresponding dense matrix.
Convert a tridiagonal
matrix to its dense representation.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_dp_type), | intent(in) | :: | A |
Input Tridiagonal matrix. |
Corresponding dense matrix.
Convert a tridiagonal
matrix to its dense representation.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_sp_type), | intent(in) | :: | A |
Input Tridiagonal matrix. |
Corresponding dense matrix.
This interface provides methods to compute the hermitian operation for
the different matrix types defined by stdlib_specialmatrices
. For
real-valued matrices, this is equivalent to the standard transpose
.
Specifications
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_cdp_type), | intent(in) | :: | A |
Input matrix. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_csp_type), | intent(in) | :: | A |
Input matrix. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_dp_type), | intent(in) | :: | A |
Input matrix. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_sp_type), | intent(in) | :: | A |
Input matrix. |
Overload the *
for scalar-matrix multiplications for the different matrix
types provided by stdlib_specialmatrices
.
Specifications
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_cdp_type), | intent(in) | :: | A | |||
complex(kind=dp), | intent(in) | :: | alpha |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_csp_type), | intent(in) | :: | A | |||
complex(kind=sp), | intent(in) | :: | alpha |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_dp_type), | intent(in) | :: | A | |||
real(kind=dp), | intent(in) | :: | alpha |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_sp_type), | intent(in) | :: | A | |||
real(kind=sp), | intent(in) | :: | alpha |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | alpha | |||
type(tridiagonal_cdp_type), | intent(in) | :: | A |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in) | :: | alpha | |||
type(tridiagonal_csp_type), | intent(in) | :: | A |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | alpha | |||
type(tridiagonal_dp_type), | intent(in) | :: | A |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | alpha | |||
type(tridiagonal_sp_type), | intent(in) | :: | A |
Overload the +
operator for matrix-matrix addition. The two matrices need to
be of the same type and kind.
Specifications
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_cdp_type), | intent(in) | :: | A | |||
type(tridiagonal_cdp_type), | intent(in) | :: | B |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_csp_type), | intent(in) | :: | A | |||
type(tridiagonal_csp_type), | intent(in) | :: | B |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_dp_type), | intent(in) | :: | A | |||
type(tridiagonal_dp_type), | intent(in) | :: | B |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_sp_type), | intent(in) | :: | A | |||
type(tridiagonal_sp_type), | intent(in) | :: | B |
Overload the -
operator for matrix-matrix subtraction. The two matrices need to
be of the same type and kind.
Specifications
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_cdp_type), | intent(in) | :: | A | |||
type(tridiagonal_cdp_type), | intent(in) | :: | B |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_csp_type), | intent(in) | :: | A | |||
type(tridiagonal_csp_type), | intent(in) | :: | B |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_dp_type), | intent(in) | :: | A | |||
type(tridiagonal_dp_type), | intent(in) | :: | B |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_sp_type), | intent(in) | :: | A | |||
type(tridiagonal_sp_type), | intent(in) | :: | B |
(Specifications) This interface provides methods to compute the matrix-vector product
for the different matrix types defined by stdlib_specialmatrices
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_cdp_type), | intent(in) | :: | A | |||
complex(kind=dp), | intent(in), | contiguous, target | :: | x(:) | ||
complex(kind=dp), | intent(inout), | contiguous, target | :: | y(:) | ||
real(kind=dp), | intent(in), | optional | :: | alpha | ||
real(kind=dp), | intent(in), | optional | :: | beta | ||
character(len=1), | intent(in), | optional | :: | op |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_csp_type), | intent(in) | :: | A | |||
complex(kind=sp), | intent(in), | contiguous, target | :: | x(:) | ||
complex(kind=sp), | intent(inout), | contiguous, target | :: | y(:) | ||
real(kind=sp), | intent(in), | optional | :: | alpha | ||
real(kind=sp), | intent(in), | optional | :: | beta | ||
character(len=1), | intent(in), | optional | :: | op |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_dp_type), | intent(in) | :: | A | |||
real(kind=dp), | intent(in), | contiguous, target | :: | x(:) | ||
real(kind=dp), | intent(inout), | contiguous, target | :: | y(:) | ||
real(kind=dp), | intent(in), | optional | :: | alpha | ||
real(kind=dp), | intent(in), | optional | :: | beta | ||
character(len=1), | intent(in), | optional | :: | op |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_sp_type), | intent(in) | :: | A | |||
real(kind=sp), | intent(in), | contiguous, target | :: | x(:) | ||
real(kind=sp), | intent(inout), | contiguous, target | :: | y(:) | ||
real(kind=sp), | intent(in), | optional | :: | alpha | ||
real(kind=sp), | intent(in), | optional | :: | beta | ||
character(len=1), | intent(in), | optional | :: | op |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_cdp_type), | intent(in) | :: | A | |||
complex(kind=dp), | intent(in), | contiguous, target | :: | x(:,:) | ||
complex(kind=dp), | intent(inout), | contiguous, target | :: | y(:,:) | ||
real(kind=dp), | intent(in), | optional | :: | alpha | ||
real(kind=dp), | intent(in), | optional | :: | beta | ||
character(len=1), | intent(in), | optional | :: | op |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_csp_type), | intent(in) | :: | A | |||
complex(kind=sp), | intent(in), | contiguous, target | :: | x(:,:) | ||
complex(kind=sp), | intent(inout), | contiguous, target | :: | y(:,:) | ||
real(kind=sp), | intent(in), | optional | :: | alpha | ||
real(kind=sp), | intent(in), | optional | :: | beta | ||
character(len=1), | intent(in), | optional | :: | op |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_dp_type), | intent(in) | :: | A | |||
real(kind=dp), | intent(in), | contiguous, target | :: | x(:,:) | ||
real(kind=dp), | intent(inout), | contiguous, target | :: | y(:,:) | ||
real(kind=dp), | intent(in), | optional | :: | alpha | ||
real(kind=dp), | intent(in), | optional | :: | beta | ||
character(len=1), | intent(in), | optional | :: | op |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_sp_type), | intent(in) | :: | A | |||
real(kind=sp), | intent(in), | contiguous, target | :: | x(:,:) | ||
real(kind=sp), | intent(inout), | contiguous, target | :: | y(:,:) | ||
real(kind=sp), | intent(in), | optional | :: | alpha | ||
real(kind=sp), | intent(in), | optional | :: | beta | ||
character(len=1), | intent(in), | optional | :: | op |
This interface provides methods to compute the transpose operation for
the different matrix types defined by stdlib_specialmatrices
.
Specifications
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_cdp_type), | intent(in) | :: | A |
Input matrix. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_csp_type), | intent(in) | :: | A |
Input matrix. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_dp_type), | intent(in) | :: | A |
Input matrix. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tridiagonal_sp_type), | intent(in) | :: | A |
Input matrix. |
(Specifications) This
interface provides different methods to construct a tridiagonal
matrix. Only
the non-zero elements of are stored, i.e.
tridiagonal
matrix from rank-1 arrays: integer, parameter :: n
real(dp), allocatable :: dl(:), dv(:), du(:)
type(tridiagonal_rdp_type) :: A
integer :: i
dl = [(i, i=1, n-1)]; dv = [(2*i, i=1, n)]; du = [(3*i, i=1, n)]
A = Tridiagonal(dl, dv, du)
tridiagonal
matrix with constant diagonals: integer, parameter :: n
real(dp), parameter :: a = 1.0_dp, b = 1.0_dp, c = 2.0_dp
type(tridiagonal_rdp_type) :: A
A = Tridiagonal(a, b, c, n)
Construct a tridiagonal
matrix with constant elements.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | dl |
Tridiagonal matrix elements. |
||
complex(kind=dp), | intent(in) | :: | dv |
Tridiagonal matrix elements. |
||
complex(kind=dp), | intent(in) | :: | du |
Tridiagonal matrix elements. |
||
integer(kind=ilp), | intent(in) | :: | n |
Matrix dimension. |
||
type(linalg_state_type), | intent(out) | :: | err |
Error handling. |
Corresponding Tridiagonal matrix.
Construct a tridiagonal
matrix with constant elements.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in) | :: | dl |
Tridiagonal matrix elements. |
||
complex(kind=sp), | intent(in) | :: | dv |
Tridiagonal matrix elements. |
||
complex(kind=sp), | intent(in) | :: | du |
Tridiagonal matrix elements. |
||
integer(kind=ilp), | intent(in) | :: | n |
Matrix dimension. |
||
type(linalg_state_type), | intent(out) | :: | err |
Error handling. |
Corresponding Tridiagonal matrix.
Construct a tridiagonal
matrix with constant elements.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | dl |
Tridiagonal matrix elements. |
||
real(kind=dp), | intent(in) | :: | dv |
Tridiagonal matrix elements. |
||
real(kind=dp), | intent(in) | :: | du |
Tridiagonal matrix elements. |
||
integer(kind=ilp), | intent(in) | :: | n |
Matrix dimension. |
||
type(linalg_state_type), | intent(out) | :: | err |
Error handling. |
Corresponding Tridiagonal matrix.
Construct a tridiagonal
matrix with constant elements.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | dl |
Tridiagonal matrix elements. |
||
real(kind=sp), | intent(in) | :: | dv |
Tridiagonal matrix elements. |
||
real(kind=sp), | intent(in) | :: | du |
Tridiagonal matrix elements. |
||
integer(kind=ilp), | intent(in) | :: | n |
Matrix dimension. |
||
type(linalg_state_type), | intent(out) | :: | err |
Error handling. |
Corresponding Tridiagonal matrix.
Construct a tridiagonal
matrix with constant elements.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | dl |
Tridiagonal matrix elements. |
||
complex(kind=dp), | intent(in) | :: | dv |
Tridiagonal matrix elements. |
||
complex(kind=dp), | intent(in) | :: | du |
Tridiagonal matrix elements. |
||
integer(kind=ilp), | intent(in) | :: | n |
Matrix dimension. |
Corresponding Tridiagonal matrix.
Construct a tridiagonal
matrix with constant elements.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in) | :: | dl |
Tridiagonal matrix elements. |
||
complex(kind=sp), | intent(in) | :: | dv |
Tridiagonal matrix elements. |
||
complex(kind=sp), | intent(in) | :: | du |
Tridiagonal matrix elements. |
||
integer(kind=ilp), | intent(in) | :: | n |
Matrix dimension. |
Corresponding Tridiagonal matrix.
Construct a tridiagonal
matrix with constant elements.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | dl |
Tridiagonal matrix elements. |
||
real(kind=dp), | intent(in) | :: | dv |
Tridiagonal matrix elements. |
||
real(kind=dp), | intent(in) | :: | du |
Tridiagonal matrix elements. |
||
integer(kind=ilp), | intent(in) | :: | n |
Matrix dimension. |
Corresponding Tridiagonal matrix.
Construct a tridiagonal
matrix with constant elements.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | dl |
Tridiagonal matrix elements. |
||
real(kind=sp), | intent(in) | :: | dv |
Tridiagonal matrix elements. |
||
real(kind=sp), | intent(in) | :: | du |
Tridiagonal matrix elements. |
||
integer(kind=ilp), | intent(in) | :: | n |
Matrix dimension. |
Corresponding Tridiagonal matrix.
Construct a tridiagonal
matrix from the rank-1 arrays
dl
, dv
and du
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | dl(:) |
Tridiagonal matrix elements. |
||
complex(kind=dp), | intent(in) | :: | dv(:) |
Tridiagonal matrix elements. |
||
complex(kind=dp), | intent(in) | :: | du(:) |
Tridiagonal matrix elements. |
||
type(linalg_state_type), | intent(out) | :: | err |
Error handling. |
Corresponding Tridiagonal matrix.
Construct a tridiagonal
matrix from the rank-1 arrays
dl
, dv
and du
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in) | :: | dl(:) |
Tridiagonal matrix elements. |
||
complex(kind=sp), | intent(in) | :: | dv(:) |
Tridiagonal matrix elements. |
||
complex(kind=sp), | intent(in) | :: | du(:) |
Tridiagonal matrix elements. |
||
type(linalg_state_type), | intent(out) | :: | err |
Error handling. |
Corresponding Tridiagonal matrix.
Construct a tridiagonal
matrix from the rank-1 arrays
dl
, dv
and du
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | dl(:) |
Tridiagonal matrix elements. |
||
real(kind=dp), | intent(in) | :: | dv(:) |
Tridiagonal matrix elements. |
||
real(kind=dp), | intent(in) | :: | du(:) |
Tridiagonal matrix elements. |
||
type(linalg_state_type), | intent(out) | :: | err |
Error handling. |
Corresponding Tridiagonal matrix.
Construct a tridiagonal
matrix from the rank-1 arrays
dl
, dv
and du
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | dl(:) |
Tridiagonal matrix elements. |
||
real(kind=sp), | intent(in) | :: | dv(:) |
Tridiagonal matrix elements. |
||
real(kind=sp), | intent(in) | :: | du(:) |
Tridiagonal matrix elements. |
||
type(linalg_state_type), | intent(out) | :: | err |
Error handling. |
Corresponding Tridiagonal matrix.
Construct a tridiagonal
matrix from the rank-1 arrays
dl
, dv
and du
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | dl(:) |
Tridiagonal matrix elements. |
||
complex(kind=dp), | intent(in) | :: | dv(:) |
Tridiagonal matrix elements. |
||
complex(kind=dp), | intent(in) | :: | du(:) |
Tridiagonal matrix elements. |
Corresponding Tridiagonal matrix.
Construct a tridiagonal
matrix from the rank-1 arrays
dl
, dv
and du
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(in) | :: | dl(:) |
Tridiagonal matrix elements. |
||
complex(kind=sp), | intent(in) | :: | dv(:) |
Tridiagonal matrix elements. |
||
complex(kind=sp), | intent(in) | :: | du(:) |
Tridiagonal matrix elements. |
Corresponding Tridiagonal matrix.
Construct a tridiagonal
matrix from the rank-1 arrays
dl
, dv
and du
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | dl(:) |
Tridiagonal matrix elements. |
||
real(kind=dp), | intent(in) | :: | dv(:) |
Tridiagonal matrix elements. |
||
real(kind=dp), | intent(in) | :: | du(:) |
Tridiagonal matrix elements. |
Corresponding Tridiagonal matrix.
Construct a tridiagonal
matrix from the rank-1 arrays
dl
, dv
and du
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | dl(:) |
Tridiagonal matrix elements. |
||
real(kind=sp), | intent(in) | :: | dv(:) |
Tridiagonal matrix elements. |
||
real(kind=sp), | intent(in) | :: | du(:) |
Tridiagonal matrix elements. |
Corresponding Tridiagonal matrix.
Base type to define a tridiagonal
matrix.
Base type to define a tridiagonal
matrix.
Base type to define a tridiagonal
matrix.
Base type to define a tridiagonal
matrix.