SRC/cspcon.f(3)

πŸ’… SRC/cspcon.f

okay so this is a page from the LAPACK Library Functions Manual, and honestly? it's giving "quietly doing the most important math in the room" energy. bestie, let's get into it 🫢


✨ NAME ✨

SRC/cspcon.f β€” the file that brings you CSPCON, a Fortran subroutine living its best life estimating condition numbers. no cap. 🌸


πŸ¦‹ SYNOPSIS πŸ¦‹

Functions/Subroutines

  • subroutine cspcon (uplo, n, ap, ipiv, anorm, rcond, work, info) β€” that's the one and only CSPCON πŸ‘‘

πŸ‘‘ Function/Subroutine Documentation πŸ‘‘

subroutine cspcon (character uplo, integer n, complex, dimension( * ) ap,
    integer, dimension( * ) ipiv, real anorm, real rcond, complex,
    dimension( * ) work, integer info)

CSPCON β€” say it with me. iconic name. 🌟


πŸŽ€ Purpose πŸŽ€

!> CSPCON estimates the reciprocal of the condition number (in the 1-norm) of a complex symmetric packed matrix A using the factorization A = U*D*U**T or A = L*D*L**T computed by CSPTRF.
!> 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 gets an estimate for norm(inv(A)), then flips it around into RCOND = 1 / (ANORM * norm(inv(A))). math girl summer πŸ’…βœ¨


🌈 Parameters 🌈

  • UPLO
!> UPLO is CHARACTER*1 !> Specifies whether the details of the factorization are stored !> as an upper or lower triangular matrix. !> = 'U': Upper triangular, form is A = U*D*U**T; !> = 'L': Lower triangular, form is A = L*D*L**T.

it's a single character telling you how the factorization got stored β€” upper or lower, pick your fighter. 'U' gives you A = U*D*U**T, 'L' gives you A = L*D*L**T. no in-between, it's not that kind of parameter. πŸ¦‹

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

the order of matrix A. and it's N >= 0, so no negative nonsense please, we're not doing that here. 😭

  • AP
!> AP is COMPLEX array, dimension (N*(N+1)/2) !> The block diagonal matrix D and the multipliers used to !> obtain the factor U or L as computed by CSPTRF, stored as a !> packed triangular matrix.

this is the whole vibe: the block diagonal matrix D plus the multipliers used to get factor U or L, exactly as CSPTRF computed them, all packed into a triangular matrix. dimension is (N*(N+1)/2) β€” packed means packed, bestie, no wasted space. πŸ“

  • IPIV
!> IPIV is INTEGER array, dimension (N) !> Details of the interchanges and the block structure of D !> as determined by CSPTRF.

all the deets on the interchanges and the block structure of D, straight from CSPTRF. dimension (N). iykyk. πŸ”₯

  • ANORM
!> ANORM is REAL !> The 1-norm of the original matrix A.

it's REAL, and it's literally just the 1-norm of the original matrix A. main character energy, no complications. ⭐

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

also REAL. this is the whole point of the routine: the reciprocal of the condition number of A, computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is the estimate of the 1-norm of inv(A) computed right here in this routine. she did that. πŸ’–

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

scratch space, COMPLEX, dimension (2*N). be nice to her, she's just holding your stuff. πŸ’œ

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

the vibes report: 0 means successful exit (slay ✨), and < 0 means if INFO = -i, the i-th argument had an illegal value β€” so πŸ‘€ check your arguments, bestie, that's on you not her.


🧚 Author 🧚

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

four whole institutions, one legendary subroutine. periodt. 🌟


Definition at line 117 of file cspcon.f. πŸŽ€


🌸 Author 🌸

Generated automatically by Doxygen for LAPACK from the source code. (the robots made this page, but the math was human πŸ’…)


and that's the whole page, bestie 🫢 β€” LAPACK, Version 3.12.0, dated, from SRC/cspcon.f(3). go forth and estimate those condition numbers. slay πŸŒˆβœ¨πŸ¦‹

πŸ“¦ where this page comes from