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
CTBRFSprovides error bounds and backward error estimates for the solution to a system of linear equations with a triangular band coefficient matrix. β¨- The solution matrix
Xmust be computed byCTBTRSor some other means before entering this routine. no skipping ahead, bestie, you gotta have anXfirst. CTBRFSdoes 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βUPLOisCHARACTER*1= 'U': A is upper triangular;= 'L': A is lower triangular.
TRANSβTRANSisCHARACTER*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βDIAGisCHARACTER*1= 'N': A is non-unit triangular;= 'U': A is unit triangular.
NβNisINTEGER. the order of the matrix A.N >= 0.KDβKDisINTEGER. the number of superdiagonals or subdiagonals of the triangular band matrix A.KD >= 0.NRHSβNRHSisINTEGER. the number of right hand sides, i.e., the number of columns of the matrices B and X.NRHS >= 0.ABβABisCOMPLEXarray, dimension(LDAB,N). it's the upper or lower triangular band matrix A, stored in the firstkd+1rows of the array. the j-th column of A is stored in the j-th column of the arrayABas follows:- if
UPLO = 'U',AB(kd+1+i-j,j) = A(i,j)formax(1,j-kd)<=i<=j; - if
UPLO = 'L',AB(1+i-j,j) = A(i,j)forj<=i<=min(n,j+kd).
- if
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βLDABisINTEGER. the leading dimension of the arrayAB.LDAB >= KD+1.BβBisCOMPLEXarray, dimension(LDB,NRHS). the right hand side matrix B.LDBβLDBisINTEGER. the leading dimension of the arrayB.LDB >= max(1,N).XβXisCOMPLEXarray, dimension(LDX,NRHS). the solution matrix X πLDXβLDXisINTEGER. the leading dimension of the arrayX.LDX >= max(1,N).FERRβFERRisREALarray, dimension(NRHS). the estimated forward error bound for each solution vectorX(j)(the j-th column of the solution matrix X). ifXTRUEis the true solution corresponding toX(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 inX(j). the estimate is as reliable as the estimate forRCOND, and is almost always a slight overestimate of the true error. she's a lil dramatic, she overshoots, but she's reliable πBERRβBERRisREALarray, dimension(NRHS). the componentwise relative backward error of each solution vectorX(j)(i.e., the smallest relative change in any element of A or B that makesX(j)an exact solution).WORKβWORKisCOMPLEXarray, dimension(2*N).RWORKβRWORKisREALarray, dimension(N).INFOβINFOisINTEGER= 0: successful exit β< 0: ifINFO = -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
DTBRFSprovides error bounds and backward error estimates for the solution to a system of linear equations with a triangular band coefficient matrix.- The solution matrix
Xmust be computed byDTBTRSor some other means before entering this routine. (note theDTBTRSβ notCTBTRS, bestie, watch your types π) DTBRFSdoes not do iterative refinement because doing so cannot improve the backward error.
π Parameters
UPLOβUPLOisCHARACTER*1= 'U': A is upper triangular;= 'L': A is lower triangular.
TRANSβTRANSisCHARACTER*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βDIAGisCHARACTER*1= 'N': A is non-unit triangular;= 'U': A is unit triangular.
NβNisINTEGER. the order of the matrix A.N >= 0.KDβKDisINTEGER. the number of superdiagonals or subdiagonals of the triangular band matrix A.KD >= 0.NRHSβNRHSisINTEGER. the number of right hand sides, i.e., the number of columns of the matrices B and X.NRHS >= 0.ABβABisDOUBLE PRECISIONarray, dimension(LDAB,N). the upper or lower triangular band matrix A, stored in the firstkd+1rows of the array. the j-th column of A is stored in the j-th column of the arrayABas follows:- if
UPLO = 'U',AB(kd+1+i-j,j) = A(i,j)formax(1,j-kd)<=i<=j; - if
UPLO = 'L',AB(1+i-j,j) = A(i,j)forj<=i<=min(n,j+kd).
- if
if DIAG = 'U', the diagonal elements of A are not referenced and are assumed to be 1.
LDABβLDABisINTEGER. the leading dimension of the arrayAB.LDAB >= KD+1.BβBisDOUBLE PRECISIONarray, dimension(LDB,NRHS). the right hand side matrix B.LDBβLDBisINTEGER. the leading dimension of the arrayB.LDB >= max(1,N).XβXisDOUBLE PRECISIONarray, dimension(LDX,NRHS). the solution matrix X.LDXβLDXisINTEGER. the leading dimension of the arrayX.LDX >= max(1,N).FERRβFERRisDOUBLE PRECISIONarray, dimension(NRHS). the estimated forward error bound for each solution vectorX(j)(the j-th column of the solution matrix X). ifXTRUEis the true solution corresponding toX(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 inX(j). the estimate is as reliable as the estimate forRCOND, and is almost always a slight overestimate of the true error.BERRβBERRisDOUBLE PRECISIONarray, dimension(NRHS). the componentwise relative backward error of each solution vectorX(j)(i.e., the smallest relative change in any element of A or B that makesX(j)an exact solution).WORKβWORKisDOUBLE PRECISIONarray, dimension(3*N). yup,3*Nhere, not2*Nlike her complex sister π different girl, different workspace.IWORKβIWORKisINTEGERarray, dimension(N).INFOβINFOisINTEGER= 0: successful exit β< 0: ifINFO = -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 matrixXhas to be computed bySTBTRSor 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 ofAyou actually care about:= 'U'meansAis upper triangular;= 'L'meansAis 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':Ais non-unit triangular;= 'U':Ais unit triangular.NβINTEGERβ the order of the matrixA. Constraint:N >= 0.KDβINTEGERβ the number of superdiagonals or subdiagonals of the triangular band matrixA. Constraint:KD >= 0.NRHSβINTEGERβ the number of right hand sides, i.e., the number of columns of the matricesBandX. Constraint:NRHS >= 0.ABβREAL array, dimension (LDAB,N)β the upper or lower triangular band matrixA, stored in the firstkd+1rows of the array. Thej-th column ofAis stored in thej-th column of the arrayABlike 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 arrayAB. Constraint:LDAB >= KD+1.BβREAL array, dimension (LDB,NRHS)β the right hand side matrixB. π«ΆLDBβINTEGERβ the leading dimension of the arrayB. Constraint:LDB >= max(1,N).XβREAL array, dimension (LDX,NRHS)β the solution matrixX. (You brought this. Good.)LDXβINTEGERβ the leading dimension of the arrayX. Constraint:LDX >= max(1,N).FERRβREAL array, dimension (NRHS)β the estimated forward error bound for each solution vectorX(j)(thej-th column of the solution matrixX). IfXTRUEis the true solution corresponding toX(j), thenFERR(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 inX(j). The estimate is as reliable as the estimate forRCOND, 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 vectorX(j)(i.e., the smallest relative change in any element ofAorBthat makesX(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: ifINFO = -i, thei-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':Ais upper triangular;= 'L':Ais 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 theSTBRFSwording. Both are in the source, so both are staying. π
DIAGβCHARACTER*1β= 'N':Ais non-unit triangular;= 'U':Ais unit triangular.NβINTEGERβ the order of the matrixA. Constraint:N >= 0.KDβINTEGERβ the number of superdiagonals or subdiagonals of the triangular band matrixA. Constraint:KD >= 0.NRHSβINTEGERβ the number of right hand sides, i.e., the number of columns of the matricesBandX. Constraint:NRHS >= 0.ABβCOMPLEX*16 array, dimension (LDAB,N)β the upper or lower triangular band matrixA, stored in the firstkd+1rows of the array. Thej-th column ofAis stored in thej-th column of the arrayABas 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 arrayAB. Constraint:LDAB >= KD+1.BβCOMPLEX*16 array, dimension (LDB,NRHS)β the right hand side matrixB.LDBβINTEGERβ the leading dimension of the arrayB. Constraint:LDB >= max(1,N).XβCOMPLEX*16 array, dimension (LDX,NRHS)β the solution matrixX.LDXβINTEGERβ the leading dimension of the arrayX. Constraint:LDX >= max(1,N).FERRβDOUBLE PRECISION array, dimension (NRHS)β the estimated forward error bound for each solution vectorX(j)(thej-th column of the solution matrixX). IfXTRUEis the true solution corresponding toX(j), thenFERR(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 inX(j). The estimate is as reliable as the estimate forRCOND, 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 vectorX(j)(i.e., the smallest relative change in any element ofAorBthat makesX(j)an exact solution).WORKβCOMPLEX*16 array, dimension (2*N)β workspace, and note it's2*Nhere, not3*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: ifINFO = -i, thei-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
- 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