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 onlyDTBTRS, 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 thatAis nonsingular, but only exact singularity gets caught. it's totally conceivable for one or more diagonal elements ofAto 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: ifINFO = -i, thei-th argument had an illegal value π> 0: ifINFO = i, thei-th diagonal element ofAis exactly zero, indicating that the matrix is singular and the solutionsXhave 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
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms