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 β€” UPLO is CHARACTER*1. tells you whether the superdiagonal or the subdiagonal of the tridiagonal matrix A is stored, and what form the factorization takes: = 'U': E is the superdiagonal of A, and A = U**H*D*U; = 'L': E is the subdiagonal of A, and A = L*D*L**H. (the two forms are equivalent if A is real, so don't stress 🫢)
  • N β€” N is INTEGER. the order of the matrix A. N >= 0.
  • NRHS β€” NRHS is INTEGER. the number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
  • D β€” D is REAL array, dimension (N). the n real diagonal elements of the tridiagonal matrix A.
  • E β€” E is COMPLEX array, dimension (N-1). the (n-1) off-diagonal elements of the tridiagonal matrix A (peep UPLO for which side πŸ‘€).
  • DF β€” DF is REAL array, dimension (N). the n diagonal elements of the diagonal matrix D from the factorization computed by CPTTRF.
  • EF β€” EF is COMPLEX array, dimension (N-1). the (n-1) off-diagonal elements of the unit bidiagonal factor U or L from the factorization computed by CPTTRF (again, see UPLO).
  • B β€” B is COMPLEX array, dimension (LDB,NRHS). the right hand side matrix B. the main character we're solving for πŸ’…
  • LDB β€” LDB is INTEGER. the leading dimension of the array B. LDB >= max(1,N).
  • X β€” X is COMPLEX array, dimension (LDX,NRHS). on entry, the solution matrix X, as computed by CPTTRS. on exit, the improved solution matrix X. glow-up complete ✨
  • LDX β€” LDX is INTEGER. the leading dimension of the array X. LDX >= max(1,N).
  • FERR β€” FERR is REAL array, dimension (NRHS). the 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).
  • 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). literally "how much would I have to nudge things to make this answer perfect."
  • WORK β€” WORK is COMPLEX array, dimension (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 πŸ’€.

πŸ“ 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 β€” N is INTEGER. the order of the matrix A. N >= 0.
  • NRHS β€” NRHS is INTEGER. the number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
  • D β€” D is DOUBLE PRECISION array, dimension (N). the n diagonal elements of the tridiagonal matrix A.
  • E β€” E is DOUBLE PRECISION array, dimension (N-1). the (n-1) subdiagonal elements of the tridiagonal matrix A.
  • DF β€” DF is DOUBLE PRECISION array, dimension (N). the n diagonal elements of the diagonal matrix D from the factorization computed by DPTTRF.
  • EF β€” EF is DOUBLE PRECISION array, dimension (N-1). the (n-1) subdiagonal elements of the unit bidiagonal factor L from the factorization computed by DPTTRF.
  • 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). on entry, the solution matrix X, as computed by DPTTRS. on exit, the improved solution matrix X. periodt ✨
  • LDX β€” LDX is INTEGER. the leading dimension of the array X. LDX >= max(1,N).
  • FERR β€” FERR is DOUBLE PRECISION array, dimension (NRHS). the 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).
  • 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 (2*N). πŸ‘€ note the 2*N, bestie, don't skimp.
  • INFO β€” 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.

🌸 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 β€” N is INTEGER. the order of the matrix A. N >= 0.
  • NRHS β€” NRHS is INTEGER. the number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
  • D β€” D is REAL array, dimension (N). the n diagonal elements of the tridiagonal matrix A.
  • E β€” E is REAL array, dimension (N-1). the (n-1) subdiagonal elements of the tridiagonal matrix A.
  • DF β€” DF is REAL array, dimension (N). the n diagonal elements of the diagonal matrix D from the factorization computed by SPTTRF.
  • EF β€” EF is REAL array, dimension (N-1). the (n-1) subdiagonal elements of the unit bidiagonal factor L from the factorization computed by SPTTRF.
  • B β€” B is REAL 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 REAL array, dimension (LDX,NRHS). on entry, the solution matrix X, as computed by SPTTRS. on exit, the improved solution matrix X. slay 🌟
  • LDX β€”
  • LDX β€” INTEGER. The leading dimension of the array X. LDX >= max(1,N). πŸ’…
  • FERR β€” REAL array, dimension (NRHS). It's the 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). Accuracy receipts, no cap. πŸ“
  • 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). 🫢
  • WORK β€” REAL array, dimension (2*N). πŸ› οΈ
  • INFO β€” 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. ✨

πŸ‘‘ 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 matrix A is stored and the form of the factorization:
    • = 'U': E is the superdiagonal of A, and A = U**H*D*U;
    • = 'L': E is the subdiagonal of A, and A = L*D*L**H. (The two forms are equivalent if A is real.) πŸ¦‹
  • N β€” INTEGER. The order of the matrix A. N >= 0.
  • NRHS β€” INTEGER. The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
  • D β€” DOUBLE PRECISION array, dimension (N). The n real diagonal elements of the tridiagonal matrix A.
  • E β€” COMPLEX*16 array, dimension (N-1). The (n-1) off-diagonal elements of the tridiagonal matrix A (see UPLO).
  • DF β€” DOUBLE PRECISION array, dimension (N). The n diagonal elements of the diagonal matrix D from the factorization computed by ZPTTRF.
  • EF β€” COMPLEX*16 array, dimension (N-1). The (n-1) off-diagonal elements of the unit bidiagonal factor U or L from the factorization computed by ZPTTRF (see UPLO).
  • B β€” COMPLEX*16 array, dimension (LDB,NRHS). The right hand side matrix B.
  • LDB β€” INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • X β€” COMPLEX*16 array, dimension (LDX,NRHS). On entry, the solution matrix X, as computed by ZPTTRS. On exit, the improved solution matrix X. ✨
  • LDX β€” INTEGER. The leading dimension of the array X. LDX >= max(1,N).
  • FERR β€” DOUBLE PRECISION array, dimension (NRHS). The 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). 🧾
  • 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 (N). πŸ› οΈ
  • RWORK β€” DOUBLE PRECISION array, dimension (N). 🌸
  • INFO β€” 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. ✨

πŸ‘‘ 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