TESTING/EIG/scsdts.f(3)
πΈ TESTING/EIG/scsdts.f(3) β Library Functions Manual πΈ
okay so bestie, this page is TESTING/EIG/scsdts.f(3), and it lives in the Library Functions Manual. It's giving Fortran test-routine energy, and we're gonna go through every single detail, no cap π
β¨ NAME β¨
TESTING/EIG/scsdts.f β that's the file, bestie. The routine it documents is scsdts / SCSDTS, and it tests the CSD stuff listed below. π«Ά
π¦ SYNOPSIS π¦
Functions/Subroutines
subroutine scsdts (m, p, q, x, xf, ldx, u1, ldu1, u2, ldu2, v1t, ldv1t, v2t, ldv2t, theta, iwork, work, lwork, rwork, result)SCSDTS
lowkey the whole squad of args is showing up here, and yes, every one of them gets its own moment in the parameters section. periodt.
π Function/Subroutine Documentation π
Here's the full typed signature, exactly as the page gives it:
subroutine scsdts (integer m, integer p, integer q, real, dimension( ldx, *
) x, real, dimension( ldx, * ) xf, integer ldx, real, dimension( ldu1, *
) u1, integer ldu1, real, dimension( ldu2, * ) u2, integer ldu2, real,
dimension( ldv1t, * ) v1t, integer ldv1t, real, dimension( ldv2t, * )
v2t, integer ldv2t, real, dimension( * ) theta, integer, dimension( * )
iwork, real, dimension( lwork ) work, integer lwork, real, dimension( *
) rwork, real, dimension( 15 ) result)
and the name is SCSDTS, obviously. β¨
π― Purpose π―
So what does it even do? SCSDTS tests SORCSD, which, given an M-by-M partitioned orthogonal matrix X, like this:
Q M-Q
X = [ X11 X12 ] P ,
[ X21 X22 ] M-P
computes the CSD:
[ U1 ]**T * [ X11 X12 ] * [ V1 ]
[ U2 ] [ X21 X22 ] [ V2 ]
[ I 0 0 | 0 0 0 ]
[ 0 C 0 | 0 -S 0 ]
[ 0 0 0 | 0 0 -I ]
= [---------------------] = [ D11 D12 ] .
[ 0 0 0 | I 0 0 ] [ D21 D22 ]
[ 0 S 0 | 0 C 0 ]
[ 0 0 I | 0 0 0 ]
and it also tests SORCSD2BY1, which, given:
Q
[ X11 ] P ,
[ X21 ] M-P
computes the 2-by-1 CSD:
[ I 0 0 ]
[ 0 C 0 ]
[ 0 0 0 ]
[ U1 ]**T * [ X11 ] * V1 = [----------] = [ D11 ] ,
[ U2 ] [ X21 ] [ 0 0 0 ] [ D21 ]
[ 0 S 0 ]
[ 0 0 I ]
π§Έ Parameters π§Έ
Every arg, no skipping, because we don't do that here:
MβM is INTEGER; the number of rows of the matrixX. Constraint:M >= 0.PβP is INTEGER; the number of rows of the matrixX11. Constraint:P >= 0.QβQ is INTEGER; the number of columns of the matrixX11. Constraint:Q >= 0.XβX is REAL array, dimension (LDX,M); theM-by-MmatrixX.XFβXF is REAL array, dimension (LDX,M); details of the CSD ofX, as returned bySORCSD; seeSORCSDfor further details.LDXβLDX is INTEGER; the leading dimension of the arraysXandXF. Constraint:LDX >= max( 1,M ).U1βU1 is REAL array, dimension(LDU1,P); theP-by-Porthogonal matrixU1.LDU1βLDU1 is INTEGER; the leading dimension of the arrayU1. The page says:LDU >= max(1,P).U2βU2 is REAL array, dimension(LDU2,M-P); the(M-P)-by-(M-P)orthogonal matrixU2.LDU2βLDU2 is INTEGER; the leading dimension of the arrayU2. The page says:LDU >= max(1,M-P).V1TβV1T is REAL array, dimension(LDV1T,Q); theQ-by-Qorthogonal matrixV1T.LDV1TβLDV1T is INTEGER; the leading dimension of the arrayV1T. Constraint:LDV1T >= max(1,Q).V2TβV2T is REAL array, dimension(LDV2T,M-Q); the(M-Q)-by-(M-Q)orthogonal matrixV2T.LDV2TβLDV2T is INTEGER; the leading dimension of the arrayV2T. Constraint:LDV2T >= max(1,M-Q).THETAβTHETA is REAL array, dimension MIN(P,M-P,Q,M-Q); the CS values ofX; the essentially diagonal matricesCandSare constructed fromTHETA; see subroutineSORCSDfor details.IWORKβIWORK is INTEGER array, dimension (M). That's it, bestie.WORKβWORK is REAL array, dimension (LWORK).LWORKβLWORK is INTEGER; the dimension of the arrayWORK.RWORKβRWORK is REAL array.RESULTβRESULT is REAL array, dimension (15); the test ratios:
First, the 2-by-2 CSD:
RESULT(1) = norm( U1'*X11*V1 - D11 ) / ( MAX(1,P,Q)*EPS2 )
RESULT(2) = norm( U1'*X12*V2 - D12 ) / ( MAX(1,P,M-Q)*EPS2 )
RESULT(3) = norm( U2'*X21*V1 - D21 ) / ( MAX(1,M-P,Q)*EPS2 )
RESULT(4) = norm( U2'*X22*V2 - D22 ) / ( MAX(1,M-P,M-Q)*EPS2 )
RESULT(5) = norm( I - U1'*U1 ) / ( MAX(1,P)*ULP )
RESULT(6) = norm( I - U2'*U2 ) / ( MAX(1,M-P)*ULP )
RESULT(7) = norm( I - V1T'*V1T ) / ( MAX(1,Q)*ULP )
RESULT(8) = norm( I - V2T'*V2T ) / ( MAX(1,M-Q)*ULP )
RESULT(9) = 0 if THETA is in increasing order and
all angles are in [0,pi/2]
= ULPINV otherwise.
Then, the 2-by-1 CSD:
RESULT(10) = norm( U1'*X11*V1 - D11 ) / ( MAX(1,P,Q)*EPS2 )
RESULT(11) = norm( U2'*X21*V1 - D21 ) / ( MAX(1,M-P,Q)*EPS2 )
RESULT(12) = norm( I - U1'*U1 ) / ( MAX(1,P)*ULP )
RESULT(13) = norm( I - U2'*U2 ) / ( MAX(1,M-P)*ULP )
RESULT(14) = norm( I - V1T'*V1T ) / ( MAX(1,Q)*ULP )
RESULT(15) = 0 if THETA is in increasing order and
all angles are in [0,pi/2]
= ULPINV otherwise.
( EPS2 = MAX( norm( I - X'*X ) / M, ULP ). )
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 226 of file scsdts.f.
Author π
Generated automatically by Doxygen for LAPACK from the source code.
okay that's the whole page, bestie π
β source/version vibes: LAPACK, Version 3.12.0, page TESTING/EIG/scsdts.f(3) (no date in the footer, so no fake date energy). byeee π«Άβ¨
π¦ 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