File: dorcsd

package info (click to toggle)
ruby-lapack 1.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 28,552 kB
  • sloc: ansic: 191,612; ruby: 3,934; makefile: 8
file content (264 lines) | stat: -rwxr-xr-x 7,881 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
--- 
:name: dorcsd
:md5sum: 16a44e6711210545e42e19e9eb2e970f
:category: :subroutine
:arguments: 
- jobu1: 
    :type: char
    :intent: input
- jobu2: 
    :type: char
    :intent: input
- jobv1t: 
    :type: char
    :intent: input
- jobv2t: 
    :type: char
    :intent: input
- trans: 
    :type: char
    :intent: input
- signs: 
    :type: char
    :intent: input
- m: 
    :type: integer
    :intent: input
- p: 
    :type: integer
    :intent: input
- q: 
    :type: integer
    :intent: input
- x11: 
    :type: doublereal
    :intent: input
    :dims: 
    - ldx11
    - q
- ldx11: 
    :type: integer
    :intent: input
- x12: 
    :type: doublereal
    :intent: input
    :dims: 
    - ldx12
    - m-q
- ldx12: 
    :type: integer
    :intent: input
- x21: 
    :type: doublereal
    :intent: input
    :dims: 
    - ldx21
    - q
- ldx21: 
    :type: integer
    :intent: input
- x22: 
    :type: doublereal
    :intent: input
    :dims: 
    - ldx22
    - m-q
- ldx22: 
    :type: integer
    :intent: input
- theta: 
    :type: doublereal
    :intent: output
    :dims: 
    - MIN(MIN(MIN(p,m-p),q),m-q)
- u1: 
    :type: doublereal
    :intent: output
    :dims: 
    - p
- ldu1: 
    :type: integer
    :intent: input
- u2: 
    :type: doublereal
    :intent: output
    :dims: 
    - m-p
- ldu2: 
    :type: integer
    :intent: input
- v1t: 
    :type: doublereal
    :intent: output
    :dims: 
    - q
- ldv1t: 
    :type: integer
    :intent: input
- v2t: 
    :type: doublereal
    :intent: output
    :dims: 
    - m-q
- ldv2t: 
    :type: integer
    :intent: input
- work: 
    :type: doublereal
    :intent: workspace
    :dims: 
    - MAX(1,lwork)
- lwork: 
    :type: integer
    :intent: input
- iwork: 
    :type: integer
    :intent: workspace
    :dims: 
    - m-q
- info: 
    :type: integer
    :intent: output
:substitutions: 
  ldv2t: "lsame_(&jobv2t,\"Y\") ? MAX(1,m-q) : 0"
  ldv1t: "lsame_(&jobv1t,\"Y\") ? MAX(1,q) : 0"
  ldu1: "lsame_(&jobu1,\"Y\") ? MAX(1,p) : 0"
  ldu2: "lsame_(&jobu2,\"Y\") ? MAX(1,m-p) : 0"
  p: ldx11
  ldx12: p
  ldx21: p
  ldx22: p
:fortran_help: "      RECURSIVE SUBROUTINE DORCSD( JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS, SIGNS, M, P, Q, X11, LDX11, X12, LDX12, X21, LDX21, X22, LDX22, THETA, U1, LDU1, U2, LDU2, V1T, LDV1T, V2T, LDV2T, WORK, LWORK, IWORK, INFO )\n\n\
  *  Purpose\n\
  *  =======\n\
  *\n\
  *  DORCSD computes the CS decomposition of an M-by-M partitioned\n\
  *  orthogonal matrix X:\n\
  *\n\
  *                                  [  I  0  0 |  0  0  0 ]\n\
  *                                  [  0  C  0 |  0 -S  0 ]\n\
  *      [ X11 | X12 ]   [ U1 |    ] [  0  0  0 |  0  0 -I ] [ V1 |    ]**T\n\
  *  X = [-----------] = [---------] [---------------------] [---------]   .\n\
  *      [ X21 | X22 ]   [    | U2 ] [  0  0  0 |  I  0  0 ] [    | V2 ]\n\
  *                                  [  0  S  0 |  0  C  0 ]\n\
  *                                  [  0  0  I |  0  0  0 ]\n\
  *\n\
  *  X11 is P-by-Q. The orthogonal matrices U1, U2, V1, and V2 are P-by-P,\n\
  *  (M-P)-by-(M-P), Q-by-Q, and (M-Q)-by-(M-Q), respectively. C and S are\n\
  *  R-by-R nonnegative diagonal matrices satisfying C^2 + S^2 = I, in\n\
  *  which R = MIN(P,M-P,Q,M-Q).\n\
  *\n\n\
  *  Arguments\n\
  *  =========\n\
  *\n\
  *  JOBU1   (input) CHARACTER\n\
  *          = 'Y':      U1 is computed;\n\
  *          otherwise:  U1 is not computed.\n\
  *\n\
  *  JOBU2   (input) CHARACTER\n\
  *          = 'Y':      U2 is computed;\n\
  *          otherwise:  U2 is not computed.\n\
  *\n\
  *  JOBV1T  (input) CHARACTER\n\
  *          = 'Y':      V1T is computed;\n\
  *          otherwise:  V1T is not computed.\n\
  *\n\
  *  JOBV2T  (input) CHARACTER\n\
  *          = 'Y':      V2T is computed;\n\
  *          otherwise:  V2T is not computed.\n\
  *\n\
  *  TRANS   (input) CHARACTER\n\
  *          = 'T':      X, U1, U2, V1T, and V2T are stored in row-major\n\
  *                      order;\n\
  *          otherwise:  X, U1, U2, V1T, and V2T are stored in column-\n\
  *                      major order.\n\
  *\n\
  *  SIGNS   (input) CHARACTER\n\
  *          = 'O':      The lower-left block is made nonpositive (the\n\
  *                      \"other\" convention);\n\
  *          otherwise:  The upper-right block is made nonpositive (the\n\
  *                      \"default\" convention).\n\
  *\n\
  *  M       (input) INTEGER\n\
  *          The number of rows and columns in X.\n\
  *\n\
  *  P       (input) INTEGER\n\
  *          The number of rows in X11 and X12. 0 <= P <= M.\n\
  *\n\
  *  Q       (input) INTEGER\n\
  *          The number of columns in X11 and X21. 0 <= Q <= M.\n\
  *\n\
  *  X       (input/workspace) DOUBLE PRECISION array, dimension (LDX,M)\n\
  *          On entry, the orthogonal matrix whose CSD is desired.\n\
  *\n\
  *  LDX     (input) INTEGER\n\
  *          The leading dimension of X. LDX >= MAX(1,M).\n\
  *\n\
  *  THETA   (output) DOUBLE PRECISION array, dimension (R), in which R =\n\
  *          MIN(P,M-P,Q,M-Q).\n\
  *          C = DIAG( COS(THETA(1)), ... , COS(THETA(R)) ) and\n\
  *          S = DIAG( SIN(THETA(1)), ... , SIN(THETA(R)) ).\n\
  *\n\
  *  U1      (output) DOUBLE PRECISION array, dimension (P)\n\
  *          If JOBU1 = 'Y', U1 contains the P-by-P orthogonal matrix U1.\n\
  *\n\
  *  LDU1    (input) INTEGER\n\
  *          The leading dimension of U1. If JOBU1 = 'Y', LDU1 >=\n\
  *          MAX(1,P).\n\
  *\n\
  *  U2      (output) DOUBLE PRECISION array, dimension (M-P)\n\
  *          If JOBU2 = 'Y', U2 contains the (M-P)-by-(M-P) orthogonal\n\
  *          matrix U2.\n\
  *\n\
  *  LDU2    (input) INTEGER\n\
  *          The leading dimension of U2. If JOBU2 = 'Y', LDU2 >=\n\
  *          MAX(1,M-P).\n\
  *\n\
  *  V1T     (output) DOUBLE PRECISION array, dimension (Q)\n\
  *          If JOBV1T = 'Y', V1T contains the Q-by-Q matrix orthogonal\n\
  *          matrix V1**T.\n\
  *\n\
  *  LDV1T   (input) INTEGER\n\
  *          The leading dimension of V1T. If JOBV1T = 'Y', LDV1T >=\n\
  *          MAX(1,Q).\n\
  *\n\
  *  V2T     (output) DOUBLE PRECISION array, dimension (M-Q)\n\
  *          If JOBV2T = 'Y', V2T contains the (M-Q)-by-(M-Q) orthogonal\n\
  *          matrix V2**T.\n\
  *\n\
  *  LDV2T   (input) INTEGER\n\
  *          The leading dimension of V2T. If JOBV2T = 'Y', LDV2T >=\n\
  *          MAX(1,M-Q).\n\
  *\n\
  *  WORK    (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK))\n\
  *          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.\n\
  *          If INFO > 0 on exit, WORK(2:R) contains the values PHI(1),\n\
  *          ..., PHI(R-1) that, together with THETA(1), ..., THETA(R),\n\
  *          define the matrix in intermediate bidiagonal-block form\n\
  *          remaining after nonconvergence. INFO specifies the number\n\
  *          of nonzero PHI's.\n\
  *\n\
  *  LWORK   (input) INTEGER\n\
  *          The dimension of the array WORK.\n\
  *\n\
  *          If LWORK = -1, then a workspace query is assumed; the routine\n\
  *          only calculates the optimal size of the WORK array, returns\n\
  *          this value as the first entry of the work array, and no error\n\
  *          message related to LWORK is issued by XERBLA.\n\
  *\n\
  *  IWORK   (workspace) INTEGER array, dimension (M-Q)\n\
  *\n\
  *  INFO    (output) INTEGER\n\
  *          = 0:  successful exit.\n\
  *          < 0:  if INFO = -i, the i-th argument had an illegal value.\n\
  *          > 0:  DBBCSD did not converge. See the description of WORK\n\
  *                above for details.\n\
  *\n\
  *  Reference\n\
  *  =========\n\
  *\n\
  *  [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.\n\
  *      Algorithms, 50(1):33-65, 2009.\n\
  *\n\n\
  *  ===================================================================\n\
  *\n"