SRC/chptri.f(3)

🌸 SRC/chptri.f β€” from the Library Functions Manual πŸ’…

okay bestie, sit down, we're doing linear algebra today ✨ this is a page out of the Library Functions Manual, and honestly? she's iconic. it's SRC/chptri.f, and she inverts complex Hermitian indefinite matrices. yes, that kind. no cap, she ate. πŸ”₯


✨ SYNOPSIS ✨

Functions/Subroutines

subroutine chptri (uplo, n, ap, ipiv, work, info)

CHPTRI β€” that's the whole name, she's lowkey mysterious like that πŸŽ€


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

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

CHPTRI β€” here's her whole deal πŸ‘‘

πŸ’œ Purpose:

CHPTRI computes the inverse of a complex Hermitian indefinite matrix A in packed storage using the factorization A = U*D*U**H or A = L*D*L**H computed by CHPTRF.

so basically: CHPTRF did the hard part (the factorization), and CHPTRI comes in and flips it into an inverse. it's giving "I'll finish what you started" main character energy πŸ’…

πŸŽ€ Parameters πŸŽ€

  • UPLO β€” UPLO is CHARACTER*1. tells us whether the factorization details are stored as an upper or lower triangular matrix, iykyk:
    • = 'U': upper triangular, form is A = U*D*U**H;
    • = 'L': lower triangular, form is A = L*D*L**H.
  • N β€” N is INTEGER. the order of the matrix A. and the vibe check is N >= 0 (if N is negative, that's a no from her πŸ™ˆ).
  • AP β€” AP is COMPLEX array, dimension (N*(N+1)/2). okay so on entry, this holds the block diagonal matrix D and the multipliers used to obtain the factor U or L as computed by CHPTRF, stored as a packed triangular matrix. on exit, if INFO = 0, you get the (Hermitian) inverse of the original matrix, stored as a packed triangular matrix. the j-th column of inv(A) is stored in the array AP like this:
    • 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.

literally copy those index formulas exactly, bestie, they are not vibes-based 🫢

  • IPIV β€” IPIV is INTEGER array, dimension (N). the details of the interchanges and the block structure of D, as determined by CHPTRF. she got receipts πŸ’€
  • WORK β€” WORK is COMPLEX array, dimension (N). scratch space, she's just there to help 🌸
  • INFO β€” INFO is INTEGER. the outcome, the moment of truth:
    • = 0: successful exit πŸŽ‰ slay;
    • < 0: if INFO = -i, the i-th argument had an illegal value (you gave her something cursed 😭);
    • > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its inverse could not be computed. she literally cannot, the math does not exist πŸ’€
fr fr, if you see INFO > 0 don't come for her β€” the matrix was singular. it's not her fault. πŸ₯²

πŸ‘‘ Author

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

⭐ Definition

Definition at line 108 of file chptri.f.


🌈 Author (again, the meta one)

Generated automatically by Doxygen for LAPACK from the source code. yeah, she was born from a machine, and she's still iconic 🧚


LAPACK Β· Version 3.12.0 Β· SRC/chptri.f(3)

and that's the whole page, bestie β€” go invert something Hermitian, drink some water, and remember: packed storage is just storage with ✨aura✨. mwah πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from