SRC/dorcsd.f(3)
π NAME π
okay bestie, welcome to SRC/dorcsd.f β this page is from the Library Functions Manual, and it's all about a recursive subroutine named dorcsd (aka DORCSD). It's giving linear algebra main character energy. π
β¨ SYNOPSIS β¨
π Functions/Subroutines π
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)βDORCSD
πΈ Function/Subroutine Documentation πΈ
π¦ recursive subroutine dorcsd π¦
Here's the full typed-out signature, no cap:
recursive subroutine dorcsd (character jobu1, character jobu2, character jobv1t, character jobv2t, character trans, character signs, integer m, integer p, integer q, double precision, dimension( ldx11, * ) x11, integer ldx11, double precision, dimension( ldx12, * ) x12, integer ldx12, double precision, dimension( ldx21, * ) x21, integer ldx21, double precision, dimension( ldx22, * ) x22, integer ldx22, double precision, dimension( * ) theta, double precision, dimension( ldu1, * ) u1, integer ldu1, double precision, dimension( ldu2, * ) u2, integer ldu2, double precision, dimension( ldv1t, * ) v1t, integer ldv1t, double precision, dimension( ldv2t, * ) v2t, integer ldv2t, double precision, dimension( * ) work, integer lwork, integer, dimension( * ) iwork, integer info)
and the one-liner is simply DORCSD.
π₯ Purpose π₯
DORCSD computes the CS decomposition of an M-by-M partitioned orthogonal matrix X. The docs serve this exact diagram:
[ I 0 0 | 0 0 0 ]
[ 0 C 0 | 0 -S 0 ]
[ X11 | X12 ] [ U1 | ] [ 0 0 0 | 0 0 -I ] [ V1 | ]**T
X = [-----------] = [---------] [---------------------] [---------] .
[ X21 | X22 ] [ | U2 ] [ 0 0 0 | I 0 0 ] [ | V2 ]
[ 0 S 0 | 0 C 0 ]
[ 0 0 I | 0 0 0 ]
X11 is P-by-Q. The orthogonal matrices U1, U2, V1, and V2 are P-by-P, (M-P)-by-(M-P), Q-by-Q, and (M-Q)-by-(M-Q), respectively. C and S are R-by-R nonnegative diagonal matrices satisfying C^2 + S^2 = I, in which R = MIN(P,M-P,Q,M-Q).
π Parameters π
π JOBU1
JOBU1isCHARACTER= 'Y':U1is computed;- otherwise:
U1is not computed.
π JOBU2
JOBU2isCHARACTER= 'Y':U2is computed;- otherwise:
U2is not computed.
π JOBV1T
JOBV1TisCHARACTER= 'Y':V1Tis computed;- otherwise:
V1Tis not computed.
π JOBV2T
JOBV2TisCHARACTER= 'Y':V2Tis computed;- otherwise:
V2Tis not computed.
π TRANS
TRANSisCHARACTER= 'T':X,U1,U2,V1T, andV2Tare stored in row-major order;- otherwise:
X,U1,U2,V1T, andV2Tare stored in column-major order.
π SIGNS
SIGNSisCHARACTER= 'O': the lower-left block is made nonpositive (the convention);- otherwise: the upper-right block is made nonpositive (the convention).
π M
MisINTEGER- The number of rows and columns in
X.
π P
PisINTEGER- The number of rows in
X11andX12.0 <= P <= M.
π Q
QisINTEGER- The number of columns in
X11andX21.0 <= Q <= M.
π X11
X11isDOUBLE PRECISIONarray, dimension(LDX11,Q)- On entry, part of the orthogonal matrix whose CSD is desired.
π LDX11
LDX11isINTEGER- The leading dimension of
X11.LDX11 >= MAX(1,P).
π X12
X12isDOUBLE PRECISIONarray, dimension(LDX12,M-Q)- On entry, part of the orthogonal matrix whose CSD is desired.
π LDX12
LDX12isINTEGER- The leading dimension of
X12.LDX12 >= MAX(1,P).
π X21
X21isDOUBLE PRECISIONarray, dimension(LDX21,Q)- On entry, part of the orthogonal matrix whose CSD is desired.
π LDX21
LDX21isINTEGER- The leading dimension of
X11.LDX21 >= MAX(1,M-P).
π X22
X22isDOUBLE PRECISIONarray, dimension(LDX22,M-Q)- On entry, part of the orthogonal matrix whose CSD is desired.
π LDX22
LDX22isINTEGER- The leading dimension of
X11.LDX22 >= MAX(1,M-P).
π THETA
THETAisDOUBLE PRECISIONarray, dimension(R), in whichR = MIN(P,M-P,Q,M-Q).C = DIAG( COS(THETA(1)), ... , COS(THETA(R)) )andS = DIAG( SIN(THETA(1)), ... , SIN(THETA(R)) ).
π U1
U1isDOUBLE PRECISIONarray, dimension(LDU1,P)- If
JOBU1 = 'Y',U1contains the P-by-P orthogonal matrixU1.
π LDU1
LDU1isINTEGER- The leading dimension of
U1. IfJOBU1 = 'Y',LDU1 >= MAX(1,P).
π U2
U2isDOUBLE PRECISIONarray, dimension(LDU2,M-P)- If
JOBU2 = 'Y',U2contains the (M-P)-by-(M-P) orthogonal matrixU2.
π LDU2
LDU2isINTEGER- The leading dimension of
U2. IfJOBU2 = 'Y',LDU2 >= MAX(1,M-P).
π V1T
V1TisDOUBLE PRECISIONarray, dimension(LDV1T,Q)- If
JOBV1T = 'Y',V1Tcontains the Q-by-Q matrix orthogonal matrixV1**T.
π LDV1T
LDV1TisINTEGER- The leading dimension of
V1T. IfJOBV1T = 'Y',LDV1T >= MAX(1,Q).
π V2T
V2TisDOUBLE PRECISIONarray, dimension(LDV2T,M-Q)- If
JOBV2T = 'Y',V2Tcontains the (M-Q)-by-(M-Q) orthogonal matrixV2**T.
π LDV2T
LDV2TisINTEGER- The leading dimension of
V2T. IfJOBV2T = 'Y',LDV2T >= MAX(1,M-Q).
π WORK
WORKisDOUBLE PRECISIONarray, dimension(MAX(1,LWORK))- On exit, if
INFO = 0,WORK(1)returns the optimalLWORK. - If
INFO > 0on exit,WORK(2:R)contains the valuesPHI(1), ..., PHI(R-1)that, together withTHETA(1), ..., THETA(R), define the matrix in intermediate bidiagonal-block form remaining after nonconvergence.INFOspecifies the number of nonzeroPHI's.
π LWORK
LWORKisINTEGER- The dimension of the array
WORK. - If
LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of theWORKarray, returns this value as the first entry of the work array, and no error message related toLWORKis issued byXERBLA.
π IWORK
IWORKisINTEGERarray, dimension(M-MIN(P, M-P, Q, M-Q))
π INFO
INFOisINTEGER= 0: successful exit.< 0: ifINFO = -i, the i-th argument had an illegal value.> 0:DBBCSDdid not converge. See the description ofWORKabove for details.
π References π
[1] Brian D. Sutton. Computing the complete CS decomposition. Numer. Algorithms, 50(1):33-65, 2009.
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π Definition π
- Definition at line 295 of file
dorcsd.f.
π Author π
- Generated automatically by Doxygen for LAPACK from the source code.
mwah π this page is signed by LAPACK Version 3.12.0 and the footer tag is SRC/dorcsd.f(3). That's the whole tea. π«Άβ¨
π¦ where this page comes from
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms