SRC/dpoequ.f(3)
π
SRC/dpoequ.f(3) β dpoequ
okay so this is a page out of the Library Functions Manual bestie, and it's literally all about one iconic little subroutine named dpoequ and the exact flavor of math it does. she's from the LAPACK library (Version 3.12.0, if we're being specific π). let's get into it π
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine dpoequ (n, a, lda, s, scond, amax, info)β the one and only,DPOEQUπΈ
π¦ Function/Subroutine Documentation π¦
subroutine dpoequ (integer n, double precision, dimension( lda, * ) a,
integer lda, double precision, dimension( * ) s, double precision scond,
double precision amax, integer info)
DPOEQU β say her name, say it loud π
π Purpose π
!> !> DPOEQU computes row and column scalings intended to equilibrate a !> symmetric positive definite matrix A and reduce its condition number !> (with respect to the two-norm). S contains the scale factors, !> S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with !> elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This !> choice of S puts the condition number of B within a factor N of the !> smallest possible condition number over all possible diagonal > scalings. !>
so basically: she looks at your symmetric positive definite matrix A, and she's like "bestie your condition number is a little loud, let me fix that." she hands you back S, the scale factors, where each S(i) is literally 1/sqrt(A(i,i)) π§ and the whole point is that the scaled matrix B (built from B(i,j) = S(i)*A(i,j)*S(j)) ends up with ones on the diagonal. slay. and that particular choice of S gets the condition number of B within a factor N of the smallest possible condition number over all the possible diagonal scalings. main character energy, no cap π
π Parameters π
NβNisINTEGER. it's the order of the matrixA, andN >= 0. that's it, that's the whole vibe π«ΆAβAisDOUBLE PRECISION array, dimension (LDA,N). theN-by-Nsymmetric positive definite matrix whose scaling factors we're out here computing. heads up tho β only the diagonal elements ofAare referenced. she does not read the rest of the matrix, she's not nosy πLDAβLDAisINTEGER. it's the leading dimension of the arrayA, and it has to beLDA >= max(1,N). non-negotiable, respectfully πSβSisDOUBLE PRECISION array, dimension (N). ifINFO = 0,Scontains the scale factors forA. the stars of the show β¨SCONDβSCONDisDOUBLE PRECISION. ifINFO = 0,Scontains the ratio of the smallestS(i)to the largestS(i). and like β yes, the doc literally saysSthere and notSCOND, that's not me, i'm just the messenger π β anyway: ifSCOND >= 0.1andAMAXis neither too large nor too small, it is not worth scaling byS. so don't bother, save yourself the trouble fr frAMAXβAMAXisDOUBLE PRECISION. it's the absolute value of the largest matrix element. ifAMAXis very close to overflow or very close to underflow, the matrix should be scaled. like. please. do it π₯INFOβINFOisINTEGER. the whole mood report:= 0: successful exit π< 0: ifINFO = -i, thei-th argument had an illegal value π> 0: ifINFO = i, thei-th diagonal element is nonpositive π
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π Definition at line 111 of file dpoequ.f.
π Author (the meta one) π
Generated automatically by Doxygen for LAPACK from the source code. yes, a machine wrote this part. she's still iconic tho π€π
aaand that's the whole page bestie, no notes, ate and left no crumbs π okay but fr β this was LAPACK, Version 3.12.0, and you just read SRC/dpoequ.f(3) ππ
π«Ά iykyk
π¦ 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