CLATM4(3)
CLATM4(3) π β¨
okay so bestie, this one lives in the Library Functions Manual section (the (3) at the end of the name is literally the whole vibe check for "this is a library function"), and it's a Fortran subroutine out of LAPACK. Buckle up π
πΈ NAME πΈ
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/EIG/clatm4.f
like, that's the literal file, no cap. it's a Fortran source file, the whole page is about it π«Ά
β¨ 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:
CLATM4 generates basic square matrices, which may later be multiplied by others in order to produce test matrices. It is intended mainly to be used to test the generalized eigenvalue routines.
It first generates the diagonal and (possibly) subdiagonal, according to the value ofITYPE,NZ1,NZ2,RSIGN,AMAGN, andRCOND. It then fills in the upper triangle with random numbers, ifTRIANGis non-zero.
so basically: it builds you a starter matrix, then (maybe) sprinkles random numbers all over the upper triangle. main character energy for test suites π₯
π Parameters
ITYPEβITYPE is INTEGER. This is the type of matrix you want on the diagonal and sub-diagonal. And listen, the negative-number thing is kinda iconic:
If ITYPE < 0, then type abs(ITYPE) is generated and then swapped end for end (A(I,J) := A'(N-J,N-I).). See also the description of AMAGN and RSIGN π«
Special types, bestie, memorize these:
= 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 NZ1 zeros, then k=N-NZ1-NZ2 nonzeros. The subdiagonal is zero. ITYPE specifies the nonzero diagonal entries like this:
= 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.)
NβN is INTEGER. The order of the matrix. that's it, that's the whole thing πNZ1βNZ1 is INTEGER. Ifabs(ITYPE) > 3, then the firstNZ1diagonal entries will be zero.NZ2βNZ2 is INTEGER. Ifabs(ITYPE) > 3, then the lastNZ2diagonal entries will be zero.RSIGNβRSIGN is LOGICAL. Two moods:= .TRUE.: The diagonal and subdiagonal entries will be multiplied by random numbers of magnitude 1.= .FALSE.: The diagonal and subdiagonal entries will be left as they are (usually non-negative real.)
AMAGNβAMAGN is REAL. The diagonal and subdiagonal entries will be multiplied byAMAGN. it's giving "scale everything" πRCONDβRCOND is REAL. Ifabs(ITYPE) > 4, then the smallest diagonal entry will beRCOND.RCONDmust be between 0 and 1. βTRIANGβTRIANG is REAL. The entries above the diagonal will be random numbers with magnitude bounded byTRIANG(i.e., random numbers multiplied byTRIANG).IDISTβIDIST is INTEGER. On entry,DISTspecifies the type of distribution to be used to generate a random matrix . (yes the original saysDIST, we're all just vibing with it π)= 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βISEED is INTEGER array, 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. don't skip this, bestie, the RNG is picky π
AβA is COMPLEX array, dimension (LDA, N). Array to be computed. the actual output, the main event β¨LDAβLDA is INTEGER. Leading dimension ofA. Must be at least 1 and 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.
and that's the page, babe π«Ά this whole thing was generated automatically by Doxygen for LAPACK straight from the source code β LAPACK, Version 3.12.0, and the file was /home/abui...IG/clatm4.f(3). slay, go build some test matrices π
π¦ 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