SRC/zptsv.f(3)
π SRC/zptsv.f β LAPACK's tridiagonal solver, bestie edition
okay so this is a page from LAPACK, the library manual, and it's literally about one lil subroutine that just gets it done. Sit with me for a sec, this one's actually so good.
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine zptsv (n, nrhs, d, e, b, ldb, info)β ZPTSV computes the solution to system of linear equations A * X = B for PT matrices π«Ά
π¦ Function/Subroutine Documentation π¦
subroutine zptsv (integer n, integer nrhs, double precision, dimension( * ) d, complex*16, dimension( * ) e, complex*16, dimension( ldb, * ) b, integer ldb, integer info)
ZPTSV computes the solution to system of linear equations A * X = B for PT matrices. no cap, that's the whole job. π
π Purpose:
!>
!> ZPTSV 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 real talk: A is this N-by-N Hermitian positive definite tridiagonal matrix, and X and B are N-by-NRHS matrices. The way it works is lowkey iconic β it factors A as A = L*D*L**H, and then that factored form gets used to solve the whole system. it's giving "prep work pays off" energy β¨
πΈ Parameters
- N β N is
INTEGER. The order of the matrix A.N >= 0. (yes bestie, zero is allowed, we don't gatekeep) - NRHS β NRHS is
INTEGER. The number of right hand sides, i.e., the number of columns of the matrix B.NRHS >= 0. slay, plural RHS rights π - D β D is
DOUBLE PRECISION 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 factorizationA = L*D*L**H. so it comes in as one thing and leaves as another β main character transformation fr fr π¦ - E β E is
COMPLEX*16 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 theL*D*L**Hfactorization of A. E can also be regarded as the superdiagonal of the unit bidiagonal factor U from theU**H*D*Ufactorization of A. not it being two things at once π iconic behavior honestly - B β B is
COMPLEX*16 array, dimension (LDB,NRHS). On entry, the N-by-NRHS right hand side matrix B. On exit, ifINFO = 0, the N-by-NRHS solution matrix X. it literally becomes the answer, we love a glow-up π - LDB β LDB is
INTEGER. The leading dimension of the array B.LDB >= max(1,N). respect the leading dimension bestie, it's not optional π - INFO β INFO is
INTEGER. The whole vibe check of the run:= 0: successful exit π< 0: ifINFO = -i, the i-th argument had an illegal value π> 0: ifINFO = i, the leading principal minor of order i is not positive, and the solution has not been computed. The factorization has not been completed unlessi = N.
β οΈ okay so pay attention to this one: whenINFO > 0you do not get a solution β like, at all. the factorization is also incomplete unlessi = N. so don't be out here using B like it's X, that's a trap π
π§ Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 114 of file zptsv.f.
π Author
Generated automatically by Doxygen for LAPACK from the source code.
k that's the whole page bestie, you ate that reading it π this little legend is from LAPACK Version 3.12.0, page SRC/zptsv.f(3), and it was generated automatically by Doxygen for LAPACK straight from the source code. periodt. ππ«Άβ¨
π¦ where this page comes from
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms