CPTTRSV(l)
π CPTTRSV π β LAPACK routine, version 2.0, and she is serving linear algebra realness
okay so bestie, sit down, hydrate, because we're about to solve a triangular system and honestly? it's giving main character energy. this is CPTTRSV(l) β the l is for LAPACK, iykyk β and she's a SUBROUTINE who lives for exactly one thing: making your triangular systems behave.
β¨ NAME β¨
CPTTRSV β solve one of the triangular systems L * X = B, or L**H * X = B, π¦
πΈ SYNOPSIS πΈ
SUBROUTINE CPTTRSV( UPLO, TRANS, N, NRHS, D, E, B, LDB, INFO )
CHARACTER UPLO, TRANS
INTEGER INFO, LDB, N, NRHS
REAL D( * )
COMPLEX B( LDB, * ), E( * )
look at her. so demure. so mindful. π
π PURPOSE π
CPTTRSV solves one of the 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 CPTTRF).
so likeβ¦ the factor was already cooked by CPTTRF, and now we're just here to back-substitute. no cap. π₯
π ARGUMENTS π
UPLO(input)CHARACTER*1β the vibe check on where the tridiagonal matrixAis keeping its stuff, and what form the factorization took:= '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.)
TRANS(input)CHARACTERβ tells us which form of the system of equations we're solving, and bestie there are four lines here so we're listing all four:= '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)
N(input)INTEGERβ the order of the tridiagonal matrixA. must beN >= 0. periodt.NRHS(input)INTEGERβ the number of right hand sides, aka the number of columns of the matrixB.NRHS >= 0, always. πD(input)REAL array, dimension (N)β thendiagonal elements of the diagonal matrixDfrom the factorization computed byCPTTRF. iconic. πE(input)COMPLEX array, dimension (N-1)β the(n-1)off-diagonal elements of the unit bidiagonal factorUorLfrom the factorization computed byCPTTRF(seeUPLO, she's the one who decides which one you got).B(input/output)COMPLEX array, dimension (LDB,NRHS)β on entry, the right hand side matrixB. on exit, the solution matrixX. she literally transforms. glow up. β¨LDB(input)INTEGERβ the leading dimension of the arrayB.LDB >= max(1,N), no arguing.INFO(output)INTEGERβ the receipts:= 0: successful exit π< 0: ifINFO = -i, the i-th argument had an illegal value π
heads up bestie:INFO < 0means you passed something illegal in argument number-INFO, so go check your inputs before you blame the routine, she's doing her best π«Ά
and that's the whole page, fr fr β go forth and back-substitute, queen π
this lil beauty is a modified LAPACK routine, dated 12 May 1997, and she's been serving ever since. mwah. πππ¦
π¦ 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