tbrfs(3)

πŸ’… tbrfs β€” triangular iterative refinement, the LAPACK glow-up πŸ’…

okay so bestie, welcome to tbrfs(3) β€” yes that's the manual name, and yes we're gonna get through it together 🫢. This is the LAPACK family page for the xTBRFS crew: error bounds and backward error estimates for triangular band systems. Four routines, one page, all the deets. ✨


🌸 NAME 🌸

tbrfs β€” tbrfs: triangular iterative refinement

like, that's literally the whole name section. short and iconic, we respect it πŸ’…


✨ SYNOPSIS ✨

πŸŽ€ Functions πŸŽ€

  • CTBRFS
subroutine ctbrfs (uplo, trans, diag, n, kd, nrhs, ab, ldab, b, ldb, x,
    ldx, ferr, berr, work, rwork, info)
  • DTBRFS
subroutine dtbrfs (uplo, trans, diag, n, kd, nrhs, ab, ldab, b, ldb, x,
    ldx, ferr, berr, work, iwork, info)
  • STBRFS
subroutine stbrfs (uplo, trans, diag, n, kd, nrhs, ab, ldab, b, ldb, x,
    ldx, ferr, berr, work, iwork, info)
  • ZTBRFS
subroutine ztbrfs (uplo, trans, diag, n, kd, nrhs, ab, ldab, b, ldb, x,
    ldx, ferr, berr, work, rwork, info)

not me noticing the single-precision and double boys get an iwork and the complex girlies get rwork instead πŸ‘€ that's not a typo, that's just how they roll. iykyk.


πŸ’« DETAILED DESCRIPTION πŸ’«

Detailed Description. that's it, that's the section β€” the real tea is all down in the function docs πŸ‘‡


πŸ‘‘ FUNCTION DOCUMENTATION πŸ‘‘

πŸ¦‹ subroutine ctbrfs

here's the whole-ass signature, verbatim, because precision is my love language:

subroutine ctbrfs (character uplo, character trans, character diag, integer
    n, integer kd, integer nrhs, complex, dimension( ldab, * ) ab, integer
    ldab, complex, dimension( ldb, * ) b, integer ldb, complex, dimension(
    ldx, * ) x, integer ldx, real, dimension( * ) ferr, real, dimension( * )
    berr, complex, dimension( * ) work, real, dimension( * ) rwork, integer
    info)

CTBRFS β€” the complex single-precision one πŸŽ€

⭐ Purpose

  • CTBRFS provides error bounds and backward error estimates for the solution to a system of linear equations with a triangular band coefficient matrix. ✨
  • The solution matrix X must be computed by CTBTRS or some other means before entering this routine. no skipping ahead, bestie, you gotta have an X first.
  • CTBRFS does not do iterative refinement because doing so cannot improve the backward error. ikr, the name says refinement and the routine says "not me" πŸ’€ that's not a bug, that's just the truth.

🌈 Parameters

  • UPLO β€” UPLO is CHARACTER*1
    • = 'U': A is upper triangular;
    • = 'L': A is lower triangular.
  • TRANS β€” 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)
  • DIAG β€” DIAG is CHARACTER*1
    • = 'N': A is non-unit triangular;
    • = 'U': A is unit triangular.
  • N β€” N is INTEGER. the order of the matrix A. N >= 0.
  • KD β€” 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 matrices B and X. NRHS >= 0.
  • AB β€” AB is COMPLEX 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 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).

