SRC/sgbequ.f(3)
π SRC/sgbequ.f β¨
okay bestie, buckle up, because this one is a LAPACK subroutine page and we're gonna make it make sense π«Ά
πΈ SYNOPSIS πΈ
Functions/Subroutines
subroutine sgbequ (m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, info)β the whole vibe, one line. this isSGBEQUπ
π¦ Function/Subroutine Documentation π¦
subroutine sgbequ (integer m, integer n, integer kl, integer ku, real,
dimension( ldab, * ) ab, integer ldab, real, dimension( * ) r, real,
dimension( * ) c, real rowcnd, real colcnd, real amax, integer info)
this is SGBEQU, no cap π
β Purpose
!>!> SGBEQU computes row and column scalings intended to equilibrate an!> M-by-N band matrix A and reduce its condition number. R returns the!> row scale factors and C the column scale factors, chosen to try to!> make the largest element in each row and column of the matrix B with!> elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.!>!> R(i) and C(j) are restricted to be between SMLNUM = smallest safe!> number and BIGNUM = largest safe number. Use of these scaling!> factors is not guaranteed to reduce the condition number of A but!> works well in practice.!>
so like, it takes your band matrix A and tries to make everything chill by scaling rows and columns so the biggest element in each row/col of B (where B(i,j)=R(i)*A(i,j)*C(j), iykyk) has absolute value 1. the scale factors R(i) and C(j) get clamped between SMLNUM (smallest safe number) and BIGNUM (largest safe number). and ngl, it's not guaranteed to reduce the condition number β it just works well in practice. it's giving "trust me bro, empirically" π
π Parameters
MβMisINTEGER. the number of rows of the matrixA, andM >= 0. fr fr, no negative rows bestie.NβNisINTEGER. the number of columns of the matrixA, andN >= 0. same energy πKLβKLisINTEGER. the number of subdiagonals within the band ofA, andKL >= 0.KUβKUisINTEGER. the number of superdiagonals within the band ofA, andKU >= 0.ABβABisREAL array, dimension (LDAB,N). this is the band matrixA, stored in rows1toKL+KU+1. thej-th column ofAlives in thej-th column of the arrayAB, like this:
AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl).
iconic indexing, honestly π
LDABβLDABisINTEGER. the leading dimension of the arrayAB, andLDAB >= KL+KU+1. don't skimp on it πRβRisREAL array, dimension (M). ifINFO = 0, orINFO > M, thenRcontains the row scale factors forA. πCβCisREAL array, dimension (N). ifINFO = 0, thenCcontains the column scale factors forA.ROWCNDβROWCNDisREAL. ifINFO = 0orINFO > M, thenROWCNDcontains the ratio of the smallestR(i)to the largestR(i). and ifROWCND >= 0.1andAMAXis neither too large nor too small, then it's literally not worth scaling byR. skip it β¨COLCNDβCOLCNDisREAL. ifINFO = 0, thenCOLCNDcontains the ratio of the smallestC(i)to the largestC(i). ifCOLCND >= 0.1, it's not worth scaling byC. periodt.AMAXβAMAXisREAL. absolute value of the largest matrix element. ifAMAXis very close to overflow or very close to underflow, the matrix should be scaled. like, that's your sign π¨INFOβINFOisINTEGER, and it's the vibe check:= 0: successful exit π< 0: ifINFO = -i, thei-th argument had an illegal value π> 0: ifINFO = i, andiis:<= M: thei-th row ofAis exactly zero> M: the(i-M)-th column ofAis exactly zero
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 151 of file sgbequ.f.
π Author (the meta one)
Generated automatically by Doxygen for LAPACK from the source code.
okay that's the whole page bestie, you ate that πβ¨ this cutie was brought to you by LAPACK, Version 3.12.0, dated SRC/sgbequ.f(3) β mwah, go scale some matrices responsibly π§π
π¦ 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