pocon(3)

πŸ’… pocon(3) β€” the LAPACK condition-number page

okay so bestie, this is pocon β€” pocon: condition number estimate β€” and it lives in the Library Functions Manual. it's a whole little family of four LAPACK routines that estimate how hecked-up (technically: how ill-conditioned) your matrix is. let's get into it ✨


🌸 SYNOPSIS 🌸

✨ Functions

  • subroutine cpocon (uplo, n, a, lda, anorm, rcond, work, rwork, info) β€” CPOCON
  • subroutine dpocon (uplo, n, a, lda, anorm, rcond, work, iwork, info) β€” DPOCON
  • subroutine spocon (uplo, n, a, lda, anorm, rcond, work, iwork, info) β€” SPOCON
  • subroutine zpocon (uplo, n, a, lda, anorm, rcond, work, rwork, info) β€” ZPOCON

πŸ¦‹ Detailed Description

ok so the detailed detailed stuff is all down in Function Documentation below πŸ‘‡ that's where the real tea is.


πŸŽ€ Function Documentation πŸŽ€

πŸ’– subroutine cpocon (character uplo, integer n, complex, dimension( lda, * ) a, integer lda, real anorm, real rcond, complex, dimension( * ) work, real, dimension( * ) rwork, integer info)

CPOCON

🌟 Purpose:

!>
!> CPOCON estimates the reciprocal of the condition number (in the
!> 1-norm) of a complex Hermitian positive definite matrix using the
!> Cholesky factorization A = U**H*U or A = L*L**H computed by CPOTRF.
!>
!> An estimate is obtained for norm(inv(A)), and the reciprocal of the
!> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
!>

like, translate: it takes your Cholesky factor from CPOTRF and gives you back a reciprocal condition number. reciprocal = "bigger number means better-behaved matrix", so don't panic when small numbers show up πŸ’€

🧚 Parameters

UPLO

!>          UPLO is CHARACTER*1
!>          = 'U':  Upper triangle of A is stored;
!>          = 'L':  Lower triangle of A is stored.
!>

N

!>          N is INTEGER
!>          The order of the matrix A.  N >= 0.
!>

A

!>          A is COMPLEX array, dimension (LDA,N)
!>          The triangular factor U or L from the Cholesky factorization
!>          A = U**H*U or A = L*L**H, as computed by CPOTRF.
!>

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,N).
!>

ANORM

!>          ANORM is REAL
!>          The 1-norm (or infinity-norm) of the Hermitian matrix A.
!>

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.
!>

WORK

!>          WORK is COMPLEX array, dimension (2*N)
!>

RWORK

!>          RWORK is REAL array, dimension (N)
!>

INFO

!>          INFO is INTEGER
!>          = 0:  successful exit
!>          < 0:  if INFO = -i, the i-th argument had an illegal value
!>

πŸ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

Definition at line 119 of file cpocon.f.


πŸ’œ subroutine dpocon (character uplo, integer n, double precision, dimension( lda, * ) a, integer lda, double precision anorm, double precision rcond, double precision, dimension( * ) work, integer, dimension( * ) iwork, integer info)

DPOCON

🌟 Purpose:

!>
!> DPOCON estimates the reciprocal of the condition number (in the
!> 1-norm) of a real symmetric positive definite matrix using the
!> Cholesky factorization A = U**T*U or A = L*L**T computed by DPOTRF.
!>
!> An estimate is obtained for norm(inv(A)), and the reciprocal of the
!> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
!>

double precision, real symmetric, DPOTRF factor. same energy, different float type. slay πŸ’…

🧚 Parameters

UPLO

!>          UPLO is CHARACTER*1
!>          = 'U':  Upper triangle of A is stored;
!>          = 'L':  Lower triangle of A is stored.
!>

N

!>          N is INTEGER
!>          The order of the matrix A.  N >= 0.
!>

A

!>          A is DOUBLE PRECISION array, dimension (LDA,N)
!>          The triangular factor U or L from the Cholesky factorization
!>          A = U**T*U or A = L*L**T, as computed by DPOTRF.
!>

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,N).
!>

ANORM

!>          ANORM is DOUBLE PRECISION
!>          The 1-norm (or infinity-norm) of the symmetric matrix A.
!>

RCOND

!>          RCOND is DOUBLE PRECISION
!>          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.
!>

WORK

!>          WORK is DOUBLE PRECISION array, dimension (3*N)
!>

IWORK