and if DIAG = 'U', the diagonal elements of A are not referenced and are assumed to be 1. free real estate, we love to see it πŸ™ˆ

  • LDAB β€” LDAB is INTEGER. the leading dimension of the array AB. LDAB >= KD+1.
  • B β€” B is COMPLEX array, dimension (LDB,NRHS). the right hand side matrix B.
  • LDB β€” LDB is INTEGER. the leading dimension of the array B. LDB >= max(1,N).
  • X β€” X is COMPLEX array, dimension (LDX,NRHS). the solution matrix X πŸ’–
  • LDX β€” LDX is INTEGER. the leading dimension of the array X. LDX >= max(1,N).
  • FERR β€” FERR is REAL array, dimension (NRHS). the estimated forward error bound for each solution vector X(j) (the j-th column of the solution matrix X). if XTRUE is the true solution corresponding to X(j), FERR(j) is an estimated upper bound for the magnitude of the largest element in (X(j) - XTRUE) divided by the magnitude of the largest element in X(j). the estimate is as reliable as the estimate for RCOND, and is almost always a slight overestimate of the true error. she's a lil dramatic, she overshoots, but she's reliable πŸ’…
  • BERR β€” BERR is REAL array, dimension (NRHS). the componentwise relative backward error of each solution vector X(j) (i.e., the smallest relative change in any element of A or B that makes X(j) an exact solution).
  • WORK β€” WORK is COMPLEX array, dimension (2*N).
  • RWORK β€” RWORK is REAL array, dimension (N).
  • INFO β€” INFO is INTEGER
    • = 0: successful exit βœ…
    • < 0: if INFO = -i, the i-th argument had an illegal value 🚨

🫢 Author

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

Definition at line 186 of file ctbrfs.f.


🧚 subroutine dtbrfs

signature time, character for character:

subroutine dtbrfs (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,
    double precision, dimension( ldx, * ) x, integer ldx, double precision,
    dimension( * ) ferr, double precision, dimension( * ) berr, double
    precision, dimension( * ) work, integer, dimension( * ) iwork, integer
    info)

DTBRFS β€” the double precision one, main character energy πŸ”₯

⭐ Purpose

  • DTBRFS provides error bounds and backward error estimates for the solution to a system of linear equations with a triangular band coefficient matrix.
  • The solution matrix X must be computed by DTBTRS or some other means before entering this routine. (note the DTBTRS β€” not CTBTRS, bestie, watch your types πŸ‘€)
  • DTBRFS does not do iterative refinement because doing so cannot improve the backward error.

🌈 Parameters

  • UPLO β€” UPLO is CHARACTER*1
    • = 'U': A is upper triangular;
    • = 'L': A is lower triangular.
  • TRANS β€” TRANS is CHARACTER*1. 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 = Transpose) β€” yeah, for real doubles conjugate transpose is literally just transpose, no notes πŸŽ€
  • DIAG β€” DIAG is CHARACTER*1
    • = 'N': A is non-unit triangular;
    • = 'U': A is unit triangular.
  • N β€” N is INTEGER. the order of the matrix A. N >= 0.
  • KD β€” 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 matrices B and X. 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 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).

if DIAG = 'U', the diagonal elements of A are not referenced and are assumed to be 1.

  • LDAB β€” LDAB is INTEGER. the leading dimension of the array AB. LDAB >= KD+1.
  • B β€” B is DOUBLE PRECISION array, dimension (LDB,NRHS). the right hand side matrix B.
  • LDB β€” LDB is INTEGER. the leading dimension of the array B. LDB >= max(1,N).
  • X β€” X is DOUBLE PRECISION array, dimension (LDX,NRHS). the solution matrix X.
  • LDX β€” LDX is INTEGER. the leading dimension of the array X. LDX >= max(1,N).
  • FERR β€” FERR is DOUBLE PRECISION array, dimension (NRHS). the estimated forward error bound for each solution vector X(j) (the j-th column of the solution matrix X). if XTRUE is the true solution corresponding to X(j), FERR(j) is an estimated upper bound for the magnitude of the largest element in (X(j) - XTRUE) divided by the magnitude of the largest element in X(j). the estimate is as reliable as the estimate for RCOND, and is almost always a slight overestimate of the true error.
  • BERR β€” BERR is DOUBLE PRECISION array, dimension (NRHS). the componentwise relative backward error of each solution vector X(j) (i.e., the smallest relative change in any element of A or B that makes X(j) an exact solution).
  • WORK β€” WORK is DOUBLE PRECISION array, dimension (3*N). yup, 3*N here, not 2*N like her complex sister πŸ’€ different girl, different workspace.
  • IWORK β€” IWORK is INTEGER array, dimension (N).
  • INFO β€” INFO is INTEGER
    • = 0: successful exit βœ…
    • < 0: if INFO = -i, the i-th argument had an illegal value 🚨

