1SGGSVP ‐ orthogonal 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 SGGSVP( JOBU,
3JOBV, JOBQ, M, P, N, A, LDA, B, LDB, TOLA, TOLB, K, L, U, LDU, V,
4LDV, Q, LDQ, IWORK, 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 A( LDA, * ), B( LDB, * ), Q( LDQ, * ), TAU( * ), U( LDU,
10* ), V( LDV, * ), WORK( * ) SGGSVP computes orthogonal matrices
11U, V and Q such that
12 L ( 0 0 A23 )
13 M‐K‐L ( 0 0 0 )
14
15 N‐K‐L K L
16 = K ( 0 A12 A13 ) if M‐K‐L < 0;
17 M‐K ( 0 0 A23 )
18
19 N‐K‐L K L
20 V'*B*Q = L ( 0 0 B13 )
21 P‐L ( 0 0 0 )
22
23where the K‐by‐K matrix A12 and L‐by‐L matrix B13 are nonsingular
24upper triangular; A23 is L‐by‐L upper triangular if M‐K‐L >= 0,
25otherwise A23 is (M‐K)‐by‐L upper trapezoidal. K+L = the effec‐
26tive numerical rank of the (M+P)‐by‐N matrix (A',B')'. Z' de‐
27notes the transpose of Z.
28
29This decomposition is the preprocessing step for computing the
30Generalized Singular Value Decomposition (GSVD), see subroutine
31SGGSVD.
32
33JOBU (input) CHARACTER*1 = 'U': Orthogonal matrix U is com‐
34puted;
35= 'N': U is not computed. JOBV (input) CHARACTER*1
36= 'V': Orthogonal matrix V is computed;
37= 'N': V is not computed. JOBQ (input) CHARACTER*1
38= 'Q': Orthogonal 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) REAL array, dimension (LDA,N) On entry, the M‐by‐N
44matrix A. On exit, A contains the triangular (or trapezoidal)
45matrix described in the Purpose section. LDA (input) INTEGER
46The leading dimension of the array A. LDA >= max(1,M). B
47(input/output) REAL array, dimension (LDB,N) On entry, the P‐by‐N
48matrix B. On exit, B contains the triangular matrix described in
49the Purpose section. LDB (input) INTEGER The leading dimen‐
50sion of the array B. LDB >= max(1,P). TOLA (input) REAL TOLB
51(input) REAL TOLA and TOLB are the thresholds to determine the
52effective numerical rank of matrix B and a subblock of A. Gener‐
53ally, they are set to TOLA = MAX(M,N)*norm(A)*MACHEPS, TOLB =
54MAX(P,N)*norm(B)*MACHEPS. The size of TOLA and TOLB may affect
55the size of backward errors of the decomposition. K (out‐
56put) INTEGER L (output) INTEGER On exit, K and L specify
57the dimension of the subblocks described in Purpose. K + L = ef‐
58fective numerical rank of (A',B')'. U (output) REAL array,
59dimension (LDU,M) If JOBU = 'U', U contains the orthogonal matrix
60U. If JOBU = 'N', U is not referenced. LDU (input) INTEGER
61The leading dimension of the array U. LDU >= max(1,M) if JOBU =
62'U'; LDU >= 1 otherwise. V (output) REAL array, dimension
63(LDV,M) If JOBV = 'V', V contains the orthogonal matrix V. If
64JOBV = 'N', V is not referenced. LDV (input) INTEGER The
65leading dimension of the array V. LDV >= max(1,P) if JOBV = 'V';
66LDV >= 1 otherwise. Q (output) REAL array, dimension
67(LDQ,N) If JOBQ = 'Q', Q contains the orthogonal matrix Q. If
68JOBQ = 'N', Q is not referenced. LDQ (input) INTEGER The
69leading dimension of the array Q. LDQ >= max(1,N) if JOBQ = 'Q';
70LDQ >= 1 otherwise. IWORK (workspace) INTEGER array, dimension
71(N) TAU (workspace) REAL array, dimension (N) WORK
72(workspace) REAL array, dimension (max(3*N,M,P)) INFO (output)
73INTEGER = 0: successful exit
74< 0: if INFO = ‐i, the i‐th argument had an illegal value. The
75subroutine uses LAPACK subroutine SGEQPF for the QR factorization
76with column pivoting to detect the effective numerical rank of
77the a matrix. It may be replaced by a better rank determination
78strategy.
79
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