ZHPTRI(3)
π ZHPTRI(3) β like, the LAPACK packed-Hermitian-inverse girlies' manual π
okay bestie, pull up a chair π this one lives in the LAPACK library β it's a Fortran source file, zhptri.f, straight out of the build tree at /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/zhptri.f. that's the NAME section, and yes it's literally just a path, we love a low-effort moment π
β¨ SYNOPSIS β¨
π«Ά Functions/Subroutines
subroutine ZHPTRI (uplo, n, ap, ipiv, work, info)
ZHPTRI β that's her. that's the main character π
πΈ Function/Subroutine Documentation πΈ
subroutine ZHPTRI (character uplo, integer n, complex*16, dimension( * ) ap,
integer, dimension( * ) ipiv, complex*16, dimension( * ) work, integer
info)
ZHPTRI. iconic. no notes. β¨
π¦ Purpose
!>!> ZHPTRI 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 ZHPTRF.!>
like, she takes the factorization that ZHPTRF already did and flips it into an actual inverse. no cap, that's the whole job π«‘
π 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**H;!> = 'L': Lower triangular, form is A = L*D*L**H.!>
one character, huge responsibilities. tell her which triangle you kept the factorization in and she'll handle the rest π
N
!> N is INTEGER!> The order of the matrix A. N >= 0.!>
the order of A. and it's N >= 0 β so zero is allowed, don't be weird about it.
AP
!> AP is COMPLEX*16 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 ZHPTRF,!> stored as a packed triangular matrix.!>!> On exit, if INFO = 0, 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 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.!>
okay this is the big one π bestie she is a transformation girlie:
- on entry she's holding the block diagonal matrix
Dand the multipliers that madeUorL, exactly asZHPTRFcomputed them, packed triangular style. - on exit, if
INFO = 0, she's been fully reborn as the (Hermitian) inverse of the original matrix, also packed triangular. glow-up fr fr π₯
and here's exactly where every entry of inv(A) lands, no guessing:
- if
UPLO = 'U':AP(i + (j-1)*j/2) = inv(A)(i,j)for1<=i<=j - if
UPLO = 'L':AP(i + (j-1)*(2n-j)/2) = inv(A)(i,j)forj<=i<=n
dimension is (N*(N+1)/2), she's not huge, she's just packed π
IPIV
!> IPIV is INTEGER array, dimension (N)!> Details of the interchanges and the block structure of D!> as determined by ZHPTRF.!>
all the tea about the interchanges and the block structure of D, straight from ZHPTRF. don't touch it, it's already been decided π
WORK
!> WORK is COMPLEX*16 array, dimension (N)!>
scratch space, COMPLEX*16, length N. she's just there to hold things while the magic happens π§
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.!>
the vibe check at the end π:
= 0β slay, successful exit β¨< 0β ifINFO = -i, the i-th argument had an illegal value, someone did not read the docs π> 0β ifINFO = i, thenD(i,i) = 0; the matrix is singular and its inverse could not be computed. no inverse for you, bestie, it literally does not exist π
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
the academic royalty behind all of this π«Ά
π Definition at line 108 of file zhptri.f.
she's defined at line 108 of zhptri.f. that's her address, respect it π
β Author (yes, again)
generated automatically by Doxygen for LAPACK from the source code π€ like, nobody hand-wrote this one, it spawned itself.
real talk: every single number, index formula, and bracket above is load-bearing. if you're actually calling this, getUPLO, the packed layout, andIPIVright, or the singular case will absolutely humble you π
okay that's the whole page, mwah π β brought to you by LAPACK, Version 3.12.0, dated /home/abui...RC/zhptri.f(3), generated automatically by Doxygen from the source code. go forth and invert, bestie ππ¦πΈ
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms