SRC/cppcon.f(3)
π SRC/cppcon.f
okay bestie, so this is a Fortran manpage from LAPACK, manual name LAPACK β yes, the big linear algebra library, we stan. Today's main character is cppcon, a lil subroutine that β¨estimatesβ¨ how badly-conditioned your matrix is. Let's get into it π
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine cppcon (uplo, n, ap, anorm, rcond, work, rwork, info)β the one and only CPPCON π«Ά
πΈ Function/Subroutine Documentation πΈ
subroutine cppcon (character uplo, integer n, complex, dimension( * ) ap,
real anorm, real rcond, complex, dimension( * ) work, real, dimension( *
) rwork, integer info)
CPPCON π
Purpose:
!>
!> CPPCON estimates the reciprocal of the condition number (in the
!> 1-norm) of a complex Hermitian positive definite packed matrix using
!> the Cholesky factorization A = U**H*U or A = L*L**H computed by
!> CPPTRF.
!>
!> An estimate is obtained for norm(inv(A)), and the reciprocal of the
!> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
!>
so basically πββοΈ it looks at the Cholesky factorization that CPPTRF already made and goes "hmm, how close to trouble are we?" β then hands you the reciprocal of the condition number. it's giving main character energy but for numerical stability.
π¦ Parameters π¦
UPLO
!> UPLO is CHARACTER*1
!> = 'U': Upper triangle of A is stored;
!> = 'L': Lower triangle of A is stored.
!>
CHARACTER*1 bestie. 'U' means the upper triangle of A is what's stored, 'L' means the lower triangle. pick one, no cap π
N
!> N is INTEGER
!> The order of the matrix A. N >= 0.
!>
it's an INTEGER, it's the order of the matrix A, and it's gotta be N >= 0. non-negotiable β¨
AP
!> AP is COMPLEX array, dimension (N*(N+1)/2)
!> The triangular factor U or L from the Cholesky factorization
!> A = U**H*U or A = L*L**H, packed columnwise in a linear
!> array. The j-th column of U or L is stored in the array AP
!> as follows:
!> if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
!> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
!>
a COMPLEX array, dimension (N*(N+1)/2) β yes, packed, columnwise, in a linear array. it's the triangular factor U or L from the Cholesky factorization A = U**H*U or A = L*L**H. the j-th column of U or L lives in AP like this:
- if
UPLO = 'U':AP(i + (j-1)*j/2) = U(i,j)for1<=i<=j - if
UPLO = 'L':AP(i + (j-1)*(2n-j)/2) = L(i,j)forj<=i<=n
the indexing math is giving iconic but unhinged, iykyk π§
ANORM
!> ANORM is REAL
!> The 1-norm (or infinity-norm) of the Hermitian matrix A.
!>
REAL. it's the 1-norm (or infinity-norm) of the Hermitian matrix A. slay.
RCOND
!> RCOND is REAL
!> The reciprocal of the condition number of the matrix A,
!> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
!> estimate of the 1-norm of inv(A) computed in this routine.
!>
REAL, and this is the output bestie π β the reciprocal of the condition number of the matrix A, computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an estimate of the 1-norm of inv(A) computed right here in this routine. obsessed.
WORK
!> WORK is COMPLEX array, dimension (2*N)
!>
workspace, COMPLEX array, dimension (2*N). just vibes π«Ά
RWORK
!> RWORK is REAL array, dimension (N)
!>
more workspace, REAL array, dimension (N). also just vibes πΈ
INFO
!> INFO is INTEGER
!> = 0: successful exit
!> < 0: if INFO = -i, the i-th argument had an illegal value
!>
INTEGER, the vibe check of the whole operation:
= 0: successful exit π we ate< 0: ifINFO = -i, the i-th argument had an illegal value π somebody passed a bad arg
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
absolute legends, all of them π
Definition at line 117 of file cppcon.f.
π Author
Generated automatically by Doxygen for LAPACK from the source code. (not a human, just a robot doing its lil thing π€β¨)
that's the whole page bestie β go forth and estimate those condition numbers π
LAPACK β Version 3.12.0 β SRC/cppcon.f(3) π mwah, ily, bye π«Ά
π¦ 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