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: – 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: – 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: – 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: – INTEGERInput
-
On entry: , the number of rows of the matrix .
Constraint:
.
- 5: – INTEGERInput
-
On entry: , the number of rows of the matrix .
Constraint:
.
- 6: – INTEGERInput
-
On entry: , the number of columns of the matrices and .
Constraint:
.
- 7: – INTEGERInput
- 8: – 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: – 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: – INTEGERInput
-
On entry: the first dimension of the array
A as declared in the (sub)program from which F08YEF (DTGSJA) is called.
Constraint:
.
- 11: – 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: – INTEGERInput
-
On entry: the first dimension of the array
B as declared in the (sub)program from which F08YEF (DTGSJA) is called.
Constraint:
.
- 13: – REAL (KIND=nag_wp)Input
- 14: – 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: – REAL (KIND=nag_wp) arrayOutput
-
On exit: see the description of
BETA.
- 16: – 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: – 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 product
.
If
,
U contains the orthogonal matrix
.
If
,
U is not referenced.
- 18: – INTEGERInput
-
On entry: the first dimension of the array
U as declared in the (sub)program from which F08YEF (DTGSJA) is called.
Constraints:
- if or , ;
- otherwise .
- 19: – 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: – INTEGERInput
-
On entry: the first dimension of the array
V as declared in the (sub)program from which F08YEF (DTGSJA) is called.
Constraints:
- if or , ;
- otherwise .
- 21: – 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: – INTEGERInput
-
On entry: the first dimension of the array
Q as declared in the (sub)program from which F08YEF (DTGSJA) is called.
Constraints:
- if or , ;
- otherwise .
- 23: – REAL (KIND=nag_wp) arrayWorkspace
-
- 24: – INTEGEROutput
-
On exit: the number of cycles required for convergence.
- 25: – INTEGEROutput
On exit:
unless the routine detects an error (see
Section 6).
6 Error Indicators and Warnings
-
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.
8 Parallelism and Performance
F08YEF (DTGSJA) is not threaded by NAG in any implementation.
F08YEF (DTGSJA) makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
The complex analogue of this routine is
F08YSF (ZTGSJA).
10 Example
This example finds the generalized singular value decomposition
of the matrix pair
, where
10.1 Program Text
Program Text (f08yefe.f90)
10.2 Program Data
Program Data (f08yefe.d)
10.3 Program Results
Program Results (f08yefe.r)