DCHKBD(3)
dchkbd.f(3) π
Library Functions Manual β ok bestie, this is the dchkbd.f(3) page for the LAPACK test routine at /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/EIG/dchkbd.f. Yes, the whole path is the NAME, no cap π
π NAME π
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/EIG/dchkbd.f
β¨ SYNOPSIS β¨
π§ Functions/Subroutines π§
subroutine DCHKBD (nsizes, mval, nval, ntypes, dotype, nrhs, iseed,
thresh, a, lda, bd, be, s1, s2, x, ldx, y, z, q, ldq, pt, ldpt, u,
vt, work, lwork, iwork, nout, info)
DCHKBD
π¦ Function/Subroutine Documentation π¦
subroutine DCHKBD (integer nsizes, integer, dimension( * ) mval, integer,
dimension( * ) nval, integer ntypes, logical, dimension( * ) dotype,
integer nrhs, integer, dimension( 4 ) iseed, double precision thresh,
double precision, dimension( lda, * ) a, integer lda, double precision,
dimension( * ) bd, double precision, dimension( * ) be, double
precision, dimension( * ) s1, double precision, dimension( * ) s2,
double precision, dimension( ldx, * ) x, integer ldx, double precision,
dimension( ldx, * ) y, double precision, dimension( ldx, * ) z, double
precision, dimension( ldq, * ) q, integer ldq, double precision,
dimension( ldpt, * ) pt, integer ldpt, double precision, dimension(
ldpt, * ) u, double precision, dimension( ldpt, * ) vt, double
precision, dimension( * ) work, integer lwork, integer, dimension( * )
iwork, integer nout, integer info)
DCHKBD
π Purpose π
Ok so DCHKBD checks the singular value decomposition (SVD) routines. That's the whole vibe check for these routines, bestie. π
DGEBRD reduces a real general m by n matrix A to upper or lower bidiagonal form B by an orthogonal transformation: Q' * A * P = B (or A = Q * B * P'). The matrix B is upper bidiagonal if m >= n and lower bidiagonal if m < n.
DORGBR generates the orthogonal matrices Q and P' from DGEBRD. Note that Q and P are not necessarily square. β¨
DBDSQR computes the singular value decomposition of the bidiagonal matrix B as B = U S V'. It is called three times to compute:
B = U S1 V', whereS1is the diagonal matrix of singular values and the columns of the matricesUandVare the left and right singular vectors, respectively, ofB.- Same as 1), but the singular values are stored in
S2and the singular vectors are not computed. A = (UQ) S (P'V'), the SVD of the original matrixA.
In addition, DBDSQR has an option to apply the left orthogonal matrix U to a matrix X, useful in least squares applications.
DBDSDC computes the singular value decomposition of the bidiagonal matrix B as B = U S V' using divide-and-conquer. It is called twice to compute:
B = U S1 V', whereS1is the diagonal matrix of singular values and the columns of the matricesUandVare the left and right singular vectors, respectively, ofB.- Same as 1), but the singular values are stored in
S2and the singular vectors are not computed.
DBDSVDX computes the singular value decomposition of the bidiagonal matrix B as B = U S V' using bisection and inverse iteration. It is called six times to compute:
B = U S1 V',RANGE='A', whereS1is the diagonal matrix of singular values and the columns of the matricesUandVare the left and right singular vectors, respectively, ofB.- Same as 1), but the singular values are stored in
S2and the singular vectors are not computed. B = U S1 V',RANGE='I', whereS1is the diagonal matrix of singular values and the columns of the matricesUandVare the left and right singular vectors, respectively, ofB.- Same as 3), but the singular values are stored in
S2and the singular vectors are not computed. B = U S1 V',RANGE='V', whereS1is the diagonal matrix of singular values and the columns of the matricesUandVare the left and right singular vectors, respectively, ofB.- Same as 5), but the singular values are stored in
S2and the singular vectors are not computed.
For each pair of matrix dimensions (M,N) and each selected matrix type, an M by N matrix A and an M by NRHS matrix X are generated. The problem dimensions are as follows:
A: M x NQ: M x min(M,N) (but M x M if NRHS > 0)P: min(M,N) x NB: min(M,N) x min(M,N)U, V: min(M,N) x min(M,N)S1, S2 diagonal, order min(M,N)X: M x NRHS
For each generated matrix, 14 tests are performed:
π₯ Test DGEBRD and DORGBR π₯
- (1)
| A - Q B PT | / ( |A| max(M,N) ulp ), PT = P' - (2)
| I - Q' Q | / ( M ulp ) - (3)
| I - PT PT' | / ( N ulp )
π₯ Test DBDSQR on bidiagonal matrix B π₯
- (4)
| B - U S1 VT | / ( |B| min(M,N) ulp ), VT = V' - (5)
| Y - U Z | / ( |Y| max(min(M,N),k) ulp ), whereY = Q' XandZ = U' Y. - (6)
| I - U' U | / ( min(M,N) ulp ) - (7)
| I - VT VT' | / ( min(M,N) ulp ) - (8)
S1containsmin(M,N)nonnegative values in decreasing order. (Return0if true,1/ULPif false.) - (9)
| S1 - S2 | / ( |S1| ulp ), whereS2is computed without computingUandV. - (10)
0if the true singular values ofBare withinTHRESHof those inS1.2*THRESHif they are not. (Tested usingDSVDCH)
π₯ Test DBDSQR on matrix A π₯
- (11)
| A - (QU) S (VT PT) | / ( |A| max(M,N) ulp ) - (12)
| X - (QU) Z | / ( |X| max(M,k) ulp ) - (13)
| I - (QU)'(QU) | / ( M ulp ) - (14)
| I - (VT PT) (PT'VT') | / ( N ulp )
π₯ Test DBDSDC on bidiagonal matrix B π₯
- (15)
| B - U S1 VT | / ( |B| min(M,N) ulp ), VT = V' - (16)
| I - U' U | / ( min(M,N) ulp ) - (17)
| I - VT VT' | / ( min(M,N) ulp ) - (18)
S1containsmin(M,N)nonnegative values in decreasing order. (Return0if true,1/ULPif false.) - (19)
| S1 - S2 | / ( |S1| ulp ), whereS2is computed without computingUandV.
π₯ Test DBDSVDX on bidiagonal matrix B π₯
- (20)
| B - U S1 VT | / ( |B| min(M,N) ulp ), VT = V' - (21)
| I - U' U | / ( min(M,N) ulp ) - (22)
| I - VT VT' | / ( min(M,N) ulp ) - (23)
S1containsmin(M,N)nonnegative values in decreasing order. (Return0if true,1/ULPif false.) - (24)
| S1 - S2 | / ( |S1| ulp ), whereS2is computed without computingUandV. - (25)
| S1 - U' B VT' | / ( |S| n ulp ) DBDSVDX('V', 'I') - (26)
| I - U' U | / ( min(M,N) ulp ) - (27)
| I - VT VT' | / ( min(M,N) ulp ) - (28)
S1containsmin(M,N)nonnegative values in decreasing order. (Return0if true,1/ULPif false.) - (29)
| S1 - S2 | / ( |S1| ulp ), whereS2is computed without computingUandV. - (30)
| S1 - U' B VT' | / ( |S1| n ulp ) DBDSVDX('V', 'V') - (31)
| I - U' U | / ( min(M,N) ulp ) - (32)
| I - VT VT' | / ( min(M,N) ulp ) - (33)
S1containsmin(M,N)nonnegative values in decreasing order. (Return0if true,1/ULPif false.) - (34)
| S1 - S2 | / ( |S1| ulp ), whereS2is computed without computingUandV.
The possible matrix types are:
- (1) The zero matrix.
- (2) The identity matrix.
- (3) A diagonal matrix with evenly spaced entries
1, ..., ULPand random signs. (ULP = (first number larger than 1) - 1) - (4) A diagonal matrix with geometrically spaced entries
1, ..., ULPand random signs. - (5) A diagonal matrix with entries
1, ULP, ..., ULPand random signs. - (6) Same as (3), but multiplied by
SQRT( overflow threshold ) - (7) Same as (3), but multiplied by
SQRT( underflow threshold ) - (8) A matrix of the form
U D V, whereUandVare orthogonal andDhas evenly spaced entries1, ..., ULPwith random signs on the diagonal. - (9) A matrix of the form
U D V, whereUandVare orthogonal andDhas geometrically spaced entries1, ..., ULPwith random signs on the diagonal. - (10) A matrix of the form
U D V, whereUandVare orthogonal andDhas entries1, ULP,..., ULPwith random signs on the diagonal. - (11) Same as (8), but multiplied by
SQRT( overflow threshold ) - (12) Same as (8), but multiplied by
SQRT( underflow threshold ) - (13) Rectangular matrix with random entries chosen from
(-1,1). - (14) Same as (13), but multiplied by
SQRT( overflow threshold ) - (15) Same as (13), but multiplied by
SQRT( underflow threshold ) - (16) Special case: a bidiagonal matrix with random entries chosen from a logarithmic distribution on
[ulp^2,ulp^(-2)](I.e., each entry ise^x, wherexis chosen uniformly on[ 2 log(ulp), -2 log(ulp) ] .) For*this*type:- (a)
DGEBRDis not called to reduce it to bidiagonal form. - (b) the bidiagonal is
min(M,N) x min(M,N); ifM<N, the matrix will be lower bidiagonal, otherwise upper. - (c) only tests
5--8and14are performed.
- (a)
A subset of the full set of matrix types may be selected through the logical array DOTYPE.
π Parameters π
NSIZES
NSIZES is INTEGER
The number of values of M and N contained in the vectors MVAL and NVAL. The matrix sizes are used in pairs (M,N).
MVAL
MVALβMVALis anINTEGER array, dimension (NM). It holds the values of the matrix row dimensionM. πNVALβNVALis anINTEGER array, dimension (NM). It holds the values of the matrix column dimensionN.NTYPESβNTYPESisINTEGER. This is the number of elements inDOTYPE. If it is zero,DCHKBDdoes nothing. It must be at least zero. If it isMAXTYP+1andNSIZESis1, then an additional type,MAXTYP+1, is defined β that one means use whatever matrices are already inAandB. This is only useful ifDOTYPE(1:MAXTYP)is.FALSE.andDOTYPE(MAXTYP+1)is.TRUE.. πDOTYPEβDOTYPEis aLOGICAL array, dimension (NTYPES). IfDOTYPE(j)is.TRUE., then for each size(m,n), a matrix of typejwill be generated. IfNTYPESis smaller than the maximum number of types defined (PARAMETER MAXTYP), then typesNTYPES+1throughMAXTYPwill not be generated. IfNTYPESis larger thanMAXTYP,DOTYPE(MAXTYP+1)throughDOTYPE(NTYPES)will be ignored. π«ΆNRHSβNRHSisINTEGER. This is the number of columns in the matricesX,Y, andZ, used in testingDBDSQR. IfNRHS = 0, then the operations on the right-hand side will not be tested.NRHSmust be at least0.ISEEDβISEEDis anINTEGER array, dimension (4). On entry,ISEEDspecifies the seed of the random number generator. The array elements should be between0and4095; if not, they will be reduced mod4096. Also,ISEED(4)must be odd. The values ofISEEDare changed on exit, and can be used in the next call toDCHKBDto continue the same random number sequence. πTHRESHβTHRESHisDOUBLE PRECISION. This is the threshold value for the test ratios. A result is included in the output file ifRESULT >= THRESH. To have every test ratio printed, useTHRESH = 0. Note that the expected value of the test ratios isO(1), soTHRESHshould be a reasonably small multiple of1, e.g.,10or100. β¨AβAis aDOUBLE PRECISION array, dimension (LDA,NMAX)whereNMAXis the maximum value ofNinNVAL.LDAβLDAisINTEGER. This is the leading dimension of the arrayA.LDA >= max(1,MMAX), whereMMAXis the maximum value ofMinMVAL.BDβBDis aDOUBLE PRECISION array, dimension (max(min(MVAL(j),NVAL(j)))).BEβBEis aDOUBLE PRECISION array, dimension (max(min(MVAL(j),NVAL(j)))).S1βS1is aDOUBLE PRECISION array, dimension (max(min(MVAL(j),NVAL(j)))).S2βS2is aDOUBLE PRECISION array, dimension (max(min(MVAL(j),NVAL(j)))).XβXis aDOUBLE PRECISION array, dimension (LDX,NRHS).LDXβLDXisINTEGER. This is the leading dimension of the arraysX,Y, andZ.LDX >= max(1,MMAX).YβYis aDOUBLE PRECISION array, dimension (LDX,NRHS).ZβZis aDOUBLE PRECISION array, dimension (LDX,NRHS).QβQis aDOUBLE PRECISION array, dimension (LDQ,MMAX).LDQβLDQisINTEGER. This is the leading dimension of the arrayQ.LDQ >= max(1,MMAX).PTβPTis aDOUBLE PRECISION array, dimension (LDPT,NMAX).LDPTβLDPTisINTEGER. This is the leading dimension of the arraysPT,U, andV.LDPT >= max(1, max(min(MVAL(j),NVAL(j)))).UβUis aDOUBLE PRECISION array, dimension (LDPT,max(min(MVAL(j),NVAL(j)))).VTβVTis aDOUBLE PRECISION array, dimension (LDPT,max(min(MVAL(j),NVAL(j)))).WORKβWORKis aDOUBLE PRECISION array, dimension (LWORK).LWORKβLWORKisINTEGER. This is the number of entries inWORK. It must be at least3(M+N)andM(M + max(M,N,k) + 1) + N*min(M,N)for all pairs(M,N)=(MM(j),NN(j)). π₯IWORKβIWORKis anINTEGER array, dimension at least 8*min(M,N).NOUTβNOUTisINTEGER. This is the FORTRAN unit number for printing out error messages (e.g., if a routine returnsIINFOnot equal to0).INFOβINFOisINTEGER. If0, then everything ran OK. π-1:NSIZES < 0-2: SomeMM(j) < 0-3: SomeNN(j) < 0-4:NTYPES < 0-6:NRHS < 0-8:THRESH < 0-11:LDA < 1orLDA < MMAX, whereMMAXismax( MM(j) ).-17:LDB < 1orLDB < MMAX.-21:LDQ < 1orLDQ < MMAX.-23:LDPT< 1orLDPT< MNMAX.-27:LWORKtoo small.
If DLATMR, SLATMS, DGEBRD, DORGBR, or DBDSQR returns an error code, the absolute value of it is returned. π
πΈ Some Local Variables and Parameters πΈ
ZERO,ONEβ Real0and1.MAXTYPβ The number of types defined.NTESTβ The number of tests performed, or which can be performed so far, for the current matrix.MMAXβ Largest value inNN.NMAXβ Largest value inNN.MNMINβmin(MM(j), NN(j))(the dimension of the bidiagonal matrix.)MNMAXβ The maximum value ofMNMINforj=1,...,NSIZES.NFAILβ The number of tests which have exceededTHRESH.COND,IMODEβ Values to be passed to the matrix generators.ANORMβ Norm ofA; passed to matrix generators.OVFL,UNFLβ Overflow and underflow thresholds.RTOVFL,RTUNFLβ Square roots of the previous 2 values.ULP,ULPINVβ Finest relative precision and its inverse.
The following four arrays decode JTYPE: π¦
KTYPE(j)β The general type (1-10) for type .KMODE(j)β TheMODEvalue to be passed to the matrix generator for type .KMAGN(j)β The order of magnitude (O(1),O(overflow^(1/2) ),O(underflow^(1/2) ))
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 489 of file dchkbd.f.
π Author
Generated automatically by Doxygen for LAPACK from the source code.
That's the whole page, bestie β the footer's source/version line points at /home/abui...IG/dchkbd.f(3) and says LAPACK Version 3.12.0. Mwah! πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms