ZPTTRSV(l)
π ZPTTRSV β bestie, we're solving triangular systems π
okay so this is ZPTTRSV from LAPACK (version 2.0), and it is genuinely one of the most useful little gremlins in the whole library. it's the kind of routine that just quietly does its job and never asks for credit. main character energy but make it humble. π
β¨ NAME β¨
ZPTTRSV β solve one of the triangular systems L * X = B, or L**H * X = B, π
πΈ SYNOPSIS πΈ
SUBROUTINE ZPTTRSV( UPLO, TRANS, N, NRHS, D, E, B, LDB, INFO )
CHARACTER UPLO, TRANS
INTEGER INFO, LDB, N, NRHS
DOUBLE PRECISION D( * )
COMPLEX*16 B( LDB, * ), E( * )
π¦ PURPOSE π¦
so basically ZPTTRSV solves one of these triangular systems:
L * X = B, or L**H * X = B,
U * X = B, or U**H * X = B,
where L or U is the Cholesky factor of a Hermitian positive definite tridiagonal matrix A such that
A = U**H*D*U or A = L*D*L**H (computed by ZPTTRF).
so yeah, ZPTTRF did the factorizing earlier and now we're doing the solving part. teamwork, fr fr. π«Ά
π ARGUMENTS π
UPLO(input)CHARACTER*1β tells us whether it's the superdiagonal or the subdiagonal of the tridiagonal matrixAthat's stored, plus which form of the factorization we're in:= 'U':Eis the superdiagonal ofU, andA = U'*D*U;= 'L':Eis the subdiagonal ofL, andA = L*D*L'. (the two forms are equivalent ifAis real, so no drama either way π )
TRANS(input)CHARACTERβ specifies the form of the system of equations:= 'N':L * X = B(No transpose)= 'N':L * X = B(No transpose)= 'C':U**H * X = B(Conjugate transpose)= 'C':L**H * X = B(Conjugate transpose)
okay yes, the'N'line and the'C'line each show up twice in the original and i am NOT editing the lore. that's just how it is. iconic of it honestly. π
N(input)INTEGERβ the order of the tridiagonal matrixA.N >= 0. (no negative girlies allowed π«)NRHS(input)INTEGERβ the number of right hand sides, aka the number of columns of the matrixB.NRHS >= 0.D(input)REAL array, dimension (N)β thendiagonal elements of the diagonal matrixDfrom the factorization computed byZPTTRF. βE(input)COMPLEX array, dimension (N-1)β the(n-1)off-diagonal elements of the unit bidiagonal factorUorLfrom the factorization computed byZPTTRF(peepUPLOto know which one π).B(input/output)COMPLEX array, dimension (LDB,NRHS)β on entry, the right hand side matrixB. on exit, the solution matrixX. glow up moment β¨LDB(input)INTEGERβ the leading dimension of the arrayB.LDB >= max(1,N).INFO(output)INTEGERβ the vibe check:= 0: successful exit π< 0: ifINFO = -i, thei-th argument had an illegal value π¬
ngl, ifINFOcomes back negative, one of your arguments was being messy. go check thei-th one. no cap. π
and that's the whole page, bestie!! this was a modified LAPACK routine, dated 12 May 1997 β vintage but still eating, fr fr. πβ¨ππ¦πΈπ π«Ά
π¦ where this page comes from
- ubuntu jammy: scalapack-doc 1.5-11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms