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) for 1<=i<=j
  • if UPLO = 'L': AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=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: if INFO = -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