!>          IWORK is INTEGER array, dimension (N)
!>

INFO

!>          INFO is INTEGER
!>          = 0:  successful exit
!>          < 0:  if INFO = -i, the i-th argument had an illegal value
!>

πŸ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

Definition at line 119 of file dpocon.f.


πŸ’™ subroutine spocon (character uplo, integer n, real, dimension( lda, * ) a, integer lda, real anorm, real rcond, real, dimension( * ) work, integer, dimension( * ) iwork, integer info)

SPOCON

🌟 Purpose:

!>
!> SPOCON estimates the reciprocal of the condition number (in the
!> 1-norm) of a real symmetric positive definite matrix using the
!> Cholesky factorization A = U**T*U or A = L*L**T computed by SPOTRF.
!>
!> An estimate is obtained for norm(inv(A)), and the reciprocal of the
!> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
!>

single precision twin of DPOCON, but it's SPOTRF doing the factorization. iconic 🌈

🧚 Parameters

UPLO

!>          UPLO is CHARACTER*1
!>          = 'U':  Upper triangle of A is stored;
!>          = 'L':  Lower triangle of A is stored.
!>

N

!>          N is INTEGER
!>          The order of the matrix A.  N >= 0.
!>

A

!>          A is REAL array, dimension (LDA,N)
!>          The triangular factor U or L from the Cholesky factorization
!>          A = U**T*U or A = L*L**T, as computed by SPOTRF.
!>

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,N).
!>

ANORM

!>          ANORM is REAL
!>          The 1-norm (or infinity-norm) of the symmetric matrix A.
!>

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.
!>

WORK

!>          WORK is REAL array, dimension (3*N)
!>

IWORK

!>          IWORK is INTEGER array, dimension (N)
!>

INFO

!>          INFO is INTEGER
!>          = 0:  successful exit
!>          < 0:  if INFO = -i, the i-th argument had an illegal value
!>

πŸ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

Definition at line 119 of file spocon.f.


πŸ’› subroutine zpocon (character uplo, integer n, complex*16, dimension( lda, * ) a, integer lda, double precision anorm, double precision rcond, complex*16, dimension( * ) work, double precision, dimension( * ) rwork, integer info)

ZPOCON

🌟 Purpose:

!>
!> ZPOCON estimates the reciprocal of the condition number (in the
!> 1-norm) of a complex Hermitian positive definite matrix using the
!> Cholesky factorization A = U**H*U or A = L*L**H computed by ZPOTRF.
!>
!> An estimate is obtained for norm(inv(A)), and the reciprocal of the
!> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
!>

the double-precision complex one, ZPOTRF factor, Hermitian, conjugate-transpose everywhere. main character energy tbh 🫢

🧚 Parameters

UPLO

!>          UPLO is CHARACTER*1
!>          = 'U':  Upper triangle of A is stored;
!>          = 'L':  Lower triangle of A is stored.
!>

N

!>          N is INTEGER
!>          The order of the matrix A.  N >= 0.
!>

A

!>          A is COMPLEX*16 array, dimension (LDA,N)
!>          The triangular factor U or L from the Cholesky factorization
!>          A = U**H*U or A = L*L**H, as computed by ZPOTRF.
!>

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,N).
!>

ANORM

!>          ANORM is DOUBLE PRECISION
!>          The 1-norm (or infinity-norm) of the Hermitian matrix A.
!>

RCOND

!>          RCOND is DOUBLE PRECISION
!>          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.
!>

WORK

!>          WORK is COMPLEX*16 array, dimension (2*N)
!>

RWORK

!>          RWORK is DOUBLE PRECISION array, dimension (N)
!>

INFO

!>          INFO is INTEGER
!>          = 0:  successful exit
!>          < 0:  if INFO = -i, the i-th argument had an illegal value
!>

πŸ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

Definition at line 119 of file zpocon.f.


πŸ’€ Author

Generated automatically by Doxygen for LAPACK from the source code.


⚠️ bestie note: these are estimates of the reciprocal condition number, and RCOND is the reciprocal β€” so a tiny RCOND means your matrix is sus and your solutions are gonna be noisy. that's not me being dramatic, that's literally what "reciprocal of the condition number" means 😭

that's the whole page!! auto-generated by Doxygen for LAPACK from the source code, LAPACK Version 3.12.0, dated with pocon(3) in the footer β€” mwah πŸ’‹ go be well-conditioned, ily πŸŽ€βœ¨

πŸ“¦ where this page comes from