STBT02(3)
π STBT02(3) β the triangular-band residual checker bestie π
okay so real talk, this page lives at /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/LIN/stbt02.f and it's a .f file, so yes it's Fortran, and yes it's iconic π
it's part of the LAPACK library functions manual and honestly? it's giving "unsung hero of the testing suite" energy β¨
β¨ SYNOPSIS β¨
πΈ Functions/Subroutines πΈ
subroutine STBT02 (uplo, trans, diag, n, kd, nrhs, ab, ldab, x, ldx, b,
ldb, work, resid)
STBT02 π«Ά that's the whole name, no notes.
π Function/Subroutine Documentation π
subroutine STBT02 (character uplo, character trans, character diag, integer
n, integer kd, integer nrhs, real, dimension( ldab, * ) ab, integer
ldab, real, dimension( ldx, * ) x, integer ldx, real, dimension( ldb, *
) b, integer ldb, real, dimension( * ) work, real resid)
STBT02 π« (again, we stan a consistent queen)
π₯ Purpose π₯
okay so here's the whole vibe:
!>
!> STBT02 computes the residual for the computed solution to a
!> triangular system of linear equations op(A)*X = B, when A is a
!> triangular band matrix. The test ratio is the maximum over
!> norm(b - op(A)*x) / ( ||op(A)||_1 * norm(x) * EPS ),
!> where op(A) = A or A**T, b is the column of B, x is the solution
!> vector, and EPS is the machine epsilon.
!> The norm used is the 1-norm.
!>
so basically it computes the residual for the computed solution to a triangular system of linear equations op(A)*X = B, when A is a triangular band matrix β and the test ratio is the max over that whole formula up there. op(A) is A or A**T, b is the column of B, x is the solution vector, and EPS is the machine epsilon. and the norm used is the 1-norm. no cap. π
π¦ Parameters π¦
UPLO
!> UPLO is CHARACTER*1
!> Specifies whether the matrix A is upper or lower triangular.
!> = 'U': Upper triangular
!> = 'L': Lower triangular
!>
UPLO is CHARACTER*1 and it says whether matrix A is upper or lower triangular β 'U' means upper triangular, 'L' means lower triangular π
TRANS
!> TRANS is CHARACTER*1
!> Specifies the operation applied to A.
!> = 'N': A * X = B (No transpose)
!> = 'T': A**T * X = B (Transpose)
!> = 'C': A**H * X = B (Conjugate transpose = Transpose)
!>
TRANS is CHARACTER*1, it picks the operation applied to A: 'N' = A * X = B (No transpose), 'T' = A**T * X = B (Transpose), 'C' = A**H * X = B (Conjugate transpose = Transpose). note that last one β conjugate transpose equals transpose here, that's literally in the text bestie π
DIAG
!> DIAG is CHARACTER*1
!> Specifies whether or not the matrix A is unit triangular.
!> = 'N': Non-unit triangular
!> = 'U': Unit triangular
!>
DIAG is CHARACTER*1, tells you whether or not matrix A is unit triangular: 'N' = Non-unit triangular, 'U' = Unit triangular π
N
!> N is INTEGER
!> The order of the matrix A. N >= 0.
!>
N is INTEGER, the order of matrix A, and N >= 0 fr.
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, and KD >= 0 β¨
NRHS
!> NRHS is INTEGER
!> The number of right hand sides, i.e., the number of columns
!> of the matrices X and B. NRHS >= 0.
!>
NRHS is INTEGER, the number of right hand sides β i.e. the number of columns of the matrices X and B. NRHS >= 0 π«Ά
AB
!> AB is REAL array, dimension (LDAB,N)
!> The upper or lower triangular band matrix A, stored in the
!> first kd+1 rows of the array. 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).
!>
AB is a REAL array, dimension (LDAB,N) β it's the upper or lower triangular band matrix A, stored in the first kd+1 rows of the array. the j-th column of A lives in the j-th column of 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). copy those index ranges exactly, they matter π§
LDAB
!> LDAB is INTEGER
!> The leading dimension of the array AB. LDAB >= KD+1.
!>
LDAB is INTEGER, the leading dimension of the array AB, and LDAB >= KD+1 β
X
!> X is REAL array, dimension (LDX,NRHS)
!> The computed solution vectors for the system of linear
!> equations.
!>
X is a REAL array, dimension (LDX,NRHS) β the computed solution vectors for the system of linear equations π
LDX
!> LDX is INTEGER
!> The leading dimension of the array X. LDX >= max(1,N).
!>
LDX is INTEGER, the leading dimension of the array X, and LDX >= max(1,N) π
B
!> B is REAL array, dimension (LDB,NRHS)
!> The right hand side vectors for the system of linear
!> equations.
!>
B is a REAL array, dimension (LDB,NRHS) β the right hand side vectors for the system of linear equations π
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, and LDB >= max(1,N) π₯
WORK
!> WORK is REAL array, dimension (N)
!>
WORK is a REAL array, dimension (N). that's it. it's just vibes and scratch space π
RESID
!> RESID is REAL
!> The maximum over the number of right hand sides of
!> norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
!>
RESID is REAL β the maximum over the number of right hand sides of norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ). this is the output babe, the moment of truth π
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
absolute legends, all of them π«‘
Definition at line 152 of file stbt02.f. π
π Author (yes, again) π
Generated automatically by Doxygen for LAPACK from the source code. not me being autogenerated by Doxygen and still serving looks π
lowkey reminder: every bound up there (N >= 0,KD >= 0,NRHS >= 0,LDAB >= KD+1,LDX >= max(1,N),LDB >= max(1,N)) is a real requirement, not a suggestion β disrespect the leading dimensions and that's on you π
and that's the whole page bestie π bye from the LAPACK library functions manual, Version 3.12.0 β signed off from /home/abui...IN/stbt02.f(3), mwah πβ¨
π¦ 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