NAG Library Routine Document
F08YEF (DTGSJA)
1 Purpose
F08YEF (DTGSJA) computes the generalized singular value decomposition (GSVD) of two real upper trapezoidal matrices and , where is an by matrix and is a by matrix.
and
are assumed to be in the form returned by
F08VEF (DGGSVP).
2 Specification
SUBROUTINE F08YEF ( |
JOBU, JOBV, JOBQ, M, P, N, K, L, A, LDA, B, LDB, TOLA, TOLB, ALPHA, BETA, U, LDU, V, LDV, Q, LDQ, WORK, NCYCLE, INFO) |
INTEGER |
M, P, N, K, L, LDA, LDB, LDU, LDV, LDQ, NCYCLE, INFO |
REAL (KIND=nag_wp) |
A(LDA,*), B(LDB,*), TOLA, TOLB, ALPHA(N), BETA(N), U(LDU,*), V(LDV,*), Q(LDQ,*), WORK(2*N) |
CHARACTER(1) |
JOBU, JOBV, JOBQ |
|
The routine may be called by its
LAPACK
name dtgsja.
3 Description
F08YEF (DTGSJA) computes the GSVD of the matrices
and
which are assumed to have the form as returned by
F08VEF (DGGSVP)
where the
by
matrix
and the
by
matrix
are nonsingular upper triangular,
is
by
upper triangular if
and is
by
upper trapezoidal otherwise.
F08YEF (DTGSJA) computes orthogonal matrices
,
and
, diagonal matrices
and
, and an upper triangular matrix
such that
Optionally , and may or may not be computed, or they may be premultiplied by matrices , and respectively.
If
then
,
and
have the form
where
.
If
then
,
and
have the form
where
.
In both cases the diagonal matrix
has non-negative diagonal elements, the diagonal matrix
has positive diagonal elements, so that
is nonsingular, and
. See Section 2.3.5.3 of
Anderson et al. (1999) for further information.
4 References
Anderson E, Bai Z, Bischof C, Blackford S, Demmel J, Dongarra J J, Du Croz J J, Greenbaum A, Hammarling S, McKenney A and Sorensen D (1999)
LAPACK Users' Guide (3rd Edition) SIAM, Philadelphia
http://www.netlib.org/lapack/lug
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
5 Parameters
- 1: JOBU – CHARACTER(1)Input
On entry: if
,
U must contain an orthogonal matrix
on entry, and the product
is returned.
If
,
U is initialized to the unit matrix, and the orthogonal matrix
is returned.
If , is not computed.
Constraint:
, or .
- 2: JOBV – CHARACTER(1)Input
On entry: if
,
V must contain an orthogonal matrix
on entry, and the product
is returned.
If
,
V is initialized to the unit matrix, and the orthogonal matrix
is returned.
If , is not computed.
Constraint:
, or .
- 3: JOBQ – CHARACTER(1)Input
On entry: if
,
Q must contain an orthogonal matrix
on entry, and the product
is returned.
If
,
Q is initialized to the unit matrix, and the orthogonal matrix
is returned.
If , is not computed.
Constraint:
, or .
- 4: M – INTEGERInput
On entry: , the number of rows of the matrix .
Constraint:
.
- 5: P – INTEGERInput
On entry: , the number of rows of the matrix .
Constraint:
.
- 6: N – INTEGERInput
On entry: , the number of columns of the matrices and .
Constraint:
.
- 7: K – INTEGERInput
- 8: L – INTEGERInput
On entry:
K and
L specify the sizes,
and
, of the subblocks of
and
, whose GSVD is to be computed by F08YEF (DTGSJA).
- 9: A(LDA,) – REAL (KIND=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
A
must be at least
.
On entry: the by matrix .
On exit: if
,
contains the
by
upper triangular matrix
.
If , contains the first rows of the by upper triangular matrix , and the submatrix is returned in .
- 10: LDA – INTEGERInput
On entry: the first dimension of the array
A as declared in the (sub)program from which F08YEF (DTGSJA) is called.
Constraint:
.
- 11: B(LDB,) – REAL (KIND=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
B
must be at least
.
On entry: the by matrix .
On exit: if , contains the submatrix of .
- 12: LDB – INTEGERInput
On entry: the first dimension of the array
B as declared in the (sub)program from which F08YEF (DTGSJA) is called.
Constraint:
.
- 13: TOLA – REAL (KIND=nag_wp)Input
- 14: TOLB – REAL (KIND=nag_wp)Input
On entry:
TOLA and
TOLB are the convergence criteria for the Jacobi–Kogbetliantz iteration procedure. Generally, they should be the same as used in the preprocessing step performed by
F08VSF (ZGGSVP), say
where
is the
machine precision.
- 15: ALPHA(N) – REAL (KIND=nag_wp) arrayOutput
On exit: see the description of
BETA.
- 16: BETA(N) – REAL (KIND=nag_wp) arrayOutput
On exit:
ALPHA and
BETA contain the generalized singular value pairs of
and
;
- , , for , and
- if ,
, , for , or
- if ,
, , for and
, , for .
Furthermore, if ,
, for .
- 17: U(LDU,) – REAL (KIND=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
U
must be at least
if
or
, and at least
otherwise.
On entry: if
,
U must contain an
by
matrix
(usually the orthogonal matrix returned by
F08VEF (DGGSVP)).
On exit: if
,
U contains the orthogonal matrix
.
If
,
U contains the product
.
If
,
U is not referenced.
- 18: LDU – INTEGERInput
On entry: the first dimension of the array
U as declared in the (sub)program from which F08YEF (DTGSJA) is called.
Constraints:
- if , ;
- otherwise .
- 19: V(LDV,) – REAL (KIND=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
V
must be at least
if
or
, and at least
otherwise.
On entry: if
,
V must contain an
by
matrix
(usually the orthogonal matrix returned by
F08VEF (DGGSVP)).
On exit: if
,
V contains the orthogonal matrix
.
If
,
V contains the product
.
If
,
V is not referenced.
- 20: LDV – INTEGERInput
On entry: the first dimension of the array
V as declared in the (sub)program from which F08YEF (DTGSJA) is called.
Constraints:
- if , ;
- otherwise .
- 21: Q(LDQ,) – REAL (KIND=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
Q
must be at least
if
or
, and at least
otherwise.
On entry: if
,
Q must contain an
by
matrix
(usually the orthogonal matrix returned by
F08VEF (DGGSVP)).
On exit: if
,
Q contains the orthogonal matrix
.
If
,
Q contains the product
.
If
,
Q is not referenced.
- 22: LDQ – INTEGERInput
On entry: the first dimension of the array
Q as declared in the (sub)program from which F08YEF (DTGSJA) is called.
Constraints:
- if , ;
- otherwise .
- 23: WORK() – REAL (KIND=nag_wp) arrayWorkspace
- 24: NCYCLE – INTEGEROutput
On exit: the number of cycles required for convergence.
- 25: INFO – INTEGEROutput
On exit:
unless the routine detects an error (see
Section 6).
6 Error Indicators and Warnings
Errors or warnings detected by the routine:
If , argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
The procedure does not converge after cycles.
7 Accuracy
The computed generalized singular value decomposition is nearly the exact generalized singular value decomposition for nearby matrices
and
, where
and
is the
machine precision. See Section 4.12 of
Anderson et al. (1999) for further details.
The complex analogue of this routine is
F08YSF (ZTGSJA).
9 Example
This example finds the generalized singular value decomposition
of the matrix pair
, where
9.1 Program Text
Program Text (f08yefe.f90)
9.2 Program Data
Program Data (f08yefe.d)
9.3 Program Results
Program Results (f08yefe.r)