TESTING/MATGEN/dlatm6.f(3)
β¨ TESTING/MATGEN/dlatm6.f β¨
okay bestie, so this is a total gem from the LAPACK crew β it's literally a whole Fortran file that generates test matrices for the generalized eigenvalue problem π it's giving "math girlie goes to the matrix gym" and honestly? obsessed. no cap, it's iconic for testing eigenvalue stuff. iykyk π
πΈ SYNOPSIS πΈ
Functions/Subroutines
subroutine dlatm6 (type, n, a, lda, b, x, ldx, y, ldy, alpha, beta, wx,
wy, s, dif)
that's the whole signature, bestie β it's a subroutine called DLATM6 and it takes a lot of arguments. don't panic, we're gonna walk through every single one π
π¦ Function/Subroutine Documentation π¦
subroutine dlatm6 (integer type, integer n, double precision, dimension(
lda, * ) a, integer lda, double precision, dimension( lda, * ) b, double
precision, dimension( ldx, * ) x, integer ldx, double precision,
dimension( ldy, * ) y, integer ldy, double precision alpha, double
precision beta, double precision wx, double precision wy, double
precision, dimension( * ) s, double precision, dimension( * ) dif)
β¨ Purpose β¨
okay so here's the tea: DLATM6 generates test matrices for the generalized eigenvalue problem, plus their corresponding right and left eigenvector matrices, and also reciprocal condition numbers for all eigenvalues and the reciprocal condition numbers of eigenvectors corresponding to the 1th and 5th eigenvalues. it's giving "overachiever" and we love that for it πβ¨
π Test Matrices π
there are two kinds of test matrix pairs:
(A, B) = inverse(YH) * (Da, Db) * inverse(X)
these are used in the tests β periodt.
Type 1:
Da = 1+a 0 0 0 0 Db = 1 0 0 0 0
0 2+a 0 0 0 0 1 0 0 0
0 0 3+a 0 0 0 0 1 0 0
0 0 0 4+a 0 0 0 0 1 0
0 0 0 0 5+a , 0 0 0 0 1 , and
Type 2:
Da = 1 -1 0 0 0 Db = 1 0 0 0 0
1 1 0 0 0 0 1 0 0 0
0 0 1 0 0 0 0 1 0 0
0 0 0 1+a 1+b 0 0 0 1 0
0 0 0 -1-b 1+a , 0 0 0 0 1 .
in both cases the same inverse(YH) and inverse(X) are used to compute (A, B), giving the exact eigenvectors to (A,B) as (YH, X):
YH: = 1 0 -y y -y X = 1 0 -x -x x
0 1 -y y -y 0 1 x -x -x
0 0 1 0 0 0 0 1 0 0
0 0 0 1 0 0 0 0 1 0
0 0 0 0 1, 0 0 0 0 1 ,
where a, b, x and y will have all values independently of each other. no cap, they're all free agents living their best lives π¦
π Parameters π
TYPEβTYPE is INTEGER. Specifies the problem type (see further details). it's giving "pick your fighter" πNβN is INTEGER. Size of the matricesAandB. lowkey the main character dimension ngl πAβA is DOUBLE PRECISION array, dimension (LDA, N). On exitAN-by-N is initialized according toTYPE. she gets filled in on the way out, slay β¨LDAβLDA is INTEGER. The leading dimension ofAand ofB. it's the boss of both, fr frBβB is DOUBLE PRECISION array, dimension (LDA, N). On exitBN-by-N is initialized according toTYPE. same energy asA, iconic πXβX is DOUBLE PRECISION array, dimension (LDX, N). On exitXis the N-by-N matrix of right eigenvectors. right eigenvectors are literally main character energy πLDXβLDX is INTEGER. The leading dimension ofX. yes bestie, another leading dimension, we stay hydrated π§YβY is DOUBLE PRECISION array, dimension (LDY, N). On exitYis the N-by-N matrix of left eigenvectors. left eigenvectors said "we're here too" πLDYβLDY is INTEGER. The leading dimension ofY. third leading dimension of the day, we love consistency πΈALPHAβALPHA is DOUBLE PRECISION. just vibes, it's a double precision scalar β¨BETAβBETA is DOUBLE PRECISION. Weighting constants for matrixA. okay so bothALPHAandBETAare weighting constants for matrixAβ they're a duo, a package deal πWXβWX is DOUBLE PRECISION. Constant for right eigenvector matrix. holding it down for the right side π«ΆWYβWY is DOUBLE PRECISION. Constant for left eigenvector matrix. the left side's ride or die βSβS is DOUBLE PRECISION array, dimension (N).S(i)is the reciprocal condition number for eigenvaluei. literally tracking how well-conditioned each eigenvalue is, no big deal πDIFβDIF is DOUBLE PRECISION array, dimension (N).DIF(i)is the reciprocal condition number for eigenvectori. same but for eigenvectors β it's giving "we contain multitudes" π₯
bestie reminder: all these !> lines in the original are Doxygen comment markers β that's just how the source code documents itself, it's not something you type. iykyk π§
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
the whole academic squad came together for this one β collaborative queens πβ¨
Definition at line 174 of file dlatm6.f.
π Author (of this page) π
Generated automatically by Doxygen for LAPACK from the source code.
and that's the whole page, bestie! π
this was LAPACK β Version 3.12.0 β all auto-generated by Doxygen from the source code, and it's literally so cunty of them to document everything this thoroughly. 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