SRC/dtbtrs.f(3)

πŸ’… SRC/dtbtrs.f β€” from the Library Functions Manual (yes bestie, this is a Fortran file in the LAPACK fam) πŸŽ€

okay so. picture this: it's a .f file, it's living in SRC/, and it's here to solve a triangular band system for you. that's the whole vibe. let's get into it ✨


🌸 SYNOPSIS 🌸

Functions/Subroutines

  • subroutine dtbtrs (uplo, trans, diag, n, kd, nrhs, ab, ldab, b, ldb, info) β€” the one and only DTBTRS, our main character πŸ‘‘

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

subroutine dtbtrs (character uplo, character trans, character diag, integer n, integer kd, integer nrhs, double precision, dimension( ldab, * ) ab, integer ldab, double precision, dimension( ldb, * ) b, integer ldb, integer info)

DTBTRS πŸ’–

✨ Purpose ✨

!>
!> DTBTRS solves a triangular system of the form
!>
!>    A * X = B  or  A**T * X = B,
!>
!> where A is a triangular band matrix of order N, and B is an N-by-NRHS matrix.
!>
!> This subroutine verifies that A is nonsingular, but callers should note that only exact
!> singularity is detected. It is conceivable for one or more diagonal elements of A to be
!> subnormally tiny numbers without this subroutine signalling an error.
!>
!> If a possible loss of numerical precision due to near-singular matrices is a concern, the
!> caller should verify that A is nonsingular within some tolerance before calling this subroutine.
!>

so like, it solves A * X = B or A**T * X = B where A is a triangular band matrix of order N and B is an N-by-NRHS matrix. iconic behavior honestly.

⚠️ okay real talk for a sec: it does check that A is nonsingular, but only exact singularity gets caught. it's totally conceivable for one or more diagonal elements of A to be subnormally tiny numbers and this subroutine just... doesn't signal an error. rude, but that's the deal πŸ’€
🫢 so if losing numerical precision because of near-singular matrices is a concern for you (valid!), the caller should verify that A is nonsingular within some tolerance before calling this subroutine. do your homework first, bestie.

πŸŽ€ Parameters πŸŽ€

UPLO

!>          UPLO is CHARACTER*1
!>          = 'U':  A is upper triangular;
!>          = 'L':  A is lower triangular.
!>

UPLO is CHARACTER*1. set it to 'U' and A is upper triangular; set it to 'L' and A is lower triangular. pick your fighter πŸ¦‹

TRANS

!>          TRANS is CHARACTER*1
!>          Specifies the form the system of equations:
!>          = 'N':  A * X = B  (No transpose)
!>          = 'T':  A**T * X = B  (Transpose)
!>          = 'C':  A**H * X = B  (Conjugate transpose = Transpose)
!>

TRANS is CHARACTER*1 and it specifies the form of the system of equations. 'N' β†’ A * X = B (no transpose), 'T' β†’ A**T * X = B (transpose), 'C' β†’ A**H * X = B (conjugate transpose, which equals transpose here). three whole moods 😌

DIAG

!>          DIAG is CHARACTER*1
!>          = 'N':  A is non-unit triangular;
!>          = 'U':  A is unit triangular.
!>

DIAG is CHARACTER*1. 'N' means A is non-unit triangular, 'U' means A is unit triangular. no cap 🧚

N

!>          N is INTEGER
!>          The order of the matrix A.  N >= 0.
!>

N is INTEGER, the order of the matrix A, and N >= 0. zero is allowed, she's flexible πŸ’œ

KD

!>          KD is INTEGER
!>          The number of superdiagonals or subdiagonals of the
!>          triangular band matrix A.  KD >= 0.
!>

KD is INTEGER β€” the number of superdiagonals or subdiagonals of the triangular band matrix A. KD >= 0. ⭐

NRHS

!>          NRHS is INTEGER
!>          The number of right hand sides, i.e., the number of columns
!>          of the matrix B.  NRHS >= 0.
!>

NRHS is INTEGER β€” the number of right hand sides, i.e. the number of columns of the matrix B. NRHS >= 0. 🌈

AB

!>          AB is DOUBLE PRECISION array, dimension (LDAB,N)
!>          The upper or lower triangular band matrix A, stored in the
!>          first kd+1 rows of AB.  The j-th column of A is stored
!>          in the j-th column of the array AB as follows:
!>          if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
!>          if UPLO = 'L', AB(1+i-j,j)    = A(i,j) for j<=i<=min(n,j+kd).
!>          If DIAG = 'U', the diagonal elements of A are not referenced
!>          and are assumed to be 1.
!>

AB is a DOUBLE PRECISION array with dimension (LDAB,N). it holds the upper or lower triangular band matrix A, stored in the first kd+1 rows of AB. the j-th column of A lives in the j-th column of the array AB like this:

if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
if UPLO = 'L', AB(1+i-j,j)    = A(i,j) for j<=i<=min(n,j+kd).

and if DIAG = 'U', the diagonal elements of A are not referenced and are assumed to be 1. free real estate πŸ“

LDAB

!>          LDAB is INTEGER
!>          The leading dimension of the array AB.  LDAB >= KD+1.
!>

LDAB is INTEGER, the leading dimension of the array AB. LDAB >= KD+1. respect the constraint 🫢

B

!>          B is DOUBLE PRECISION array, dimension (LDB,NRHS)
!>          On entry, the right hand side matrix B.
!>          On exit, if INFO = 0, the solution matrix X.
!>

B is a DOUBLE PRECISION array with dimension (LDB,NRHS). on entry it's the right hand side matrix B; on exit, if INFO = 0, it's the solution matrix X. she transforms πŸ’…βœ¨

LDB

!>          LDB is INTEGER
!>          The leading dimension of the array B.  LDB >= max(1,N).
!>

LDB is INTEGER, the leading dimension of the array B. LDB >= max(1,N). πŸ“

INFO

!>          INFO is INTEGER
!>          = 0:  successful exit
!>          < 0:  if INFO = -i, the i-th argument had an illegal value
!>          > 0:  if INFO = i, the i-th diagonal element of A is exactly zero,
!>                indicating that the matrix is singular and the
!>                solutions X have not been computed.
!>

INFO is INTEGER and it's the vibe check at the end:

  • = 0: successful exit πŸŽ‰
  • < 0: if INFO = -i, the i-th argument had an illegal value πŸ™ˆ
  • > 0: if INFO = i, the i-th diagonal element of A is exactly zero, indicating that the matrix is singular and the solutions X have not been computed πŸ’€

πŸ‘‘ Author πŸ‘‘

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

Definition at line 150 of file dtbtrs.f. πŸ”₯


⭐ Author (the meta one) ⭐

Generated automatically by Doxygen for LAPACK from the source code. a bot wrote this bit, not me πŸ˜­πŸ€–


🌈 and that's the whole page, bestie! go forth and solve your triangular band systems responsibly πŸ’–

β€” sign-off from the footer: it's LAPACK, Version 3.12.0, dated to that SRC/dtbtrs.f(3) life. see you in the next manpage πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from