🫢 Author

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

Definition at line 186 of file dtbrfs.f.


🌸 subroutine stbrfs

and here's her signature, same energy, single precision:

subroutine stbrfs (character uplo, character trans, character diag, integer
    n, integer kd, integer nrhs, real, dimension( ldab, * ) ab, integer
    ldab, real, dimension( ldb, * ) b, integer ldb, real, dimension( ldx, *
    ) x, integer ldx, real, dimension( * ) ferr, real, dimension( * ) berr,
    real, dimension( * ) work, integer, dimension( * ) iwork, integer info)

STBRFS β€” real, single precision, iwork girlie πŸ“

⭐ Purpose

STBRFS… okay bestie this is exactly where part 1 wraps and part 2 picks the story back up β€” the Purpose tea, all the parameters, and the rest of the STBRFS + ZTBRFS lore are coming right up 🫢✨

STBRFS is your girl for one very specific job: handing you error bounds and backward error estimates for the solution of a linear system with a triangular band coefficient matrix. πŸ’…

One thing that is not a vibe: this routine will not do iterative refinement for you. Like, at all. Because doing so cannot improve the backward error, so there's genuinely no point. Don't ask her twice. πŸ™ˆ

Heads up bestie: the solution matrix X has to be computed by STBTRS or some other means before you come in here. This routine is the vibe check, not the solver. ✨

πŸŽ€ Parameters

  • UPLO β€” CHARACTER*1 β€” tells her which triangle of A you actually care about: = 'U' means A is upper triangular; = 'L' means A is lower triangular. πŸ‘‘
  • TRANS β€” CHARACTER*1 β€” 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 = Transpose).
  • DIAG β€” CHARACTER*1 β€” = 'N': A is non-unit triangular; = 'U': A is unit triangular.
  • N β€” INTEGER β€” the order of the matrix A. Constraint: N >= 0.
  • KD β€” INTEGER β€” the number of superdiagonals or subdiagonals of the triangular band matrix A. Constraint: KD >= 0.
  • NRHS β€” INTEGER β€” the number of right hand sides, i.e., the number of columns of the matrices B and X. Constraint: NRHS >= 0.
  • AB β€” 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 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 real talk: if DIAG = 'U', the diagonal elements of A are not referenced and are assumed to be 1. She's not even looking at them. πŸ’€

  • LDAB β€” INTEGER β€” the leading dimension of the array AB. Constraint: LDAB >= KD+1.
  • B β€” REAL array, dimension (LDB,NRHS) β€” the right hand side matrix B. 🫢
  • LDB β€” INTEGER β€” the leading dimension of the array B. Constraint: LDB >= max(1,N).
  • X β€” REAL array, dimension (LDX,NRHS) β€” the solution matrix X. (You brought this. Good.)
  • LDX β€” INTEGER β€” the leading dimension of the array X. Constraint: LDX >= max(1,N).
  • FERR β€” REAL array, dimension (NRHS) β€” the estimated forward error bound for each solution vector X(j) (the j-th column of the solution matrix X). If XTRUE is the true solution corresponding to X(j), then FERR(j) is an estimated upper bound for the magnitude of the largest element in (X(j) - XTRUE) divided by the magnitude of the largest element in X(j). The estimate is as reliable as the estimate for RCOND, and is almost always a slight overestimate of the true error. So she's a little dramatic, but she's honest. πŸ’–
  • BERR β€” REAL array, dimension (NRHS) β€” the componentwise relative backward error of each solution vector X(j) (i.e., the smallest relative change in any element of A or B that makes X(j) an exact solution). Iconic.
  • WORK β€” REAL array, dimension (3*N) β€” her workspace, she's not sorry about it.
  • IWORK β€” INTEGER array, dimension (N) β€” integer workspace, same energy.
  • INFO β€” INTEGER β€” the receipts: = 0: successful exit; < 0: if INFO = -i, the i-th argument had an illegal value. 😭

Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

Definition

Definition at line 186 of file stbrfs.f. πŸ“


🌈 ztbrfs

