NAG Library Routine Document
F08YSF (ZTGSJA)
1 Purpose
F08YSF (ZTGSJA) computes the generalized singular value decomposition (GSVD) of two complex upper trapezoidal matrices and , where is an by matrix and is a by matrix.
and
are assumed to be in the form returned by
F08VSF (ZGGSVP).
2 Specification
SUBROUTINE F08YSF ( |
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) |
TOLA, TOLB, ALPHA(N), BETA(N) |
COMPLEX (KIND=nag_wp) |
A(LDA,*), B(LDB,*), U(LDU,*), V(LDV,*), Q(LDQ,*), WORK(2*N) |
CHARACTER(1) |
JOBU, JOBV, JOBQ |
|
The routine may be called by its
LAPACK
name ztgsja.
3 Description
F08YSF (ZTGSJA) computes the GSVD of the matrices
and
which are assumed to have the form as returned by
F08VSF (ZGGSVP)
where the
by
matrix
and the
by
matrix
are nonsingular upper triangular,
is
by
upper triangular if
and is
by
upper trapezoidal otherwise.
F08YSF (ZTGSJA) computes unitary 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 real non-negative diagonal elements, the diagonal matrix
has real 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 a unitary matrix
on entry, and the product
is returned.
If
,
U is initialized to the unit matrix, and the unitary matrix
is returned.
If , is not computed.
Constraint:
, or .
- 2: – CHARACTER(1)Input
-
On entry: if
,
V must contain a unitary matrix
on entry, and the product
is returned.
If
,
V is initialized to the unit matrix, and the unitary matrix
is returned.
If , is not computed.
Constraint:
, or .
- 3: – CHARACTER(1)Input
-
On entry: if
,
Q must contain a unitary matrix
on entry, and the product
is returned.
If
,
Q is initialized to the unit matrix, and the unitary 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 F08YSF (ZTGSJA).
- 9: – COMPLEX (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 F08YSF (ZTGSJA) is called.
Constraint:
.
- 11: – COMPLEX (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 F08YSF (ZTGSJA) 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: – COMPLEX (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 unitary matrix returned by
F08VSF (ZGGSVP)).
On exit: if
,
U contains the product
.
If
,
U contains the unitary 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 F08YSF (ZTGSJA) is called.
Constraints:
- if or , ;
- otherwise .
- 19: – COMPLEX (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 unitary matrix returned by
F08VSF (ZGGSVP)).
On exit: if
,
V contains the unitary 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 F08YSF (ZTGSJA) is called.
Constraints:
- if or , ;
- otherwise .
- 21: – COMPLEX (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 unitary matrix returned by
F08VSF (ZGGSVP)).
On exit: if
,
Q contains the unitary 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 F08YSF (ZTGSJA) is called.
Constraints:
- if or , ;
- otherwise .
- 23: – COMPLEX (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
F08YSF (ZTGSJA) is not threaded by NAG in any implementation.
F08YSF (ZTGSJA) 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 real analogue of this routine is
F08YEF (DTGSJA).
10 Example
This example finds the generalized singular value decomposition
of the matrix pair
, where
and
10.1 Program Text
Program Text (f08ysfe.f90)
10.2 Program Data
Program Data (f08ysfe.d)
10.3 Program Results
Program Results (f08ysfe.r)