DGTTS2(3)
π 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 anINTEGERand 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 PRECISIONarray, 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 PRECISIONarray, dimension(N). the n diagonal elements of the upper triangular matrix U from the LU factorization of A. yes,Dis literally just the diagonal. king of not overthinking it. πDUβDOUBLE PRECISIONarray, 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 PRECISIONarray, dimension(N-2). the(n-2)elements of the second super-diagonal of U. yes, second. she goes one deeper. πIPIVβINTEGERarray, dimension(N). the pivot indices! for1 <= i <= n, row i of the matrix was interchanged with rowIPIV(i). and here's the tea:IPIV(i)will always be eitheriori+1, andIPIV(i) = imeans 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 PRECISIONarray, 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 isLDB >= 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
- 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