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 factorization A = 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 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. 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, if INFO = 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: 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.
⚠️ okay so pay attention to this one: when INFO > 0 you do not get a solution β€” like, at all. the factorization is also incomplete unless i = 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