1ZGGSVP ‐ unitary matrices U, V and Q such that N‐K‐L K L
2U'*A*Q = K ( 0 A12 A13 ) if M‐K‐L >= 0 SUBROUTINE ZGGSVP( JOBU,
3JOBV, JOBQ, M, P, N, A, LDA, B, LDB, TOLA, TOLB, K, L, U, LDU, V,
4LDV, Q, LDQ, IWORK, RWORK, TAU, WORK, INFO )
5 CHARACTER JOBQ, JOBU, JOBV
6 INTEGER INFO, K, L, LDA, LDB, LDQ, LDU, LDV, M, N, P
7 DOUBLE PRECISION TOLA, TOLB
8 INTEGER IWORK( * )
9 DOUBLE PRECISION RWORK( * )
10 COMPLEX*16 A( LDA, * ), B( LDB, * ), Q( LDQ, * ), TAU( * ),
11U( LDU, * ), V( LDV, * ), WORK( * ) ZGGSVP computes unitary ma‐
12trices U, V and Q such that
13 L ( 0 0 A23 )
14 M‐K‐L ( 0 0 0 )
15
16 N‐K‐L K L
17 = K ( 0 A12 A13 ) if M‐K‐L < 0;
18 M‐K ( 0 0 A23 )
19
20 N‐K‐L K L
21 V'*B*Q = L ( 0 0 B13 )
22 P‐L ( 0 0 0 )
23
24where the K‐by‐K matrix A12 and L‐by‐L matrix B13 are nonsingular
25upper triangular; A23 is L‐by‐L upper triangular if M‐K‐L >= 0,
26otherwise A23 is (M‐K)‐by‐L upper trapezoidal. K+L = the effec‐
27tive numerical rank of the (M+P)‐by‐N matrix (A',B')'. Z' de‐
28notes the conjugate transpose of Z.
29
30This decomposition is the preprocessing step for computing the
31Generalized Singular Value Decomposition (GSVD), see subroutine
32ZGGSVD.
33
34JOBU (input) CHARACTER*1 = 'U': Unitary matrix U is computed;
35= 'N': U is not computed. JOBV (input) CHARACTER*1
36= 'V': Unitary matrix V is computed;
37= 'N': V is not computed. JOBQ (input) CHARACTER*1
38= 'Q': Unitary matrix Q is computed;
39= 'N': Q is not computed. M (input) INTEGER The number of
40rows of the matrix A. M >= 0. P (input) INTEGER The num‐
41ber of rows of the matrix B. P >= 0. N (input) INTEGER
42The number of columns of the matrices A and B. N >= 0. A
43(input/output) COMPLEX*16 array, dimension (LDA,N) On entry, the
44M‐by‐N matrix A. On exit, A contains the triangular (or trape‐
45zoidal) matrix described in the Purpose section. LDA (input)
46INTEGER The leading dimension of the array A. LDA >= max(1,M). B
47(input/output) COMPLEX*16 array, dimension (LDB,N) On entry, the
48P‐by‐N matrix B. On exit, B contains the triangular matrix de‐
49scribed in the Purpose section. LDB (input) INTEGER The
50leading dimension of the array B. LDB >= max(1,P). TOLA (in‐
51put) DOUBLE PRECISION TOLB (input) DOUBLE PRECISION TOLA and
52TOLB are the thresholds to determine the effective numerical rank
53of matrix B and a subblock of A. Generally, they are set to TOLA
54= MAX(M,N)*norm(A)*MAZHEPS, TOLB = MAX(P,N)*norm(B)*MAZHEPS. The
55size of TOLA and TOLB may affect the size of backward errors of
56the decomposition. K (output) INTEGER L (output) IN‐
57TEGER On exit, K and L specify the dimension of the subblocks de‐
58scribed in Purpose section. K + L = effective numerical rank of
59(A',B')'. U (output) COMPLEX*16 array, dimension (LDU,M)
60If JOBU = 'U', U contains the unitary matrix U. If JOBU = 'N', U
61is not referenced. LDU (input) INTEGER The leading dimension
62of the array U. LDU >= max(1,M) if JOBU = 'U'; LDU >= 1 other‐
63wise. V (output) COMPLEX*16 array, dimension (LDV,M) If
64JOBV = 'V', V contains the unitary matrix V. If JOBV = 'N', V is
65not referenced. LDV (input) INTEGER The leading dimension of
66the array V. LDV >= max(1,P) if JOBV = 'V'; LDV >= 1 otherwise.
67Q (output) COMPLEX*16 array, dimension (LDQ,N) If JOBQ =
68'Q', Q contains the unitary matrix Q. If JOBQ = 'N', Q is not
69referenced. LDQ (input) INTEGER The leading dimension of the
70array Q. LDQ >= max(1,N) if JOBQ = 'Q'; LDQ >= 1 otherwise.
71IWORK (workspace) INTEGER array, dimension (N) RWORK
72(workspace) DOUBLE PRECISION array, dimension (2*N) TAU
73(workspace) COMPLEX*16 array, dimension (N) WORK (workspace)
74COMPLEX*16 array, dimension (max(3*N,M,P)) INFO (output) INTE‐
75GER = 0: successful exit
76< 0: if INFO = ‐i, the i‐th argument had an illegal value. The
77subroutine uses LAPACK subroutine ZGEQPF for the QR factorization
78with column pivoting to detect the effective numerical rank of
79the a matrix. It may be replaced by a better rank determination
80strategy.
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132