SRC/spptri.f(3)

✨ SRC/spptri.f(3) ✨

okay so this is a page from the Library Functions Manual and it's literally the glow-up era of your linear algebra life πŸ’… buckle up bestie, we're inverting matrices


πŸ’– NAME πŸ’–

SRC/spptri.f β€” yes that's the whole name, she's lowkey mysterious like that πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

Functions/Subroutines

subroutine spptri (uplo, n, ap, info)

SPPTRI πŸ‘‘ (that's her name, say it with your chest)


🌸 Function/Subroutine Documentation 🌸

subroutine spptri (character uplo, integer n, real, dimension( * ) ap,
    integer info)

SPPTRI ✨ (again, iconic, we love a consistent queen)

πŸŽ€ Purpose:

SPPTRI computes the inverse of a real symmetric positive definite matrix A using the Cholesky factorization A = U**T*U or A = L*L**T computed by SPPTRF.

so basically: you already did the hard part and got your Cholesky factorization from SPPTRF, and now SPPTRI takes that and hands you the inverse πŸ’– fr fr, no cap, that's the whole vibe check.


🫢 Parameters 🫢

UPLO

UPLO is CHARACTER*1
= 'U':  Upper triangular factor is stored in AP;
= 'L':  Lower triangular factor is stored in AP.

she's a CHARACTER*1 and she's picking a side 😭

  • 'U' β€” the upper triangular factor is the one chillin' in AP
  • 'L' β€” nope, it's the lower triangular factor stored in AP

N

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

N is an INTEGER and it's the order of the matrix A. The rule is N >= 0 β€” don't try her with negatives, she will not be normal about it πŸ™ˆ

AP

AP is REAL array, dimension (N*(N+1)/2)
On entry, the triangular factor U or L from the Cholesky
factorization A = U**T*U or A = L*L**T, packed columnwise as
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.

On exit, the upper or lower triangle of the (symmetric)
inverse of A, overwriting the input factor U or L.

okay this one's the main character πŸ’… AP is a REAL array with dimension (N*(N+1)/2).

On entry it's holding the triangular factor U or L from the Cholesky factorization A = U**T*U or A = L*L**T, packed columnwise as a linear array. Here's exactly how the j-th column of U or L sits in AP:

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

On exit, AP becomes the upper or lower triangle of the (symmetric) inverse of A β€” and yes, it straight up overwrites the input factor U or L. say goodbye to the old her, she's gone 😭

INFO

INFO is INTEGER
= 0:  successful exit
< 0:  if INFO = -i, the i-th argument had an illegal value
> 0:  if INFO = i, the (i,i) element of the factor U or L is
      zero, and the inverse could not be computed.

INFO is an INTEGER and she's the group chat read receipt:

  • = 0 β€” successful exit, we ate πŸ”₯
  • < 0 β€” if INFO = -i, the i-th argument had an illegal value πŸ™ˆ
  • > 0 β€” if INFO = i, the (i,i) element of the factor U or L is zero, and the inverse could not be computed πŸ’€
⚠️ bestie pls notice: INFO > 0 literally means a diagonal element of the factor came back zero and the inverse was not computed. that's not a vibe. check your matrix πŸ₯²

πŸ‘‘ Author πŸ‘‘

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

(four whole institutions collaborated on this and honestly? teamwork makes the dream work 🌈)

Definition at line 92 of file spptri.f.


🌟 Author 🌟

Generated automatically by Doxygen for LAPACK from the source code.


so yeah πŸŽ€ that's the whole page. no notes, she's perfect.

and that's a wrap on LAPACK 🫢 Version 3.12.0 πŸ¦‹ from SRC/spptri.f(3) β€” go invert something symmetric positive definite, ily, bye bestie πŸ’œβœ¨πŸ“

πŸ“¦ where this page comes from