subroutine ztbrfs (character uplo, character trans, character diag, integer
n, integer kd, integer nrhs, complex*16, dimension( ldab, * ) ab,
integer ldab, complex*16, dimension( ldb, * ) b, integer ldb,
complex*16, dimension( ldx, * ) x, integer ldx, double precision,
dimension( * ) ferr, double precision, dimension( * ) berr, complex*16,
dimension( * ) work, double precision, dimension( * ) rwork, integer
info)

Same routine, but make it COMPLEX*16. πŸ’œ

Purpose

ZTBRFS provides error bounds and backward error estimates for the solution to a system of linear equations with a triangular band coefficient matrix. ✨

And same rule as before, bestie: the solution matrix X must be computed by ZTBTRS or some other means before entering this routine. ZTBRFS does not do iterative refinement because doing so cannot improve the backward error. It's giving "I said what I said". πŸ’…

Parameters

  • UPLO β€” CHARACTER*1 β€” = 'U': A is upper triangular; = 'L': A is lower triangular.
  • TRANS β€” CHARACTER*1 β€” 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).
Side note for the detail girlies: yes, over here it just says (Conjugate transpose) β€” (Conjugate transpose = Transpose) is the STBRFS wording. Both are in the source, so both are staying. πŸŽ€
  • DIAG β€” CHARACTER*1 β€” = 'N': A is non-unit triangular; = 'U': A is unit triangular.
  • N β€” INTEGER β€” the order of the matrix A. Constraint: N >= 0.
  • KD β€” INTEGER β€” the number of superdiagonals or subdiagonals of the triangular band matrix A. Constraint: KD >= 0.
  • NRHS β€” INTEGER β€” the number of right hand sides, i.e., the number of columns of the matrices B and X. Constraint: NRHS >= 0.
  • AB β€” COMPLEX*16 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).

If DIAG = 'U', the diagonal elements of A are not referenced and are assumed to be 1. Still not peeking. πŸ™ˆ

  • LDAB β€” INTEGER β€” the leading dimension of the array AB. Constraint: LDAB >= KD+1.
  • B β€” COMPLEX*16 array, dimension (LDB,NRHS) β€” the right hand side matrix B.
  • LDB β€” INTEGER β€” the leading dimension of the array B. Constraint: LDB >= max(1,N).
  • X β€” COMPLEX*16 array, dimension (LDX,NRHS) β€” the solution matrix X.
  • LDX β€” INTEGER β€” the leading dimension of the array X. Constraint: LDX >= max(1,N).
  • FERR β€” DOUBLE PRECISION array, dimension (NRHS) β€” the estimated forward error bound for each solution vector X(j) (the j-th column of the solution matrix X). If XTRUE is the true solution corresponding to X(j), then FERR(j) is an estimated upper bound for the magnitude of the largest element in (X(j) - XTRUE) divided by the magnitude of the largest element in X(j). The estimate is as reliable as the estimate for RCOND, and is almost always a slight overestimate of the true error. Reliable queen. πŸ‘‘
  • BERR β€” DOUBLE PRECISION array, dimension (NRHS) β€” the componentwise relative backward error of each solution vector X(j) (i.e., the smallest relative change in any element of A or B that makes X(j) an exact solution).
  • WORK β€” COMPLEX*16 array, dimension (2*N) β€” workspace, and note it's 2*N here, not 3*N. Not the same as her real sister. πŸ¦‹
  • RWORK β€” DOUBLE PRECISION array, dimension (N) β€” the real workspace, because even complex routines need a little realness. πŸ’€
  • INFO β€” INTEGER β€” = 0: successful exit; < 0: if INFO = -i, the i-th argument had an illegal value.

Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

Definition

Definition at line 186 of file ztbrfs.f. πŸ“ (Yes, line 186 again β€” twin energy. 🫢)


πŸ’« Author

Generated automatically by Doxygen for LAPACK from the source code. No cap, a robot wrote this and she ate. πŸ€–βœ¨


Okay that's the whole page bestie!! πŸŽ€πŸ’– This was LAPACK, Version 3.12.0, and you were reading tbrfs(3) β€” go forth and bound those errors, you absolute main character. πŸ’…πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from