DGTTS2(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

πŸ’… DGTTS2(3) β€” like, the Library Functions Manual one, bestie

okay so before we even get into it β€” this page lives in the Library Functions Manual, and the actual file it's documenting is this absolute mouthful of a path:

/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/dgtts2.f

yes that's the whole NAME section, no cap. it's just... the path. iconic of Fortran, honestly. 🫢


✨ SYNOPSIS ✨

Functions/Subroutines πŸŽ€

subroutine DGTTS2 (itrans, n, nrhs, dl, d, du, du2, ipiv, b, ldb)

so what does it do? DGTTS2 solves a system of linear equations with a tridiagonal matrix using the LU factorization computed by sgttrf. that's the whole vibe. that's the tweet. πŸ¦‹

🌸 Function/Subroutine Documentation 🌸

subroutine DGTTS2 (integer itrans, integer n, integer nrhs, double
    precision, dimension( * ) dl, double precision, dimension( * ) d, double
    precision, dimension( * ) du, double precision, dimension( * ) du2,
    integer, dimension( * ) ipiv, double precision, dimension( ldb, * ) b,
    integer ldb)

DGTTS2 solves a system of linear equations with a tridiagonal matrix using the LU factorization computed by sgttrf. (yes, it gets its own little repeat up here too, she said it twice because it's important πŸ’…)

Purpose: πŸ‘‘

!>
!> DGTTS2 solves one of the systems of equations
!>    A*X = B  or  A**T*X = B,
!> with a tridiagonal matrix A using the LU factorization computed
!> by DGTTRF.
!>

notice how the Purpose says DGTTRF and the synopsis said sgttrf? yeah. that's just how it is. both are written down, and I'm not about to pick a favourite. πŸ™ˆ

Parameters 🧚

  • ITRANS β€” oh this is an INTEGER and it's the main character of the "which equation are we even solving" question. it says what form the system takes:
    • = 0: A * X = B (no transpose)
    • = 1: A**T* X = B (transpose)
    • = 2: A**T* X = B (conjugate transpose = transpose β€” yeah, same thing here, they're the same for real matrices, slay)
  • N β€” INTEGER, the order of the matrix A. literally just how big she is. ⭐
  • NRHS β€” INTEGER, the number of right hand sides, i.e. the number of columns of the matrix B. and listen: NRHS >= 0. non-negotiable. πŸ’€
  • DL β€” DOUBLE PRECISION array, dimension (N-1). the (n-1) multipliers that define the matrix L from the LU factorization of A. lowercase n, capital N, we love a consistent queen.
  • D β€” DOUBLE PRECISION array, dimension (N). the n diagonal elements of the upper triangular matrix U from the LU factorization of A. yes, D is literally just the diagonal. king of not overthinking it. πŸ‘‘
  • DU β€” DOUBLE PRECISION array, dimension (N-1). the (n-1) elements of the first super-diagonal of U. super-diagonal sounds like a superhero and honestly? she kind of is. πŸ¦Έβ€β™€οΈ
  • DU2 β€” DOUBLE PRECISION array, dimension (N-2). the (n-2) elements of the second super-diagonal of U. yes, second. she goes one deeper. 🌈
  • IPIV β€” INTEGER array, dimension (N). the pivot indices! for 1 <= i <= n, row i of the matrix was interchanged with row IPIV(i). and here's the tea: IPIV(i) will always be either i or i+1, and IPIV(i) = i means a row interchange was not required. so basically she's either "keep it" or "swap with the next one", there is literally no third option. πŸŽ€
  • B β€” DOUBLE PRECISION array, dimension (LDB,NRHS). on entry, this is the matrix of right hand side vectors B. on exit, B is overwritten by the solution vectors X. so like, glow-up moment: she walks in as B and leaves as X. πŸ’–
  • LDB β€” INTEGER, the leading dimension of the array B. and the rule is LDB >= max(1,N). respect it. πŸ”₯

Author πŸ‘‘

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

Definition at line 127 of file dgtts2.f. πŸ“

⭐ Author (the other one) ⭐

generated automatically by Doxygen for LAPACK from the source code. so nobody actually hand-wrote this page, a robot did, and honestly? she ate. πŸ€–βœ¨


ok that's the whole page bestie, go solve your tridiagonal system, you've got this πŸ’œ

β€” LAPACK, Version 3.12.0, dated /home/abui...RC/dgtts2.f(3) β€” mwah, catch you on the next manpage πŸ“πŸ’…

πŸ“¦ where this page comes from