CHPRFS(3)
π CHPRFS(3) π
okay so this is the chprfs.f(3) page from the Library Functions Manual β yes that whole giant build path is literally the NAME, don't come for me, that's just how Doxygen do. π We're deep in LAPACK land, bestie, so grab a lil snack and let's go.
β¨ SYNOPSIS β¨
πΈ Functions/Subroutines πΈ
subroutine CHPRFS (uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, ferr,
berr, work, rwork, info)
That's CHPRFS, icon behavior only.
π¦ Function/Subroutine Documentation π¦
subroutine CHPRFS (character uplo, integer n, integer nrhs, complex,
dimension( * ) ap, complex, dimension( * ) afp, integer, dimension( * )
ipiv, 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)
CHPRFS β main character, obvi. π
π― Purpose
!>!> CHPRFS improves the computed solution to a system of linear!> equations when the coefficient matrix is Hermitian indefinite!> and packed, and provides error bounds and backward error estimates!> for the solution.!>
So like β you already solved your linear system, but the answer's a lil sus? CHPRFS is the glow-up step. It takes your solution, refines it, and hands you back error bounds and backward error estimates. Self-care, but for numerics. β¨
π Parameters
UPLOβ okay so this is aCHARACTER*1, and it tells us WHICH triangle we're fw with:
!> UPLO is CHARACTER*1!> = 'U': Upper triangle of A is stored;!> = 'L': Lower triangle of A is stored.!>
Nβ anINTEGER, the order of the matrix A. Constraint era:N >= 0. No negatives, periodt.
!> N is INTEGER!> The order of the matrix A. N >= 0.!>
NRHSβ anINTEGER, the number of right hand sides, i.e. the number of columns of the matrices B and X. AlsoNRHS >= 0. π«Ά
!> NRHS is INTEGER!> The number of right hand sides, i.e., the number of columns!> of the matrices B and X. NRHS >= 0.!>
APβ aCOMPLEXarray, dimension(N*(N+1)/2). It's the upper or lower triangle of the Hermitian matrix A, packed columnwise in a linear array. The j-th column of A lives in AP like this:
!> AP is COMPLEX array, dimension (N*(N+1)/2)!> The upper or lower triangle of the Hermitian matrix A, packed!> columnwise in a linear array. The j-th column of A is stored!> in the array AP as follows:!> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;!> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.!>
AFPβ aCOMPLEXarray, dimension(N*(N+1)/2). The factored form of the matrix A. It contains the block diagonal matrix D and the multipliers used to obtain the factor U or L from the factorizationA = U*D*U**HorA = L*D*L**Has computed byCHPTRF, stored as a packed triangular matrix. She's already been through the factorization pipeline, respectfully. π
!> AFP is COMPLEX array, dimension (N*(N+1)/2)!> The factored form of the matrix A. AFP contains the block!> diagonal matrix D and the multipliers used to obtain the!> factor U or L from the factorization A = U*D*U**H or!> A = L*D*L**H as computed by CHPTRF, stored as a packed!> triangular matrix.!>
IPIVβ anINTEGERarray, dimension(N). All the details of the interchanges and the block structure of D, as determined byCHPTRF. iykyk. π
!> IPIV is INTEGER array, dimension (N)!> Details of the interchanges and the block structure of D!> as determined by CHPTRF.!>
Bβ aCOMPLEXarray, dimension(LDB,NRHS). The right hand side matrix B. That's her. π
!> B is COMPLEX array, dimension (LDB,NRHS)!> The right hand side matrix B.!>
LDBβ anINTEGER, the leading dimension of the array B.LDB >= max(1,N). rules are rules π
!> LDB is INTEGER!> The leading dimension of the array B. LDB >= max(1,N).!>
Xβ aCOMPLEXarray, dimension(LDX,NRHS). On entry: the solution matrix X, as computed byCHPTRS. On exit: the improved solution matrix X. glow-up complete, queen. π
!> X is COMPLEX array, dimension (LDX,NRHS)!> On entry, the solution matrix X, as computed by CHPTRS.!> On exit, the improved solution matrix X.!>
LDXβ anINTEGER, the leading dimension of the array X.LDX >= max(1,N). π
!> LDX is INTEGER!> The leading dimension of the array X. LDX >= max(1,N).!>
FERRβ aREALarray, dimension(NRHS). The estimated forward error bound for each solution vectorX(j)(that's the j-th column of the solution matrix X). 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 it's almost always a slight overestimate of the true error β she's cautious, not wrong. π
!> 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.!>
BERRβ aREALarray, 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. fr fr, that's the whole definition.
!> 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β aCOMPLEXarray, dimension(2*N). scratch space, no notes. π§
!> WORK is COMPLEX array, dimension (2*N)!>
RWORKβ aREALarray, dimension(N). also scratch space.
!> RWORK is REAL array, dimension (N)!>
INFOβ anINTEGER, the vibe check:
!> INFO is INTEGER!> = 0: successful exit!> < 0: if INFO = -i, the i-th argument had an illegal value!>
π₯ Internal Parameters:
!> ITMAX is the maximum number of steps of iterative refinement.!>
That's it, that's the internal parameter. ITMAX β the max number of iterative refinement steps. lowkey the most important lil number in the room. β
πΈ Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Absolute legends, all of them. π«Ά
Definition at line 178 of file chprfs.f.
π¦ Author
Generated automatically by Doxygen for LAPACK from the source code. Not a human, just a very diligent robot. π€π
okay bye bestie, go refine some solutions β and remember, this whole page is from LAPACK, Version 3.12.0, autogenerated from /home/abui...RC/chprfs.f(3) in the Library Functions Manual. 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