SRC/zgtsv.f(3)

✨ SRC/zgtsv.f ✨

LAPACK Library Functions Manual β€” SRC/zgtsv.f

Okay bestie, gather round πŸ’– because this is the manual for SRC/zgtsv.f, and it's literally about solving linear equations like the absolute main character it is. Let's get into it 🫢


πŸ’… NAME πŸ’…

SRC/zgtsv.f


🌸 SYNOPSIS 🌸

Functions/Subroutines

subroutine zgtsv (n, nrhs, dl, d, du, b, ldb, info) <br> ZGTSV computes the solution to system of linear equations A * X = B for GT matrices


πŸ¦‹ Function/Subroutine Documentation πŸ¦‹

subroutine zgtsv (integer n, integer nrhs, complex*16, dimension( * ) dl, complex*16, dimension( * ) d, complex*16, dimension( * ) du, complex*16, dimension( ldb, * ) b, integer ldb, integer info)

ZGTSV computes the solution to system of linear equations A * X = B for GT matrices

⭐ Purpose:

!>
!> ZGTSV  solves the equation
!>
!>    A*X = B,
!>
!> where A is an N-by-N tridiagonal matrix, by Gaussian elimination with
!> partial pivoting.
!>
!> Note that the equation  A**T *X = B  may be solved by interchanging the
!> order of the arguments DU and DL.
!>

So basically: you've got this N-by-N tridiagonal matrix A, and you're solving A*X = B using Gaussian elimination with partial pivoting. And there's this iconic little note: if you wanna solve A**T *X = B instead, just swap the order of DU and DL. Slay πŸ’…


πŸŽ€ Parameters πŸŽ€

  • N β€” Okay so N is INTEGER. It's the order of the matrix A. And N >= 0, periodt.
  • NRHS β€” NRHS is INTEGER. It's the number of right hand sides, aka the number of columns of the matrix B. NRHS >= 0, no cap.
  • DL β€” DL is COMPLEX*16 array, dimension (N-1). On entry, DL must contain the (n-1) subdiagonal elements of A. On exit, DL is overwritten by the (n-2) elements of the second superdiagonal of the upper triangular matrix U from the LU factorization of A, in DL(1), ..., DL(n-2). Iconic behavior tbh.
!>          DL is COMPLEX*16 array, dimension (N-1)
!>          On entry, DL must contain the (n-1) subdiagonal elements of
!>          A.
!>          On exit, DL is overwritten by the (n-2) elements of the
!>          second superdiagonal of the upper triangular matrix U from
!>          the LU factorization of A, in DL(1), ..., DL(n-2).
!>
  • D β€” D is COMPLEX*16 array, dimension (N). On entry, D must contain the diagonal elements of A. On exit, D is overwritten by the n diagonal elements of U. She gets a glow-up πŸ’…
!>          D is COMPLEX*16 array, dimension (N)
!>          On entry, D must contain the diagonal elements of A.
!>          On exit, D is overwritten by the n diagonal elements of U.
!>
  • DU β€” DU is COMPLEX*16 array, dimension (N-1). On entry, DU must contain the (n-1) superdiagonal elements of A. On exit, DU is overwritten by the (n-1) elements of the first superdiagonal of U.
!>          DU is COMPLEX*16 array, dimension (N-1)
!>          On entry, DU must contain the (n-1) superdiagonal elements
!>          of A.
!>          On exit, DU is overwritten by the (n-1) elements of the first
!>          superdiagonal of U.
!>
  • B β€” B is COMPLEX*16 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. Level up ✨
!>          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.
!>
  • LDB β€” LDB is INTEGER. It's the leading dimension of the array B. And LDB >= max(1,N), okay? Respect the dimension 🫢
!>          LDB is INTEGER
!>          The leading dimension of the array B.  LDB >= max(1,N).
!>
  • INFO β€” INFO is INTEGER. Here's the vibe check:
    • = 0: successful exit, we love to see it πŸ’–
    • < 0: if INFO = -i, the i-th argument had an illegal value, oop πŸ™ˆ
    • > 0: if INFO = i, U(i,i) is exactly zero, and the solution has not been computed. The factorization has not been completed unless i = N. That's a big yikes, bestie 😭
!>          INFO is INTEGER
!>          = 0:  successful exit
!>          < 0:  if INFO = -i, the i-th argument had an illegal value
!>          > 0:  if INFO = i, U(i,i) is exactly zero, and the solution
!>                has not been computed.  The factorization has not been
!>                completed unless i = N.
!>

πŸ‘‘ Author πŸ‘‘

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

Definition at line 123 of file zgtsv.f.


πŸ’œ Author (again, but meta) πŸ’œ

Generated automatically by Doxygen for LAPACK from the source code.


Friendly reminder bestie: this was generated by Doxygen from LAPACK’s source code, so it’s literally the source code speaking for itself πŸ’…

✨ LAPACK β€” Version 3.12.0 β€” SRC/zgtsv.f(3) ✨

And that's the whole manual, bestie! LAPACK Version 3.12.0, literally serving tridiagonal matrix solutions with Gaussian elimination and partial pivoting. Slay, periodt πŸ’–πŸŽ€πŸ’…

πŸ“¦ where this page comes from