CPBRFS(3)
π CPBRFS β the glow-up your banded Hermitian solve deserves π
okay bestie, so we're deep in the Library Functions Manual today (that's the vibe, that's the header energy), and the star of the show is a little file that lives way down in /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/cpbrfs.f. Yes that's a whole path. Yes it's a lot. No we're not skipping it. π«Ά
β¨ NAME β¨
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/cpbrfs.f
that's it. that's the name. it's giving "my full government name in a group chat" π but okay, we move.
πΈ SYNOPSIS πΈ
Functions/Subroutines
subroutine CPBRFS (uplo, n, kd, nrhs, ab, ldab, afb, ldafb, b, ldb, x,
ldx, ferr, berr, work, rwork, info)
CPBRFS
π¦ Function/Subroutine Documentation π¦
subroutine CPBRFS (character uplo, integer n, integer kd, integer nrhs,
complex, dimension( ldab, * ) ab, integer ldab, complex, dimension(
ldafb, * ) afb, integer ldafb, 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)
CPBRFS
look at her. seventeen arguments. main character energy, no cap. π
π Purpose π
!> !> CPBRFS improves the computed solution to a system of linear !> equations when the coefficient matrix is Hermitian positive definite !> and banded, and provides error bounds and backward error estimates !> for the solution. !>
so like β you already got an answer from somewhere, and this routine is the friend who's like "okay but are we SURE though" and then hands you receipts. it takes the solution and refines it, then gives you error bounds and backward error estimates. literally the quality-check queen. β¨
π Parameters π
UPLO
!> UPLO is CHARACTER*1 !> = 'U': Upper triangle of A is stored; !> = 'L': Lower triangle of A is stored. !>
which half of A are we keeping? 'U' = upper triangle stored, 'L' = lower triangle stored. pick a lane bestie, there's only two. π
N
!> N is INTEGER !> The order of the matrix A. N >= 0. !>
the order of matrix A. and N >= 0 β zero is allowed, negative is not, we don't do that here.
KD
!> KD is INTEGER !> The number of superdiagonals of the matrix A if UPLO = 'U', !> or the number of subdiagonals if UPLO = 'L'. KD >= 0. !>
the band-width situation: KD is the number of superdiagonals when UPLO = 'U', or the number of subdiagonals when UPLO = 'L'. also KD >= 0. slay.
NRHS
!> NRHS is INTEGER !> The number of right hand sides, i.e., the number of columns !> of the matrices B and X. NRHS >= 0. !>
how many right hand sides we're serving β aka the number of columns in B and X. NRHS >= 0. periodt. π
AB
!> AB is COMPLEX array, dimension (LDAB,N) !> The upper or lower triangle of the Hermitian 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 COMPLEX array, dimension (LDAB,N) and it's holding the upper-or-lower triangle of the Hermitian band matrix A, packed into the first KD+1 rows. the indexing is a whole thing, so here it is verbatim:
- 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)
iykyk π§
LDAB
!> LDAB is INTEGER !> The leading dimension of the array AB. LDAB >= KD+1. !>
leading dimension of AB. must be LDAB >= KD+1.
AFB
!> AFB is COMPLEX array, dimension (LDAFB,N) !> The triangular factor U or L from the Cholesky factorization !> A = U**H*U or A = L*L**H of the band matrix A as computed by !> CPBTRF, in the same storage format as A (see AB). !>
the triangular factor U or L from the Cholesky factorization A = U**H*U or A = L*L**H of the band matrix A, exactly as CPBTRF computed it, in the same storage format as A (peep AB above π).
LDAFB
!> LDAFB is INTEGER !> The leading dimension of the array AFB. LDAFB >= KD+1. !>
leading dimension of AFB. LDAFB >= KD+1. same deal as before, different array.
B
!> B is COMPLEX array, dimension (LDB,NRHS) !> The right hand side matrix B. !>
the right hand side matrix B. COMPLEX array, dimension (LDB,NRHS). she's the input. π
LDB
!> LDB is INTEGER !> The leading dimension of the array B. LDB >= max(1,N). !>
leading dimension of B, and it's LDB >= max(1,N).
X
!> X is COMPLEX array, dimension (LDX,NRHS) !> On entry, the solution matrix X, as computed by CPBTRS. !> On exit, the improved solution matrix X. !>
the glow-up recipient π on entry: the solution matrix X, as computed by CPBTRS. on exit: the improved solution matrix X. she went to the salon and came back better.
LDX
!> LDX is INTEGER !> The leading dimension of the array X. LDX >= max(1,N). !>
leading dimension of 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. !>
the estimated forward error bound for each solution vector X(j) (that's the j-th column of the solution matrix X). if XTRUE is the true solution for 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).
and like, how much can you trust it? the estimate is as reliable as the estimate for RCOND, and it's almost always a slight overestimate of the true error. she's a little dramatic, she rounds up. π but 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). !>
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. basically "how much would we have to fudge reality for this to be perfect". π
WORK
!> WORK is COMPLEX array, dimension (2*N) !>
COMPLEX array, dimension (2*N). scratch space, don't ask questions. π
RWORK
!> RWORK is REAL array, dimension (N) !>
REAL array, dimension (N). more scratch space, this time the real kind. πΈ
INFO
!> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value !>
= 0β successful exit, we ate and left no crumbs π₯< 0β ifINFO = -i, the i-th argument had an illegal value (rude of it, honestly)
π§ Internal Parameters π§
!> ITMAX is the maximum number of steps of iterative refinement. !>
ITMAX is the maximum number of steps of iterative refinement. she has a limit. she's not doing this forever. β
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
a whole squad. the avengers of linear algebra fr fr. π«Ά
β Definition at line 187 of file cpbrfs.f β
yes, exactly line 187. we cite our sources here. π
π Author π
Generated automatically by Doxygen for LAPACK from the source code. (not me, not you, the robot did it. iconic behaviour honestly.)
okay and for the sign-off: this whole thing is LAPACK, Version 3.12.0, brought to you from /home/abui...RC/cpbrfs.f(3) β mwah, go refine some solutions bestie, you've got this π
β¨π¦
π¦ 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