ptrfs(3)
π¦ ptrfs β Library Functions Manual
okay bestie, welcome to ptrfs(3) from the Library Functions Manual π
this is the whole iterative-refinement glow-up for tridiagonal matrices β she takes your kinda-solved linear system and improves it, plus serves error bounds and backward error estimates on the side. no cap, it's giving "I fixed your answer while you were blinking." β¨
πΈ NAME
ptrfs β ptrfs: iterative refinement π
β¨ SYNOPSIS
π Functions
subroutine cptrfs (uplo, n, nrhs, d, e, df, ef, b, ldb, x, ldx, ferr,
berr, work, rwork, info)
CPTRFS
subroutine dptrfs (n, nrhs, d, e, df, ef, b, ldb, x, ldx, ferr, berr,
work, info)
DPTRFS
subroutine sptrfs (n, nrhs, d, e, df, ef, b, ldb, x, ldx, ferr, berr,
work, info)
SPTRFS
subroutine zptrfs (uplo, n, nrhs, d, e, df, ef, b, ldb, x, ldx, ferr,
berr, work, rwork, info)
ZPTRFS
π§ Detailed Description
like, the whole vibe of this page is "here are the docs for all four refinement routines, bestie." scroll for the full breakdown π
π Function Documentation
π« subroutine cptrfs
subroutine cptrfs (character uplo, integer n, integer nrhs, real, dimension(
* ) d, complex, dimension( * ) e, real, dimension( * ) df, complex,
dimension( * ) ef, 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)
CPTRFS
π Purpose:
okay so CPTRFS improves the computed solution to a system of linear equations when the coefficient matrix is Hermitian positive definite and tridiagonal π and it also hands you error bounds plus backward error estimates for the solution. iconic behavior, honestly.
π Parameters
UPLOβUPLOisCHARACTER*1. tells you whether the superdiagonal or the subdiagonal of the tridiagonal matrixAis stored, and what form the factorization takes:= 'U':Eis the superdiagonal ofA, andA = U**H*D*U;= 'L':Eis the subdiagonal ofA, andA = L*D*L**H. (the two forms are equivalent ifAis real, so don't stress π«Ά)NβNisINTEGER. the order of the matrixA.N >= 0.NRHSβNRHSisINTEGER. the number of right hand sides, i.e., the number of columns of the matrixB.NRHS >= 0.DβDisREAL array, dimension (N). thenreal diagonal elements of the tridiagonal matrixA.EβEisCOMPLEX array, dimension (N-1). the(n-1)off-diagonal elements of the tridiagonal matrixA(peepUPLOfor which side π).DFβDFisREAL array, dimension (N). thendiagonal elements of the diagonal matrixDfrom the factorization computed byCPTTRF.EFβEFisCOMPLEX array, dimension (N-1). the(n-1)off-diagonal elements of the unit bidiagonal factorUorLfrom the factorization computed byCPTTRF(again, seeUPLO).BβBisCOMPLEX array, dimension (LDB,NRHS). the right hand side matrixB. the main character we're solving for πLDBβLDBisINTEGER. the leading dimension of the arrayB.LDB >= max(1,N).XβXisCOMPLEX array, dimension (LDX,NRHS). on entry, the solution matrixX, as computed byCPTTRS. on exit, the improved solution matrixX. glow-up complete β¨LDXβLDXisINTEGER. the leading dimension of the arrayX.LDX >= max(1,N).FERRβFERRisREAL array, dimension (NRHS). the 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).BERRβBERRisREAL 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). literally "how much would I have to nudge things to make this answer perfect."WORKβWORKisCOMPLEX array, dimension (N).RWORKβRWORKisREAL array, dimension (N).INFOβINFOisINTEGER.= 0: successful exit π₯³.< 0: ifINFO = -i, thei-th argument had an illegal value π.
π Internal Parameters:
ITMAX is the maximum number of steps of iterative refinement. that's the how many glow-up passes number, bestie.
πΈ Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Definition at line 181 of file cptrfs.f.
π subroutine dptrfs
subroutine dptrfs (integer n, integer nrhs, double precision, dimension( * )
d, double precision, dimension( * ) e, double precision, dimension( * )
df, double precision, dimension( * ) ef, 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
info)
DPTRFS
π Purpose:
okay so DPTRFS improves the computed solution to a system of linear equations when the coefficient matrix is symmetric positive definite and tridiagonal π and yes, she also provides error bounds and backward error estimates for the solution. same energy, double precision edition.
π Parameters
NβNisINTEGER. the order of the matrixA.N >= 0.NRHSβNRHSisINTEGER. the number of right hand sides, i.e., the number of columns of the matrixB.NRHS >= 0.DβDisDOUBLE PRECISION array, dimension (N). thendiagonal elements of the tridiagonal matrixA.EβEisDOUBLE PRECISION array, dimension (N-1). the(n-1)subdiagonal elements of the tridiagonal matrixA.DFβDFisDOUBLE PRECISION array, dimension (N). thendiagonal elements of the diagonal matrixDfrom the factorization computed byDPTTRF.EFβEFisDOUBLE PRECISION array, dimension (N-1). the(n-1)subdiagonal elements of the unit bidiagonal factorLfrom the factorization computed byDPTTRF.BβBisDOUBLE PRECISION array, dimension (LDB,NRHS). the right hand side matrixB.LDBβLDBisINTEGER. the leading dimension of the arrayB.LDB >= max(1,N).XβXisDOUBLE PRECISION array, dimension (LDX,NRHS). on entry, the solution matrixX, as computed byDPTTRS. on exit, the improved solution matrixX. periodt β¨LDXβLDXisINTEGER. the leading dimension of the arrayX.LDX >= max(1,N).FERRβFERRisDOUBLE PRECISION array, dimension (NRHS). the 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).BERRβBERRisDOUBLE 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βWORKisDOUBLE PRECISION array, dimension (2*N). π note the2*N, bestie, don't skimp.INFOβINFOisINTEGER.= 0: successful exit π₯³.< 0: ifINFO = -i, thei-th argument had an illegal value π.
π Internal Parameters:
ITMAX is the maximum number of steps of iterative refinement.
πΈ Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Definition at line 161 of file dptrfs.f.
π¦ subroutine sptrfs
subroutine sptrfs (integer n, integer nrhs, real, dimension( * ) d, real,
dimension( * ) e, real, dimension( * ) df, real, dimension( * ) ef,
real, dimension( ldb, * ) b, integer ldb, real, dimension( ldx, * ) x,
integer ldx, real, dimension( * ) ferr, real, dimension( * ) berr, real,
dimension( * ) work, integer info)
SPTRFS
π Purpose:
okay so SPTRFS improves the computed solution to a system of linear equations when the coefficient matrix is symmetric positive definite and tridiagonal π and it also comes with error bounds and backward error estimates for the solution. the single-precision sister, serving the same looks.
π Parameters
NβNisINTEGER. the order of the matrixA.N >= 0.NRHSβNRHSisINTEGER. the number of right hand sides, i.e., the number of columns of the matrixB.NRHS >= 0.DβDisREAL array, dimension (N). thendiagonal elements of the tridiagonal matrixA.EβEisREAL array, dimension (N-1). the(n-1)subdiagonal elements of the tridiagonal matrixA.DFβDFisREAL array, dimension (N). thendiagonal elements of the diagonal matrixDfrom the factorization computed bySPTTRF.EFβEFisREAL array, dimension (N-1). the(n-1)subdiagonal elements of the unit bidiagonal factorLfrom the factorization computed bySPTTRF.BβBisREAL array, dimension (LDB,NRHS). the right hand side matrixB.LDBβLDBisINTEGER. the leading dimension of the arrayB.LDB >= max(1,N).XβXisREAL array, dimension (LDX,NRHS). on entry, the solution matrixX, as computed bySPTTRS. on exit, the improved solution matrixX. slay πLDXβLDXβINTEGER. The leading dimension of the arrayX.LDX >= max(1,N). πFERRβREALarray, dimension(NRHS). It's the forward error bound for each solution vectorX(j)(the j-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). Accuracy receipts, no cap. πBERRβREALarray, 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βREALarray, dimension(2*N). π οΈINFOβINTEGER.= 0: successful exit.< 0: ifINFO = -i, the i-th argument had an illegal value. π¨
π§ Internal Parameters
ITMAX is the maximum number of steps of iterative refinement. β¨
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 161 of file sptrfs.f.
π ZPTRFS π
subroutine zptrfs (character uplo, integer n, integer nrhs, double
precision, dimension( * ) d, complex*16, dimension( * ) e, double
precision, dimension( * ) df, complex*16, dimension( * ) ef, 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)
ZPTRFS
π― Purpose
ZPTRFS improves the computed solution to a system of linear equations when the coefficient matrix is Hermitian positive definite and tridiagonal, and it provides error bounds and backward error estimates for the solution. It's giving "your solution but make it more accurate" energy. π₯
π Parameters
UPLOβCHARACTER*1. Specifies whether the superdiagonal or the subdiagonal of the tridiagonal matrixAis stored and the form of the factorization:= 'U':Eis the superdiagonal ofA, andA = U**H*D*U;= 'L':Eis the subdiagonal ofA, andA = L*D*L**H. (The two forms are equivalent ifAis real.) π¦
NβINTEGER. The order of the matrixA.N >= 0.NRHSβINTEGER. The number of right hand sides, i.e., the number of columns of the matrixB.NRHS >= 0.DβDOUBLE PRECISIONarray, dimension(N). Thenreal diagonal elements of the tridiagonal matrixA.EβCOMPLEX*16array, dimension(N-1). The(n-1)off-diagonal elements of the tridiagonal matrixA(seeUPLO).DFβDOUBLE PRECISIONarray, dimension(N). Thendiagonal elements of the diagonal matrixDfrom the factorization computed byZPTTRF.EFβCOMPLEX*16array, dimension(N-1). The(n-1)off-diagonal elements of the unit bidiagonal factorUorLfrom the factorization computed byZPTTRF(seeUPLO).BβCOMPLEX*16array, dimension(LDB,NRHS). The right hand side matrixB.LDBβINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).XβCOMPLEX*16array, dimension(LDX,NRHS). On entry, the solution matrixX, as computed byZPTTRS. On exit, the improved solution matrixX. β¨LDXβINTEGER. The leading dimension of the arrayX.LDX >= max(1,N).FERRβDOUBLE PRECISIONarray, dimension(NRHS). The forward error bound for each solution vectorX(j)(the j-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). π§ΎBERRβDOUBLE PRECISIONarray, 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*16array, dimension(N). π οΈRWORKβDOUBLE PRECISIONarray, dimension(N). πΈINFOβINTEGER.= 0: successful exit.< 0: ifINFO = -i, the i-th argument had an illegal value. π¨
π§ Internal Parameters
ITMAX is the maximum number of steps of iterative refinement. β¨
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 181 of file zptrfs.f.
π Author: Generated automatically by Doxygen for LAPACK from the source code.
π okay that's the whole manual, bestie β signed, sealed, delivered from LAPACK Version 3.12.0, page ptrfs(3). No date in this footer, just vibes and impeccable Fortran. π
β¨
π¦ 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