1CGGSVP ‐ 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 CGGSVP( 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 REAL TOLA, TOLB
8 INTEGER IWORK( * )
9 REAL RWORK( * )
10 COMPLEX A( LDA, * ), B( LDB, * ), Q( LDQ, * ), TAU( * ), U(
11LDU, * ), V( LDV, * ), WORK( * ) CGGSVP computes unitary matrices
12U, 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
32CGGSVD.
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 array, dimension (LDA,N) On entry, the M‐
44by‐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 array, dimension (LDB,N) On entry, the P‐
48by‐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) REAL TOLB (input) REAL TOLA and TOLB are the thresholds
52to determine the effective numerical rank of matrix B and a sub‐
53block of A. Generally, they are set to TOLA =
54MAX(M,N)*norm(A)*MACHEPS, TOLB = MAX(P,N)*norm(B)*MACHEPS. 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 array, dimension (LDU,M) If
60JOBU = 'U', U contains the unitary matrix U. If JOBU = 'N', U is
61not referenced. LDU (input) INTEGER The leading dimension of
62the array U. LDU >= max(1,M) if JOBU = 'U'; LDU >= 1 otherwise.
63V (output) COMPLEX array, dimension (LDV,M) If JOBV = 'V',
64V contains the unitary matrix V. If JOBV = 'N', V is not refer‐
65enced. LDV (input) INTEGER The leading dimension of the ar‐
66ray V. LDV >= max(1,P) if JOBV = 'V'; LDV >= 1 otherwise. Q
67(output) COMPLEX array, dimension (LDQ,N) If JOBQ = 'Q', Q con‐
68tains the unitary matrix Q. If JOBQ = 'N', Q is not referenced.
69LDQ (input) INTEGER The leading dimension of the array Q. LDQ
70>= max(1,N) if JOBQ = 'Q'; LDQ >= 1 otherwise. IWORK
71(workspace) INTEGER array, dimension (N) RWORK (workspace) REAL
72array, dimension (2*N) TAU (workspace) COMPLEX array, dimen‐
73sion (N) WORK (workspace) COMPLEX array, dimension
74(max(3*N,M,P)) INFO (output) INTEGER = 0: successful exit
75< 0: if INFO = ‐i, the i‐th argument had an illegal value. The
76subroutine uses LAPACK subroutine CGEQPF for the QR factorization
77with column pivoting to detect the effective numerical rank of
78the a matrix. It may be replaced by a better rank determination
79strategy.
80
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