TESTING/EIG/clatm4.f(3)
π TESTING/EIG/clatm4.f(3) π
From the Library Functions Manual, bestie β this page is all about the CLATM4 subroutine. It's giving test-matrix construction realness, so let's go. β¨
π NAME π
TESTING/EIG/clatm4.f
β¨ SYNOPSIS β¨
π Functions/Subroutines π
subroutine clatm4 (itype, n, nz1, nz2, rsign, amagn, rcond, triang,
idist, iseed, a, lda)
CLATM4
π Function/Subroutine Documentation π
subroutine clatm4 (integer itype, integer n, integer nz1, integer nz2,
logical rsign, real amagn, real rcond, real triang, integer idist,
integer, dimension( 4 ) iseed, complex, dimension( lda, * ) a, integer
lda)
CLATM4
π― Purpose π―
Okay so CLATM4 generates basic square matrices, which may later be multiplied by others in order to produce test matrices. The main-character use? It's intended mainly to be used to test the generalized eigenvalue routines. π«Ά
First it generates the diagonal and (possibly) subdiagonal, according to the value of ITYPE, NZ1, NZ2, RSIGN, AMAGN, and RCOND. Then it fills in the upper triangle with random numbers, if TRIANG is non-zero. Slay. π
π§Έ Parameters π§Έ
ITYPEβITYPEisINTEGER. It's the type-of-matrix selector for the diagonal and sub-diagonal. IfITYPE < 0, then typeabs(ITYPE)is generated and then swapped end for end (A(I,J) := A'(N-J,N-I).). See also the description ofAMAGNandRSIGN. π- Special types:
= 0: the zero matrix.= 1: the identity.= 2: a transposed Jordan block.= 3: IfNis odd, then ak+1 x k+1transposed Jordan block followed by ak x kidentity block, wherek=(N-1)/2. IfNis even, thenk=(N-2)/2, and a zero diagonal entry is tacked onto the end.
- Diagonal types. The diagonal consists of
NZ1zeros, thenk=N-NZ1-NZ2nonzeros. The subdiagonal is zero.ITYPEspecifies the nonzero diagonal entries as follows:= 4:1, ..., k= 5:1, RCOND, ..., RCOND= 6:1, ..., 1, RCOND= 7:1, a, a^2, ..., a^(k-1)=RCOND= 8:1, 1-d, 1-2*d, ..., 1-(k-1)*d=RCOND= 9: random numbers chosen from(RCOND,1)= 10: random numbers with distributionIDIST(seeCLARND.)
- Special types:
NβNisINTEGER. The order of the matrix. The size. The moment. π«NZ1βNZ1isINTEGER. Ifabs(ITYPE) > 3, then the firstNZ1diagonal entries will be zero.NZ2βNZ2isINTEGER. Ifabs(ITYPE) > 3, then the lastNZ2diagonal entries will be zero.RSIGNβRSIGNisLOGICAL. It controls the sign/magnitude randomizing vibe:= .TRUE.: The diagonal and subdiagonal entries will be multiplied by random numbers of magnitude1.= .FALSE.: The diagonal and subdiagonal entries will be left as they are (usually non-negative real.)
AMAGNβAMAGNisREAL. The diagonal and subdiagonal entries will be multiplied byAMAGN.RCONDβRCONDisREAL. Ifabs(ITYPE) > 4, then the smallest diagonal entry will beRCOND.RCONDmust be between0and1. No cap.TRIANGβTRIANGisREAL. The entries above the diagonal will be random numbers with magnitude bounded byTRIANG(i.e., random numbers multiplied byTRIANG).IDISTβIDISTisINTEGER. On entry,DISTspecifies the type of distribution to be used to generate a random matrix .= 1: real and imaginary parts eachUNIFORM( 0, 1 )= 2: real and imaginary parts eachUNIFORM( -1, 1 )= 3: real and imaginary parts eachNORMAL( 0, 1 )= 4: complex number uniform inDISK( 0, 1 )
ISEEDβISEEDisINTEGERarray, dimension(4). On entryISEEDspecifies the seed of the random number generator. The values ofISEEDare changed on exit, and can be used in the next call toCLATM4to continue the same random number sequence. Note:ISEED(4)should be odd, for the random number generator used at present. πAβAisCOMPLEXarray, dimension(LDA, N). Array to be computed.LDAβLDAisINTEGER. Leading dimension ofA. Must be at least1and at leastN.
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 169 of file clatm4.f.
π Author π
Generated automatically by Doxygen for LAPACK from the source code.
xoxo bestie π β source/version energy: LAPACK, Version 3.12.0, and the file tag TESTING/EIG/clatm4.f(3). The footer doesn't list a date, so we're not inventing one. Periodt. π
π¦ 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