SRC/csptri.f(3)

πŸ’… SRC/csptri.f β€” a.k.a. the LAPACK library functions manual page

okay so bestie, buckle up, because this is the SRC/csptri.f page and it's literally the manual for one (1) extremely specific Fortran subroutine. no cap, it's giving "niche but iconic" πŸ’–


✨ SYNOPSIS ✨

Functions/Subroutines

  • subroutine csptri (uplo, n, ap, ipiv, work, info) β€” the one and only, the main character herself: CSPTRI πŸŽ€

πŸ¦‹ Function/Subroutine Documentation πŸ¦‹

subroutine csptri (character uplo, integer n, complex, dimension( * ) ap,
    integer, dimension( * ) ipiv, complex, dimension( * ) work, integer
    info)

πŸ’« CSPTRI

🌸 Purpose:

!>
!> CSPTRI computes the inverse of a complex symmetric indefinite matrix
!> A in packed storage using the factorization A = U*D*U**T or
!> A = L*D*L**T computed by CSPTRF.
!>

so like, short version: CSPTRI inverts a complex symmetric indefinite matrix A that's chillin' in packed storage. it works off the factorization A = U*D*U**T or A = L*D*L**T that CSPTRF already handed you. that's the whole vibe. ✨


πŸŽ€ 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.
!>

UPLO is a CHARACTER*1, and it's basically the "which way is this triangle pointing" switch 🫢:

  • 'U' β€” upper triangular, form is A = U*D*U**T
  • 'L' β€” lower triangular, form is A = L*D*L**T

N

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

N is an INTEGER and it's the order of matrix A. the rule is N >= 0 β€” zero is allowed, negative is not the move πŸ™ˆ

AP

!>          AP is COMPLEX array, dimension (N*(N+1)/2)
!>          On entry, 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.
!>
!>          On exit, if INFO = 0, the (symmetric) inverse of the original
!>          matrix, stored as a packed triangular matrix. The j-th column
!>          of inv(A) is stored in the array AP as follows:
!>          if UPLO = 'U', AP(i + (j-1)*j/2) = inv(A)(i,j) for 1<=i<=j;
!>          if UPLO = 'L',
!>             AP(i + (j-1)*(2n-j)/2) = inv(A)(i,j) for j<=i<=n.
!>

AP is a COMPLEX array, dimension (N*(N+1)/2). it's got two whole personalities depending on when you look at it πŸ‘€:

On entry β€” it holds the block diagonal matrix D plus the multipliers used to get the factor U or L, exactly as computed by CSPTRF, all stored as a packed triangular matrix.

On exit β€” if INFO = 0, it's serving the (symmetric) inverse of the original matrix, still packed as a triangular matrix. the j-th column of inv(A) lands in AP like this:

  • if UPLO = 'U', then AP(i + (j-1)*j/2) = inv(A)(i,j) for 1<=i<=j
  • if UPLO = 'L', then AP(i + (j-1)*(2n-j)/2) = inv(A)(i,j) for j<=i<=n

like, the indexing math is doing the most, but she's slaying it πŸ’…

IPIV

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

IPIV is an INTEGER array, dimension (N). it carries the deets on the interchanges and the block structure of D, as determined by CSPTRF. iykyk 🧚

WORK

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

WORK is a COMPLEX array, dimension (N). it's the workspace. it shows up, does its job, no notes. πŸ“

INFO

!>          INFO is INTEGER
!>          = 0: successful exit
!>          < 0: if INFO = -i, the i-th argument had an illegal value
!>          > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
!>               inverse could not be computed.
!>

INFO is an INTEGER and it's the vibe check at the end πŸ’€:

  • = 0 β€” successful exit, we ate πŸ”₯
  • < 0 β€” if INFO = -i, the i-th argument had an illegal value
  • > 0 β€” if INFO = i, then D(i,i) = 0; the matrix is singular and its inverse could not be computed 😭
ngl, that last one is a real heartbreak. singular matrix = no inverse = no slay. don't say I didn't warn you.

πŸ‘‘ Author

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

Definition at line 108 of file csptri.f.


🌈 Author (yes, again πŸ’œ)

Generated automatically by Doxygen for LAPACK from the source code. not a human, just a very diligent little document generator doing her thing ✨


kisses and good luck with your packed storage, bestie β€” this was LAPACK Version 3.12.0, page SRC/csptri.f(3), signing off πŸ«ΆπŸ’–

πŸ“¦ where this page comes from