SRC/dgtcon.f(3)
π NAME
SRC/dgtcon.f β bestie, this is the Fortran file that gives you DGTCON, the routine that tells you how close your real tridiagonal matrix is to being a hot mess (numerically speaking). It's a library function page, so buckle up π
β¨ SYNOPSIS
Functions/Subroutines
subroutine dgtcon (norm, n, dl, d, du, du2, ipiv, anorm, rcond, work,
iwork, info)
DGTCON π
π¦ Function/Subroutine Documentation
subroutine dgtcon (character norm, integer n, double precision, dimension( * )
dl, double precision, dimension( * ) d, double precision, dimension( * )
du, double precision, dimension( * ) du2, integer, dimension( * )
ipiv, double precision anorm, double precision rcond, double precision,
dimension( * ) work, integer, dimension( * ) iwork, integer info)
DGTCON β yes, same name again, it's iconic like that β¨
πΈ Purpose
okay so straight from the source, bestie:
!>
!> DGTCON estimates the reciprocal of the condition number of a real
!> tridiagonal matrix A using the LU factorization as computed by
!> DGTTRF.
!>
!> An estimate is obtained for norm(inv(A)), and the reciprocal of the
!> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
!>
Translation: it takes the LU factorization that DGTTRF already did for you (no cap, that's a whole other routine) and uses it to vibe-check how ill-conditioned your matrix A is. It estimates norm(inv(A)), then does the math RCOND = 1 / (ANORM * norm(inv(A))). That's it, that's the whole personality π
π Parameters
NORMβCHARACTER*1π tells it which condition number flavor you want:= '1'or'O'for the 1-norm;= 'I'for the Infinity-norm. Pick your fighter.NβINTEGER, the order of the matrix A. Constraint:N >= 0. Zero-sized matrices are valid, she contains multitudes π«ΆDLβDOUBLE PRECISION array, dimension (N-1). The(n-1)multipliers that define the matrix L from the LU factorization of A as computed byDGTTRF.DβDOUBLE PRECISION array, dimension (N). Thendiagonal elements of the upper triangular matrix U, again from the LU factorization of A.DUβDOUBLE PRECISION array, dimension (N-1). The(n-1)elements of the first superdiagonal of U. Yes, superdiagonal. She's above the diagonal, slay.DU2βDOUBLE PRECISION array, dimension (N-2). The(n-2)elements of the second superdiagonal of U. One more level up, main character energy πIPIVβINTEGER array, dimension (N). The pivot indices: for1 <= i <= n, row i of the matrix was interchanged with rowIPIV(i).IPIV(i)will always be eitheriori+1; andIPIV(i) = imeans no row interchange was required (she stayed put π).ANORMβDOUBLE PRECISION. IfNORM = '1'or'O', this is the 1-norm of the original matrix A. IfNORM = 'I', it's the infinity-norm of the original matrix A. Context matters, bestie.RCONDβDOUBLE PRECISION. The reciprocal of the condition number of the matrix A, computed asRCOND = 1/(ANORM * AINVNM), whereAINVNMis an estimate of the 1-norm ofinv(A)computed in this routine. That's the whole output, and she's lowkey the point of the entire function πWORKβDOUBLE PRECISION array, dimension (2*N). Scratch space. Don't ask questions, just hand her2*Ndoubles.IWORKβINTEGER array, dimension (N). More scratch space, integer flavored this time.INFOβINTEGER. The receipts:= 0: successful exit π< 0: ifINFO = -i, the i-th argument had an illegal value π
fr fr checkINFObefore you trustRCOND, okay? AnINFO < 0means somebody passed a bad argument and nothing is guaranteed. Not me being dramatic, that's just what it says.
π§ Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 144 of file dgtcon.f.
Author: Generated automatically by Doxygen for LAPACK from the source code.
π psst: this whole page was auto-generated by Doxygen for LAPACK from the source code, so if you see a typo, blame the machine, not me π
okay bye bestie, go forth and condition your numbers πβ¨π This was SRC/dgtcon.f(3), tagged LAPACK Version 3.12.0 in the footer β no date on the tin, just the version, and honestly she ate π¦
π¦ 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