This interface overloads the svd interface from stdlib_linalg
to compute the the singular value decomposition of a Diagonal
matrix .
call svd(A, s [, u] [, vt])
A : Matrix of Diagonal type.
It is an intent(in) argument.
s : Rank-1 real array returning the singular values
of A. It is an intent(out) argument.
u (optional) : Rank-2 array of the same kind as A returning
the left singular vectors of A as columns. Its
size should be [n, n]. It is an intent(out)
argument.
vt (optional) : Rank-2 array of the same kind as A returning
the right singular vectors of A as rows. Its
size should be [n, n]. It is an intent(out)
argument.
Compute the singular value decomposition of a Diagonal matrix.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(Diagonal), | intent(in) | :: | A |
Input matrix. |
||
| real(kind=dp), | intent(out), | optional, | allocatable | :: | u(:,:) |
Left singular vectors as columns. |
| real(kind=dp), | intent(out), | allocatable | :: | s(:) |
Singular values in descending order. |
|
| real(kind=dp), | intent(out), | optional, | allocatable | :: | vt(:,:) |
Right singular vectors as rows. |