/home/abui...RC/cptsv.f(3)
π CPTSV π
ok so bestie, this one's from /home/abui...RC/cptsv.f(3) β it's a section 3 library functions manual page, and the actual file it documents is this whole journey:
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/cptsv.f
It's LAPACK, it's Fortran, it's giving big computational main character energy. Let's get into it π«Ά
β¨ NAME β¨
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/cptsv.f β like, that's the file, that's the name, that's the whole vibe. no notes π
π¦ SYNOPSIS π¦
Functions/Subroutines
subroutine CPTSV (n, nrhs, d, e, b, ldb, info)
CPTSV computes the solution to system of linear equations A * X = B for PT matrices β that's the official one-liner, and honestly? she ate. π₯
π Function/Subroutine Documentation π
subroutine CPTSV (integer n, integer nrhs, real, dimension( * ) d, complex,
dimension( * ) e, complex, dimension( ldb, * ) b, integer ldb, integer
info)
So like, restating for the people in the back: CPTSV computes the solution to system of linear equations A * X = B for PT matrices. periodt. π
πΈ Purpose πΈ
!>!> CPTSV computes the solution to a complex system of linear equations!> A*X = B, where A is an N-by-N Hermitian positive definite tridiagonal!> matrix, and X and B are N-by-NRHS matrices.!>!> A is factored as A = L*D*L**H, and the factored form of A is then!> used to solve the system of equations.!>
so basically bestie, A is a complex Hermitian positive definite tridiagonal matrix, dimensions N-by-N, and X and B are N-by-NRHS matrices. the routine factors A as A = L*D*L**H, and then uses that factored form to actually solve the system. it's giving β¨prep work pays offβ¨ β factor first, solve second. no cap. π§
π Parameters π
N
!> N is INTEGER!> The order of the matrix A. N >= 0.!>
N is INTEGER β it's the order of the matrix A. the rule is N >= 0, and we respect the rule. π«‘
NRHS
!> NRHS is INTEGER!> The number of right hand sides, i.e., the number of columns!> of the matrix B. NRHS >= 0.!>
NRHS is INTEGER β the number of right hand sides, like, the number of columns of the matrix B. and yes, NRHS >= 0. she's flexible but not that flexible π
D
!> D is REAL array, dimension (N)!> On entry, the n diagonal elements of the tridiagonal matrix!> A. On exit, the n diagonal elements of the diagonal matrix!> D from the factorization A = L*D*L**H.!>
D is a REAL array, dimension (N). on entry, it's the n diagonal elements of the tridiagonal matrix A. on exit, it's the n diagonal elements of that diagonal matrix D from the factorization A = L*D*L**H. so she comes in as one thing and leaves as another β glow-up arc fr fr. π
E
!> E is COMPLEX array, dimension (N-1)!> On entry, the (n-1) subdiagonal elements of the tridiagonal!> matrix A. On exit, the (n-1) subdiagonal elements of the!> unit bidiagonal factor L from the L*D*L**H factorization of!> A. E can also be regarded as the superdiagonal of the unit!> bidiagonal factor U from the U**H*D*U factorization of A.!>
E is a COMPLEX array, dimension (N-1). on entry it holds the (n-1) subdiagonal elements of the tridiagonal matrix A; on exit it holds the (n-1) subdiagonal elements of the unit bidiagonal factor L from the L*D*L**H factorization of A. and here's the fun part β E can also be regarded as the superdiagonal of the unit bidiagonal factor U from the U**H*D*U factorization of A. it's giving versatile icon, one array two readings, we love a multitasker ππ
B
!> B is COMPLEX array, dimension (LDB,NRHS)!> On entry, the N-by-NRHS right hand side matrix B.!> On exit, if INFO = 0, the N-by-NRHS solution matrix X.!>
B is a COMPLEX array, dimension (LDB,NRHS). on entry, it's the N-by-NRHS right hand side matrix B. on exit, if INFO = 0, it's the N-by-NRHS solution matrix X. so like, conditional transformation β that INFO = 0 clause is doing a LOT of heavy lifting there bestie, don't skip it π
LDB
!> LDB is INTEGER!> The leading dimension of the array B. LDB >= max(1,N).!>
LDB is INTEGER β the leading dimension of the array B, and the requirement is LDB >= max(1,N). that max(1,N) is not decorative, she's protecting you from yourself π
INFO
!> INFO is INTEGER!> = 0: successful exit!> < 0: if INFO = -i, the i-th argument had an illegal value!> > 0: if INFO = i, the leading principal minor of order i!> is not positive, and the solution has not been!> computed. The factorization has not been completed!> unless i = N.!>
INFO is INTEGER β the status report, the receipts, the ~vibe check~ of the whole operation:
= 0β successful exit. slay, we're done, go home. β¨< 0β ifINFO = -i, the i-th argument had an illegal value. somebody passed something cursed. π¬> 0β ifINFO = i, the leading principal minor of order i is not positive, and the solution has not been computed. also, the factorization has not been completed unlessi = N. so like... you don't get an answer. read that again. no answer. π«
β οΈ okay genuine heads up bestie: thatINFO > 0case means no solution was computed at all, and unlessi = Nthe factorization is sitting there unfinished too. don't ignoreINFO. do not. ignore.INFO. π
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
absolute legends, all four, no cap. π«Ά
β Definition at line 114 of file cptsv.f.
that's the location. line 114. go look, she's there. π
π Author π
Generated automatically by Doxygen for LAPACK from the source code. so nobody hand-wrote this bad boy β the robots did it. iconic behavior honestly. π€β¨
and that's the whole page, bestie β every flag, every array bound, every INFO branch, all of it, still intact, just with 200% more personality π
LAPACK β Version 3.12.0 β /home/abui...RC/cptsv.f(3) ππ¦πΈ
π¦ 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