doubleGBcomputational(3)

πŸ“¦
version 3.11.0 Β· 2 versions
, in debian bookworm

πŸ’– doubleGBcomputational(3) β€” LAPACK, but make it make sense πŸ’–

okay bestie, welcome to the LAPACK corner of the universe where the matrices are banded and the vibes are immaculate. This is the manual page for the doubleGBcomputational squad β€” yes, that's the whole manual name, it's giving very "my full government name" energy and honestly? we respect it. πŸ’…


🌈 NAME 🌈

doubleGBcomputational β€” it's the double precision era, and it's all about GB matrices (that's general band matrices, iykyk) πŸ¦‹


✨ SYNOPSIS ✨

πŸŽ€ Functions πŸŽ€

  • dgbbrd β€” subroutine dgbbrd (VECT, M, N, NCC, KL, KU, AB, LDAB, D, E, Q, LDQ, PT, LDPT, C, LDC, WORK, INFO) β€” DGBBRD
  • dgbcon β€” subroutine dgbcon (NORM, N, KL, KU, AB, LDAB, IPIV, ANORM, RCOND, WORK, IWORK, INFO) β€” DGBCON
  • dgbequ β€” subroutine dgbequ (M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND, AMAX, INFO) β€” DGBEQU
  • dgbequb β€” subroutine dgbequb (M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND, AMAX, INFO) β€” DGBEQUB
  • dgbrfs β€” subroutine dgbrfs (TRANS, N, KL, KU, NRHS, AB, LDAB, AFB, LDAFB, IPIV, B, LDB, X, LDX, FERR, BERR, WORK, IWORK, INFO) β€” DGBRFS
  • dgbrfsx β€” subroutine dgbrfsx (TRANS, EQUED, N, KL, KU, NRHS, AB, LDAB, AFB, LDAFB, IPIV, R, C, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS, WORK, IWORK, INFO) β€” DGBRFSX
  • dgbtf2 β€” subroutine dgbtf2 (M, N, KL, KU, AB, LDAB, IPIV, INFO) β€” DGBTF2 computes the LU factorization of a general band matrix using the unblocked version of the algorithm.
  • dgbtrf β€” subroutine dgbtrf (M, N, KL, KU, AB, LDAB, IPIV, INFO) β€” DGBTRF
  • dgbtrs β€” subroutine dgbtrs (TRANS, N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB, INFO) β€” DGBTRS
  • dggbak β€” subroutine dggbak (JOB, SIDE, N, ILO, IHI, LSCALE, RSCALE, M, V, LDV, INFO) β€” DGGBAK
  • dggbal β€” subroutine dggbal (JOB, N, A, LDA, B, LDB, ILO, IHI, LSCALE, RSCALE, WORK, INFO) β€” DGGBAL
  • dla_gbamv β€” subroutine dla_gbamv (TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X, INCX, BETA, Y, INCY) β€” DLA_GBAMV performs a matrix-vector operation to calculate error bounds.
  • dla_gbrcond β€” double precision function dla_gbrcond (TRANS, N, KL, KU, AB, LDAB, AFB, LDAFB, IPIV, CMODE, C, INFO, WORK, IWORK) β€” DLA_GBRCOND estimates the Skeel condition number for a general banded matrix.
  • dla_gbrfsx_extended β€” subroutine dla_gbrfsx_extended (PREC_TYPE, TRANS_TYPE, N, KL, KU, NRHS, AB, LDAB, AFB, LDAFB, IPIV, COLEQU, C, B, LDB, Y, LDY, BERR_OUT, N_NORMS, ERR_BNDS_NORM, ERR_BNDS_COMP, RES, AYB, DY, Y_TAIL, RCOND, ITHRESH, RTHRESH, DZ_UB, IGNORE_CWISE, INFO) β€” DLA_GBRFSX_EXTENDED improves the computed solution to a system of linear equations for general banded matrices by performing extra-precise iterative refinement and provides error bounds and backward error estimates for the solution.
  • dla_gbrpvgrw β€” double precision function dla_gbrpvgrw (N, KL, KU, NCOLS, AB, LDAB, AFB, LDAFB) β€” DLA_GBRPVGRW computes the reciprocal pivot growth factor norm(A)/norm(U) for a general banded matrix.
  • dorgbr β€” subroutine dorgbr (VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO) β€” DORGBR

🫢 Detailed Description 🫢

This is the group of double computational functions for GB matrices ✨


πŸ‘‘ Function Documentation πŸ‘‘

dgbbrd β€” DGBBRD πŸ¦‹

subroutine dgbbrd (character VECT, integer M, integer N, integer NCC,
    integer KL, integer KU, double precision, dimension( ldab, * ) AB,
    integer LDAB, double precision, dimension( * ) D, double precision,
    dimension( * ) E, double precision, dimension( ldq, * ) Q, integer LDQ,
    double precision, dimension( ldpt, * ) PT, integer LDPT, double
    precision, dimension( ldc, * ) C, integer LDC, double precision,
    dimension( * ) WORK, integer INFO)

πŸ’œ Purpose:

DGBBRD reduces a real general m-by-n band matrix A to upper bidiagonal form B by an orthogonal transformation: Q**T * A * P = B.

The routine computes B, and optionally forms Q or P**T, or computes Q**T*C for a given matrix C.

πŸŽ€ Parameters πŸŽ€

  • VECT β€” VECT is CHARACTER*1. Specifies whether or not the matrices Q and P**T are to be formed.
    • = 'N': do not form Q or P**T;
    • = 'Q': form Q only;
    • = 'P': form P**T only;
    • = 'B': form both.
  • M β€” M is INTEGER. The number of rows of the matrix A. M >= 0.
  • N β€” N is INTEGER. The number of columns of the matrix A. N >= 0.
  • NCC β€” NCC is INTEGER. The number of columns of the matrix C. NCC >= 0.
  • KL β€” KL is INTEGER. The number of subdiagonals of the matrix A. KL >= 0.
  • KU β€” KU is INTEGER. The number of superdiagonals of the matrix A. KU >= 0.
  • AB β€” AB is DOUBLE PRECISION array, dimension (LDAB,N). On entry, the m-by-n band matrix A, stored in rows 1 to KL+KU+1. The j-th column of A is stored in the j-th column of the array AB as follows: AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl). On exit, A is overwritten by values generated during the reduction.
  • LDAB β€” LDAB is INTEGER. The leading dimension of the array A. LDAB >= KL+KU+1.
  • D β€” D is DOUBLE PRECISION array, dimension (min(M,N)). The diagonal elements of the bidiagonal matrix B.
  • E β€” E is DOUBLE PRECISION array, dimension (min(M,N)-1). The superdiagonal elements of the bidiagonal matrix B.
  • Q β€” Q is DOUBLE PRECISION array, dimension (LDQ,M). If VECT = 'Q' or 'B', the m-by-m orthogonal matrix Q. If VECT = 'N' or 'P', the array Q is not referenced.
  • LDQ β€” LDQ is INTEGER. The leading dimension of the array Q. LDQ >= max(1,M) if VECT = 'Q' or 'B'; LDQ >= 1 otherwise.
  • PT β€” PT is DOUBLE PRECISION array, dimension (LDPT,N). If VECT = 'P' or 'B', the n-by-n orthogonal matrix P'. If VECT = 'N' or 'Q', the array PT is not referenced.
  • LDPT β€” LDPT is INTEGER. The leading dimension of the array PT. LDPT >= max(1,N) if VECT = 'P' or 'B'; LDPT >= 1 otherwise.
  • C β€” C is DOUBLE PRECISION array, dimension (LDC,NCC). On entry, an m-by-ncc matrix C. On exit, C is overwritten by Q**T*C. C is not referenced if NCC = 0.
  • LDC β€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M) if NCC > 0; LDC >= 1 if NCC = 0.
  • WORK β€” WORK is DOUBLE PRECISION array, dimension (2*max(M,N))
  • INFO β€” INFO is INTEGER
    • = 0: successful exit.
    • < 0: if INFO = -i, the i-th argument had an illegal value.

🌸 Author 🌸

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.


dgbcon β€” DGBCON πŸ’…

subroutine dgbcon (character NORM, integer N, integer KL, integer KU, double
    precision, dimension( ldab, * ) AB, integer LDAB, integer, dimension( *
    ) IPIV, double precision ANORM, double precision RCOND, double
    precision, dimension( * ) WORK, integer, dimension( * ) IWORK, integer
    INFO)

πŸ’œ Purpose:

DGBCON estimates the reciprocal of the condition number of a real general band matrix A, in either the 1-norm or the infinity-norm, using the LU factorization computed by DGBTRF.

An estimate is obtained for norm(inv(A)), and the reciprocal of the condition number is computed as

RCOND = 1 / ( norm(A) * norm(inv(A)) ).

πŸŽ€ Parameters πŸŽ€

  • NORM β€” NORM is CHARACTER*1. Specifies whether the 1-norm condition number or the infinity-norm condition number is required:
    • = '1' or 'O': 1-norm;
    • = 'I': Infinity-norm.
  • N β€” N is INTEGER. The order of the matrix A. N >= 0.
  • KL β€” KL is INTEGER. The number of subdiagonals within the band of A. KL >= 0.
  • KU β€” KU is INTEGER. The number of superdiagonals within the band of A. KU >= 0.
  • AB β€” AB is DOUBLE PRECISION array, dimension (LDAB,N). Details of the LU factorization of the band matrix A, as computed by DGBTRF. U is stored as an upper triangular band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and the multipliers used during the factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
  • LDAB β€” LDAB is INTEGER. The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
  • IPIV β€” IPIV is INTEGER array, dimension (N). The pivot indices; for 1 <= i <= N, row i of the matrix was interchanged with row IPIV(i).
  • ANORM β€” ANORM is DOUBLE PRECISION. If NORM = '1' or 'O', the 1-norm of the original matrix A. If NORM = 'I', the infinity-norm of the original matrix A.
  • RCOND β€” RCOND is DOUBLE PRECISION. The reciprocal of the condition number of the matrix A, computed as RCOND = 1/(norm(A) * norm(inv(A))).
  • WORK β€” WORK is DOUBLE PRECISION array, dimension (3*N)
  • IWORK β€” IWORK is INTEGER array, dimension (N)
  • INFO β€” INFO is INTEGER
    • = 0: successful exit
    • < 0: if INFO = -i, the i-th argument had an illegal value

🌸 Author 🌸

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.


dgbequ β€” DGBEQU πŸ“

subroutine dgbequ (integer M, integer N, integer KL, integer KU, double
    precision, dimension( ldab, * ) AB, integer LDAB, double precision,
    dimension( * ) R, double precision, dimension( * ) C, double precision
    ROWCND, double precision COLCND, double precision AMAX, integer INFO)

πŸ’œ Purpose:

DGBEQU computes row and column scalings intended to equilibrate an M-by-N band matrix A and reduce its condition number. R returns the row scale factors and C the column scale factors, chosen to try to make the largest element in each row and column of the matrix B with elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.

R(i) and C(j) are restricted to be between SMLNUM = smallest safe number and BIGNUM = largest safe number. Use of these scaling factors is not guaranteed to reduce the condition number of A but works well in practice.

πŸŽ€ Parameters πŸŽ€

  • M β€” M is INTEGER. The number of rows of the matrix A. M >= 0.
  • N β€” N is INTEGER. The number of columns of the matrix A. N >= 0.
  • KL β€” KL is INTEGER. The number of subdiagonals within the band of A. KL >= 0.
  • KU β€” KU is INTEGER. The number of subdiagonals within the band of A. KL >= 0.
  • KU β€” KU is INTEGER, the number of superdiagonals living inside the band of A. Constraint: KU >= 0. πŸ’…
  • AB β€” AB is DOUBLE PRECISION array, dimension (LDAB,N). This is the band matrix A, chillin' in rows 1 to KL+KU+1. The j-th column of A lives in the j-th column of the array AB, like this:
AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl).
  • LDAB β€” LDAB is INTEGER, the leading dimension of the array AB. Constraint: LDAB >= KL+KU+1. πŸ‘‘
  • R β€” R is DOUBLE PRECISION array, dimension (M). If INFO = 0, or INFO > M, then R is holding the row scale factors for A. ✨
  • C β€” C is DOUBLE PRECISION array, dimension (N). If INFO = 0, then C contains the column scale factors for A.
  • ROWCND β€” ROWCND is DOUBLE PRECISION. If INFO = 0 or INFO > M, ROWCND contains the ratio of the smallest R(i) to the largest R(i). And bestie, listen: if ROWCND >= 0.1 and AMAX is neither too large nor too small, it is not worth scaling by R. periodt.
  • COLCND β€” COLCND is DOUBLE PRECISION. If INFO = 0, COLCND contains the ratio of the smallest C(i) to the largest C(i). If COLCND >= 0.1, it is not worth scaling by C. πŸ™ˆ
  • AMAX β€” AMAX is DOUBLE PRECISION. This is the absolute value of the largest matrix element. If AMAX is very close to overflow or very close to underflow, the matrix should be scaled. 🚨
  • INFO β€” INFO is INTEGER:
    • = 0: successful exit ✨
    • < 0: if INFO = -i, the i-th argument had an illegal value 😭
    • > 0: if INFO = i, and i is:
      • <= M: the i-th row of A is exactly zero
      • > M: the (i-M)-th column of A is exactly zero

Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.


subroutine dgbequb β€” DGBEQUB 🌈

subroutine dgbequb (integer M, integer N, integer KL, integer KU, double
    precision, dimension( ldab, * ) AB, integer LDAB, double precision,
    dimension( * ) R, double precision, dimension( * ) C, double precision
    ROWCND, double precision COLCND, double precision AMAX, integer INFO)

Purpose

DGBEQUB computes row and column scalings intended to equilibrate an M-by-N matrix A and reduce its condition number. R returns the row scale factors and C the column scale factors, chosen to try to make the largest element in each row and column of the matrix B with elements B(i,j)=R(i)*A(i,j)*C(j) have an absolute value of at most the radix. πŸ”₯

R(i) and C(j) are restricted to be a power of the radix between SMLNUM = smallest safe number and BIGNUM = largest safe number. Use of these scaling factors is not guaranteed to reduce the condition number of A but works well in practice. no cap.

This routine differs from DGEEQU by restricting the scaling factors to a power of the radix. Barring over- and underflow, scaling by these factors introduces no additional rounding errors. However, the scaled entries' magnitudes are no longer approximately 1 but lie between sqrt(radix) and 1/sqrt(radix). 🀯

Parameters

  • M β€” M is INTEGER, the number of rows of the matrix A. Constraint: M >= 0.
  • N β€” N is INTEGER, the number of columns of the matrix A. Constraint: N >= 0.
  • KL β€” KL is INTEGER, the number of subdiagonals within the band of A. Constraint: KL >= 0.
  • KU β€” KU is INTEGER, the number of superdiagonals within the band of A. Constraint: KU >= 0. πŸ’…
  • AB β€” AB is DOUBLE PRECISION array, dimension (LDAB,N). On entry, the matrix A in band storage, in rows 1 to KL+KU+1. The j-th column of A is stored in the j-th column of the array AB as follows:
AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
  • LDAB β€” LDAB is INTEGER, the leading dimension of the array A. Constraint: LDAB >= max(1,M). πŸ‘‘
  • R β€” R is DOUBLE PRECISION array, dimension (M). If INFO = 0 or INFO > M, R contains the row scale factors for A. ✨
  • C β€” C is DOUBLE PRECISION array, dimension (N). If INFO = 0, C contains the column scale factors for A.
  • ROWCND β€” ROWCND is DOUBLE PRECISION. If INFO = 0 or INFO > M, ROWCND contains the ratio of the smallest R(i) to the largest R(i). If ROWCND >= 0.1 and AMAX is neither too large nor too small, it is not worth scaling by R.
  • COLCND β€” COLCND is DOUBLE PRECISION. If INFO = 0, COLCND contains the ratio of the smallest C(i) to the largest C(i). If COLCND >= 0.1, it is not worth scaling by C. πŸ™ˆ
  • AMAX β€” AMAX is DOUBLE PRECISION. Absolute value of largest matrix element. If AMAX is very close to overflow or very close to underflow, the matrix should be scaled. 🚨
  • INFO β€” INFO is INTEGER:
    • = 0: successful exit ✨
    • < 0: if INFO = -i, the i-th argument had an illegal value 😭
    • > 0: if INFO = i, and i is:
      • <= M: the i-th row of A is exactly zero
      • > M: the (i-M)-th column of A is exactly zero

Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.


subroutine dgbrfs β€” DGBRFS πŸ¦‹

subroutine dgbrfs (character TRANS, integer N, integer KL, integer KU,
    integer NRHS, double precision, dimension( ldab, * ) AB, integer LDAB,
    double precision, dimension( ldafb, * ) AFB, integer LDAFB, integer,
    dimension( * ) IPIV, 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)

Purpose

DGBRFS improves the computed solution to a system of linear equations when the coefficient matrix is banded, and provides error bounds and backward error estimates for the solution. it's giving accuracy glow-up. πŸ’–

Parameters

  • TRANS β€” TRANS is 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)
  • N β€” N is INTEGER, the order of the matrix A. Constraint: N >= 0.
  • KL β€” KL is INTEGER, the number of subdiagonals within the band of A. Constraint: KL >= 0.
  • KU β€” KU is INTEGER, the number of superdiagonals within the band of A. Constraint: KU >= 0.
  • NRHS β€” NRHS is INTEGER, the number of right hand sides, i.e., the number of columns of the matrices B and X. Constraint: NRHS >= 0.
  • AB β€” AB is DOUBLE PRECISION array, dimension (LDAB,N). The original band matrix A, stored in rows 1 to KL+KU+1. The j-th column of A is stored in the j-th column of the array AB as follows:
AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
  • LDAB β€” LDAB is INTEGER, the leading dimension of the array AB. Constraint: LDAB >= KL+KU+1. πŸ‘‘
  • AFB β€” AFB is DOUBLE PRECISION array, dimension (LDAFB,N). Details of the LU factorization of the band matrix A, as computed by DGBTRF. U is stored as an upper triangular band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and the multipliers used during the factorization are stored in rows KL+KU+2 to 2*KL+KU+1. ✨
  • LDAFB β€” LDAFB is INTEGER, the leading dimension of the array AFB. Constraint: LDAFB >= 2*KL*KU+1.
  • IPIV β€” IPIV is INTEGER array, dimension (N). The pivot indices from DGBTRF; for 1<=i<=N, row i of the matrix was interchanged with row IPIV(i).
  • 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. Constraint: LDB >= max(1,N).
  • X β€” X is DOUBLE PRECISION array, dimension (LDX,NRHS). On entry, the solution matrix X, as computed by DGBTRS. On exit, the improved solution matrix X. πŸ’…
  • LDX β€” LDX is INTEGER, the leading dimension of the array X. Constraint: LDX >= max(1,N).
  • FERR β€” FERR is DOUBLE PRECISION 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 β€” 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 (3*N)
  • IWORK β€” IWORK is INTEGER 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. πŸ”₯

Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

πŸ’… subroutine dgbrfsx

okay bestie so this one is a subroutine, meaning she doesn't hand you back a value β€” she just does the work and slides the results into the arguments you gave her. Here's the full squad, character-for-character, exactly how the compiler needs to see them:

   subroutine dgbrfsx (character TRANS, character EQUED, integer N, integer KL,
       integer KU, integer NRHS, double precision, dimension( ldab, * ) AB,
       integer LDAB, double precision, dimension( ldafb, * ) AFB, integer
       LDAFB, integer, dimension( * ) IPIV, double precision, dimension( * ) R,
       double precision, dimension( * ) C, double precision, dimension( ldb, *
       ) B, integer LDB, double precision, dimension( ldx , * ) X, integer LDX,
       double precision RCOND, double precision, dimension( * ) BERR, integer
       N_ERR_BNDS, double precision, dimension( nrhs, * ) ERR_BNDS_NORM, double
       precision, dimension( nrhs, * ) ERR_BNDS_COMP, integer NPARAMS, double
       precision, dimension( * ) PARAMS, double precision, dimension( * ) WORK,
       integer, dimension( * ) IWORK, integer INFO)

✨ Purpose ✨

DGBRFSX is the glow-up routine. She takes the solution you already computed to a system of linear equations, makes it better, and then hands you receipts: error bounds and backward error estimates for the solution. And she's not one-note about it β€” on top of the normwise error bound, she'll also give you the maximum componentwise error bound whenever that's possible. (Peep the comments for ERR_BNDS_NORM and ERR_BNDS_COMP if you want the full tea on how those bounds work.)

Now, plot twist: your original system of linear equations might have already been equilibrated before you ever called her β€” that's the whole EQUED, R and C situation described down below. If that's what happened, don't stress: the solution and error bounds she returns are for the original, unequilibrated system. She un-does the glow-up math for you. πŸ‘‘

And there's a lil' bundle of optional settings living inside the PARAMS array. Those knobs decide how the refinement gets performed β€” but honestly? The defaults are usually giving exactly what you need. If the defaults are fine for you, you can just pass NPARAMS = 0, which stops the source code from even touching the PARAMS argument. Lazy girl math but make it correct. πŸ’…


πŸŽ€ Parameters πŸŽ€

  • TRANS β€” TRANS is CHARACTER*1. Tells us which form of the system of equations we're solving:
    • = 'N': A * X = B (no transpose)
    • = 'T': A**T * X = B (transpose)
    • = 'C': A**H * X = B (conjugate transpose = transpose)
  • EQUED β€” EQUED is CHARACTER*1. Which flavor of equilibration got applied to A before this routine was called. She genuinely needs this to compute the solution and the error bounds correctly, so don't lie to her:
    • = 'N': no equilibration
    • = 'R': row equilibration, i.e., A has been premultiplied by diag(R).
    • = 'C': column equilibration, i.e., A has been postmultiplied by diag(C).
    • = 'B': both row and column equilibration, i.e., A has been replaced by diag(R) * A * diag(C). The right hand side B has been changed accordingly.
  • N β€” N is INTEGER. The order of the matrix A. Constraint: N >= 0.
  • KL β€” KL is INTEGER. How many subdiagonals live inside the band of A. Constraint: KL >= 0.
  • KU β€” KU is INTEGER. How many superdiagonals live inside the band of A. Constraint: KU >= 0.
  • NRHS β€” NRHS is INTEGER. The number of right hand sides, aka the number of columns of the matrices B and X. Constraint: NRHS >= 0.
  • AB β€” AB is DOUBLE PRECISION array, dimension (LDAB,N). The original band matrix A, stored in rows 1 to KL+KU+1. The j-th column of A is stored in the j-th column of the array AB like so:
AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
  • LDAB β€” LDAB is INTEGER. The leading dimension of the array AB. Constraint: LDAB >= KL+KU+1.
  • AFB β€” AFB is DOUBLE PRECISION array, dimension (LDAFB,N). The details of the LU factorization of the band matrix A, exactly as computed by DGBTRF. U is stored as an upper triangular band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and the multipliers that got used during the factorization are parked in rows KL+KU+2 to 2*KL+KU+1.
  • LDAFB β€” LDAFB is INTEGER. The leading dimension of the array AFB. Constraint: LDAFB >= 2*KL*KU+1.
  • IPIV β€” IPIV is INTEGER array, dimension (N). The pivot indices from DGETRF; for 1<=i<=N, row i of the matrix was interchanged with row IPIV(i).
  • R β€” R is DOUBLE PRECISION array, dimension (N). The row scale factors for A. If EQUED = 'R' or 'B', A is multiplied on the left by diag(R); if EQUED = 'N' or 'C', R is not accessed at all. R is an input argument if FACT = 'F'; otherwise, R is an output argument. If FACT = 'F' and EQUED = 'R' or 'B', every element of R must be positive. If R is output, each element of R is a power of the radix. If R is input, each element of R should be a power of the radix to ensure a reliable solution and error estimates. Scaling by powers of the radix does not cause rounding errors unless the result underflows or overflows. Rounding errors during scaling lead to refining with a matrix that is not equivalent to the input matrix, producing error estimates that may not be reliable.
  • C β€” C is DOUBLE PRECISION array, dimension (N). The column scale factors for A. If EQUED = 'C' or 'B', A is multiplied on the right by diag(C); if EQUED = 'N' or 'R', C is not accessed at all. C is an input argument if FACT = 'F'; otherwise, C is an output argument. If FACT = 'F' and EQUED = 'C' or 'B', every element of C must be positive. If C is output, each element of C is a power of the radix. If C is input, each element of C should be a power of the radix to ensure a reliable solution and error estimates. Scaling by powers of the radix does not cause rounding errors unless the result underflows or overflows. Rounding errors during scaling lead to refining with a matrix that is not equivalent to the input matrix, producing error estimates that may not be reliable.
lowkey important: those "should be a power of the radix" lines on R and C are not decoration, bestie. Ignore them and your error estimates may stop being trustworthy. πŸ™ˆ
  • 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. Constraint: LDB >= max(1,N).
  • X β€” X is DOUBLE PRECISION array, dimension (LDX,NRHS). On entry, the solution matrix X, as computed by DGETRS. On exit, the improved solution matrix X. ✨ glow-up complete.
  • LDX β€” LDX is INTEGER. The leading dimension of the array X. Constraint: LDX >= max(1,N).
  • RCOND β€” RCOND is DOUBLE PRECISION. Reciprocal scaled condition number. This is an estimate of the reciprocal Skeel condition number of the matrix A after equilibration (if any happened). If this comes back less than the machine precision β€” and yes, in particular if it's zero β€” then the matrix is singular to working precision. But heads up: even if this number is tiny and the matrix is looking all ill-conditioned, the error can still be small. Don't panic-read this one. 🫢
  • BERR β€” BERR is DOUBLE PRECISION array, dimension (NRHS). Componentwise relative backward error. That's 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.
  • N_ERR_BNDS β€” N_ERR_BNDS is INTEGER. How many error bounds to return for each right hand side and each type (normwise or componentwise). See ERR_BNDS_NORM and ERR_BNDS_COMP right below. πŸ‘‡
  • ERR_BNDS_NORM β€” ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS). For each right-hand side, this array is stuffed with info about the various error bounds and condition numbers corresponding to the normwise relative error, which is defined like this:
Normwise relative error in the ith solution vector:
        max_j (abs(XTRUE(j,i) - X(j,i)))
       ------------------------------
             max_j abs(X(j,i))

The array is indexed by the type of error information, described below. There currently are up to three pieces of information returned.

The first index in ERR_BNDS_NORM(i,:) corresponds to the ith right-hand side.

The second index in ERR_BNDS_NORM(:,err) contains the following three fields:

  • err = 1 β€” the 'Trust/don't trust' boolean. Trust the answer if the reciprocal condition number is less than the threshold sqrt(n) * dlamch('Epsilon').
  • err = 2 β€” the 'Guaranteed' error bound: the estimated forward error, almost certainly within a factor of 10 of the true error, so long as the next entry is greater than the threshold sqrt(n) * dlamch('Epsilon'). This error bound should only be trusted if the previous boolean is true.
  • err = 3 β€” Reciprocal condition number: the estimated normwise reciprocal condition number. This gets compared with the threshold sqrt(n) * dlamch('Epsilon') to determine whether the error estimate is 'guaranteed'. These reciprocal condition numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some appropriately scaled matrix Z. Let Z = S*A, where S scales each row by a power of the radix so all absolute row sums of Z are approximately 1.

See Lapack Working Note 165 for further details and extra cautions.

  • ERR_BNDS_COMP β€” ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS). For each right-hand side, this array carries info about the various error bounds and condition numbers corresponding to the componentwise relative error, which is defined like this:
Componentwise relative error in the ith solution vector:
                       abs(XTRUE(j,i) - X(j,i))
                max_j ----------------------
                            abs(X(j,i))

okay so <pink>ERR_BNDS_COMP</pink> is indexed by the right-hand side i β€” the side where the componentwise relative error actually depends on things β€” and then by the type of error info, which we're about to break all the way down. There are currently up to three pieces of info returned for each right-hand side. If componentwise accuracy was never requested (that's PARAMS(3) = 0.0), then <hotpink>ERR_BNDS_COMP</hotpink> is not accessed at all. And if N_ERR_BNDS < 3, then at most the first (:,N_ERR_BNDS) entries are returned. That's the whole deal, no cap.

The first index in ERR_BNDS_COMP(i,:) corresponds to the ith right-hand side. Simple, cute, iconic.

The second index in ERR_BNDS_COMP(:,err) contains the following three fields:

  • err = 1 β€” the <purple>'Trust/don't trust'</purple> boolean. Trust the answer if the reciprocal condition number is less than the threshold sqrt(n) * dlamch('Epsilon').
  • err = 2 β€” the <purple>'Guaranteed'</purple> error bound: the estimated forward error, almost certainly within a factor of 10 of the true error so long as the next entry is greater than the threshold sqrt(n) * dlamch('Epsilon'). And lowkey β€” this error bound should only be trusted if the previous boolean is true. Otherwise bestie it is giving nothing.
  • err = 3 β€” reciprocal condition number: the estimated componentwise reciprocal condition number. You compare it with the threshold sqrt(n) * dlamch('Epsilon') to determine if the error estimate is 'guaranteed'. These reciprocal condition numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some appropriately scaled matrix Z. Let Z = S*(A*diag(x)), where x is the solution for the current right-hand side and S scales each row of A*diag(x) by a power of the radix so all absolute row sums of Z are approximately 1.
πŸ“š Want the full lore plus extra cautions? See Lapack Working Note 165. That's the receipts, fr fr.

πŸ’« NPARAMS

NPARAMS is INTEGER. It specifies the number of parameters set in PARAMS. If <= 0, the PARAMS array is never referenced and default values are used. Periodt.

πŸ’« PARAMS

PARAMS is DOUBLE PRECISION array, dimension (NPARAMS). It specifies algorithm parameters. If an entry is < 0.0, then that entry will be filled with the default value used for that parameter. Only positions up to NPARAMS are accessed; defaults are used for higher-numbered parameters.

  • PARAMS(LA_LINRX_ITREF_I = 1) β€” whether to perform iterative refinement or not.
    • Default: 1.0D+0
    • = 0.0: no refinement is performed, and no error bounds are computed.
    • = 1.0: use the double-precision refinement algorithm, possibly with doubled-single computations if the compilation environment does not support DOUBLE PRECISION.
    • (other values are reserved for future use)
  • PARAMS(LA_LINRX_ITHRESH_I = 2) β€” maximum number of residual computations allowed for refinement.
    • Default: 10
    • Aggressive: set to 100 to permit convergence using approximate factorizations or factorizations other than LU. 🚨 If the factorization uses a technique other than Gaussian elimination, the guarantees in err_bnds_norm and err_bnds_comp may no longer be trustworthy.
  • PARAMS(LA_LINRX_CWISE_I = 3) β€” flag determining if the code will attempt to find a solution with small componentwise relative error in the double-precision algorithm. Positive is true, 0.0 is false.
    • Default: 1.0 (attempt componentwise convergence)

πŸ’« WORK

WORK is DOUBLE PRECISION array, dimension (4*N)

πŸ’« IWORK

IWORK is INTEGER array, dimension (N)

πŸ’« INFO

INFO is INTEGER

  • = 0: successful exit. The solution to every right-hand side is guaranteed. πŸ’–
  • < 0: if INFO = -i, the i-th argument had an illegal value. Rude, but okay.
  • > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution and error bounds could not be computed. RCOND = 0 is returned.
  • = N+J: the solution corresponding to the Jth right-hand side is not guaranteed. The solutions corresponding to other right-hand sides K with K > J may not be guaranteed as well, but only the first such right-hand side is reported. If a small componentwise error is not requested (PARAMS(3) = 0.0) then the Jth right-hand side is the first with a normwise error bound that is not guaranteed (the smallest J such that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0) the Jth right-hand side is the first with either a normwise or componentwise error bound that is not guaranteed (the smallest J such that either ERR_BNDS_NORM(J,1) = 0.0 or ERR_BNDS_COMP(J,1) = 0.0). See the definition of ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information about all of the right-hand sides, check ERR_BNDS_NORM or ERR_BNDS_COMP.

πŸ’œ Author πŸ’œ

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

πŸ¦‹ subroutine dgbtf2 πŸ¦‹

subroutine dgbtf2 (integer M, integer N, integer KL, integer KU, double
    precision, dimension( ldab, * ) AB, integer LDAB, integer, dimension( *
    ) IPIV, integer INFO)

DGBTF2 computes the LU factorization of a general band matrix using the unblocked version of the algorithm. Yes, the unblocked one, we're going vintage.

✨ Purpose: ✨

DGBTF2 computes an LU factorization of a real m-by-n band matrix A using partial pivoting with row interchanges.

This is the unblocked version of the algorithm, calling Level 2 BLAS.

✨ Parameters ✨

  • M β€” M is INTEGER. The number of rows of the matrix A. M >= 0.
  • N β€” N is INTEGER. The number of columns of the matrix A. N >= 0.
  • KL β€” KL is INTEGER. The number of subdiagonals within the band of A. KL >= 0.
  • KU β€” KU is INTEGER. The number of superdiagonals within the band of A. KU >= 0.
  • AB β€” AB is DOUBLE PRECISION array, dimension (LDAB,N). On entry, the matrix A in band storage, in rows KL+1 to 2*KL+KU+1; rows 1 to KL of the array need not be set. The j-th column of A is stored in the j-th column of the array AB as follows:
AB(kl+ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)

On exit, details of the factorization: U is stored as an upper triangular band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and the multipliers used during the factorization are stored in rows KL+KU+2 to 2*KL+KU+1. See below for further details.

  • LDAB β€” LDAB is INTEGER. The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
  • IPIV β€” IPIV is INTEGER array, dimension (min(M,N)). The pivot indices; for 1 <= i <= min(M,N), row i of the matrix was interchanged with row IPIV(i).
  • INFO β€” INFO is INTEGER
    • = 0: successful exit
    • < 0: if INFO = -i, the i-th argument had an illegal value
    • > 0: if INFO = +i, U(i,i) is exactly zero. The factorization has been completed, but the factor U is exactly singular, and division by zero will occur if it is used to solve a system of equations. πŸ’€

✨ Author ✨

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

✨ Further Details: ✨

The band storage scheme is illustrated by the following example, when M = N = 6, KL = 2, KU = 1:

On entry:                       On exit:

    *    *    *    +    +    +       *    *    *   u14  u25  u36
    *    *    +    +    +    +       *    *   u13  u24  u35  u46
    *   a12  a23  a34  a45  a56      *   u12  u23  u34  u45  u56
   a11  a22  a33  a44  a55  a66     u11  u22  u33  u44  u55  u66
   a21  a32  a43  a54  a65   *      m21  m32  m43  m54  m65   *
   a31  a42  a53  a64   *    *      m31  m42  m53  m64   *    *

Array elements marked * are not used by the routine; elements marked + need not be set on entry, but are required by the routine to store elements of U, because of fill-in resulting from the row interchanges.


πŸ¦‹ subroutine dgbtrf πŸ¦‹

subroutine dgbtrf (integer M, integer N, integer KL, integer KU, double
    precision, dimension( ldab, * ) AB, integer LDAB, integer, dimension( *
    ) IPIV, integer INFO)

DGBTRF β€” that's literally the whole one-line description, bestie. No notes.

✨ Purpose: ✨

DGBTRF computes an LU factorization of a real m-by-n band matrix A using partial pivoting with row interchanges.

This is the blocked version of the algorithm, calling Level 3 BLAS. Glow up from its unblocked sibling. ✨

✨ Parameters ✨

  • M β€” M is INTEGER. The number of rows of the matrix A. M >= 0.
  • N β€” N is INTEGER. The number of columns of the matrix A. N >= 0.
  • KL β€” KL is INTEGER. The number of subdiagonals within the band of A. KL >= 0.
  • KU β€” KU is INTEGER. The number of superdiagonals within the band of A. KU >= 0.
  • AB β€” AB is DOUBLE PRECISION array, dimension (LDAB,N). On entry, the matrix A in band storage, in rows KL+1 to 2*KL+KU+1; rows 1 to KL of the array need not be set. The j-th column of A is stored in the j-th column of the array AB as follows:
AB(kl+ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)

On exit, details of the factorization: U is stored as an upper triangular band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and the multipliers used during the factorization are stored in rows KL+KU+2 to 2*KL+KU+1. See below for further details.

  • LDAB
  • LDAB β€” LDAB is INTEGER. It's the leading dimension of the array AB, and bestie, LDAB >= 2*KL+KU+1. That's the rule, no cap. πŸ’…
  • IPIV β€” IPIV is INTEGER array, dimension (min(M,N)). These are the pivot indices: for 1 <= i <= min(M,N), row i of the matrix was interchanged with row IPIV(i). She's been shuffled around, and IPIV remembers every single swap. πŸ”₯
  • INFO β€” INFO is INTEGER, and it's the vibe check on how everything went:
    • = 0: successful exit. Slay. ✨
    • < 0: if INFO = -i, the i-th argument had an illegal value. Not it. 😭
    • > 0: if INFO = +i, U(i,i) is exactly zero. The factorization has been completed, but the factor U is exactly singular, and division by zero will occur if it is used to solve a system of equations. 🫠

πŸ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.


πŸ¦‹ Further Details:

The band storage scheme is illustrated by the following example, when M = N = 6, KL = 2, KU = 1:

On entry:                       On exit:

    *    *    *    +    +    +       *    *    *   u14  u25  u36
    *    *    +    +    +    +       *    *   u13  u24  u35  u46
    *   a12  a23  a34  a45  a56      *   u12  u23  u34  u45  u56
   a11  a22  a33  a44  a55  a66     u11  u22  u33  u44  u55  u66
   a21  a32  a43  a54  a65   *      m21  m32  m43  m54  m65   *
   a31  a42  a53  a64   *    *      m31  m42  m53  m64   *    *

Array elements marked * are not used by the routine; elements marked + need not be set on entry, but are required by the routine to store elements of U because of fill-in resulting from the row interchanges. Okay so the * girlies are just chillin', untouched, and the + slots are empty at first but the routine is gonna need them later for the fill-in glow-up. 🌸


✨ subroutine dgbtrs ✨

subroutine dgbtrs (character TRANS, integer N, integer KL, integer KU,
    integer NRHS, double precision, dimension( ldab, * ) AB, integer LDAB,
    integer, dimension( * ) IPIV, double precision, dimension( ldb, * ) B,
    integer LDB, integer INFO)

DGBTRS

πŸ’– Purpose:

DGBTRS solves a system of linear equations

   A * X = B  or  A**T * X = B

with a general band matrix A using the LU factorization computed by DGBTRF. She's the second half of the duo β€” DGBTRF does the factoring, and DGBTRS actually solves the thing. Dynamic duo behavior. 🫢

πŸŽ€ Parameters

  • TRANS β€” TRANS is CHARACTER*1. Specifies the form of the system of equations.
    • = 'N': A * X = B (No transpose)
    • = 'T': A**T* X = B (Transpose)
    • = 'C': A**T* X = B (Conjugate transpose = Transpose)
  • N β€” N is INTEGER. The order of the matrix A. N >= 0.
  • KL β€” KL is INTEGER. The number of subdiagonals within the band of A. KL >= 0.
  • KU β€” KU is INTEGER. The number of superdiagonals within the band of A. KU >= 0.
  • NRHS β€” NRHS is INTEGER. The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
  • AB β€” AB is DOUBLE PRECISION array, dimension (LDAB,N). Details of the LU factorization of the band matrix A, as computed by DGBTRF. U is stored as an upper triangular band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and the multipliers used during the factorization are stored in rows KL+KU+2 to 2*KL+KU+1. It's all stacked in there, iconic organization honestly. πŸ’…
  • LDAB β€” LDAB is INTEGER. The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
  • IPIV β€” IPIV is INTEGER array, dimension (N). The pivot indices; for 1 <= i <= N, row i of the matrix was interchanged with row IPIV(i).
  • B β€” B is DOUBLE PRECISION array, dimension (LDB,NRHS). On entry, the right hand side matrix B. On exit, the solution matrix X. She goes in as the problem and comes out as the answer, main character energy fr. πŸ”₯
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • INFO β€” INFO is INTEGER.
    • = 0: successful exit ✨
    • < 0: if INFO = -i, the i-th argument had an illegal value 😭

πŸ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.


🌈 subroutine dggbak 🌈

subroutine dggbak (character JOB, character SIDE, integer N, integer ILO,
    integer IHI, double precision, dimension( * ) LSCALE, double precision,
    dimension( * ) RSCALE, integer M, double precision, dimension( ldv, * )
    V, integer LDV, integer INFO)

DGGBAK

πŸ’– Purpose:

DGGBAK forms the right or left eigenvectors of a real generalized eigenvalue problem A*x = lambda*B*x, by backward transformation on the computed eigenvectors of the balanced pair of matrices output by DGGBAL. Basically: DGGBAL did the balancing, and now DGGBAK undoes it so your eigenvectors actually mean something in the original problem. Undo button, but make it math. 🧚

πŸŽ€ Parameters

  • JOB β€” JOB is CHARACTER*1. Specifies the type of backward transformation required:
    • = 'N': do nothing, return immediately;
    • = 'P': do backward transformation for permutation only;
    • = 'S': do backward transformation for scaling only;
    • = 'B': do backward transformations for both permutation and scaling.

JOB must be the same as the argument JOB supplied to DGGBAL. Like, they have to match, okay? No mismatched energy allowed here. πŸ’…

  • SIDE β€” SIDE is CHARACTER*1.
    • = 'R': V contains right eigenvectors;
    • = 'L': V contains left eigenvectors.
  • N β€” N is INTEGER. The number of rows of the matrix V. N >= 0.
  • ILO β€” ILO is INTEGER
  • IHI β€” IHI is INTEGER

The integers ILO and IHI determined by DGGBAL. 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.

  • LSCALE β€” LSCALE is DOUBLE PRECISION array, dimension (N). Details of the permutations and/or scaling factors applied to the left side of A and B, as returned by DGGBAL.
  • RSCALE β€” RSCALE is DOUBLE PRECISION array, dimension (N). Details of the permutations and/or scaling factors applied to the right side of A and B, as returned by DGGBAL.
  • M β€” M is INTEGER. The number of columns of the matrix V. M >= 0.
  • V β€” V is DOUBLE PRECISION array, dimension (LDV,M). On entry, the matrix of right or left eigenvectors to be transformed, as returned by DTGEVC. On exit, V is overwritten by the transformed eigenvectors. Glow-up complete. ✨
  • LDV β€” LDV is INTEGER. The leading dimension of the matrix V. LDV >= max(1,N).
  • INFO β€” INFO is INTEGER.
    • = 0: successful exit.
    • < 0: if INFO = -i, the i-th argument had an illegal value.

πŸ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

πŸ¦‹ Further Details:

See R.C. Ward, Balancing the generalized eigenvalue problem, SIAM J. Sci. Stat. Comp. 2 (1981), 141-152.


πŸ“ subroutine dggbal πŸ“

subroutine dggbal (character JOB, integer N, double precision, dimension(
    lda, * ) A, integer LDA, double precision, dimension( ldb, * ) B,
    integer LDB, integer ILO, integer IHI, double precision, dimension( * )
    LSCALE, double precision, dimension( * ) RSCALE, double precision,
    dimension( * ) WORK, integer INFO)

DGGBAL

πŸ’– Purpose:

DGGBAL balances a pair of general real matrices (A,B). This involves, first, permuting A and B by similarity transformations to isolate eigenvalues in the first 1 to ILO$-$1 and last IHI+1 to N elements on the diagonal; and second, applying a diagonal similarity transformation to rows and columns ILO to IHI to make the rows and columns as close in norm as possible. Both steps are optional. She's out here tidying up your matrices so the eigenvalue problem behaves. So thoughtful. πŸŽ€

Balancing may reduce the 1-norm of the matrices, and improve the accuracy of the computed eigenvalues and/or eigenvectors in the generalized eigenvalue problem A*x = lambda*B*x. So like, it's optional but it's also lowkey the reason your answers are accurate. Just saying. πŸ’…

πŸŽ€ Parameters

  • JOB β€” JOB is CHARACTER*1. Specifies the operations to be performed on A and B:
    • = 'N': none: simply set ILO = 1, IHI = N, LSCALE(I) = 1.0 and RSCALE(I) = 1.0 for i = 1,...,N.
    • = 'P': permute only;
    • = 'S': scale only;
    • = 'B': both permute and scale.
  • N β€” N is INTEGER. The order of the matrices A and B. N >= 0.
  • A β€” A is DOUBLE PRECISION array, dimension (LDA,N). On entry, the input matrix A. On exit, A is overwritten by the balanced matrix. If JOB = 'N', A is not referenced. She didn't even look at her, periodt. πŸ™ˆ
  • LDA β€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,N).
  • B β€” B is DOUBLE PRECISION array, dimension (LDB,N). On entry, the input matrix B. On exit, B is overwritten by the balanced matrix. If JOB = 'N', B is not referenced.
  • LDB β€” LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • ILO β€” ILO is INTEGER
  • IHI β€” IHI is INTEGER

ILO and IHI are set to integers such that on exit A(i,j) = 0 and B(i,j) = 0 if i > j and j = 1,...,ILO-1 or i = IHI+1,...,N. If JOB = 'N' or 'S', ILO = 1 and IHI = N.

  • LSCALE β€” LSCALE is DOUBLE PRECISION array, dimension (N). Details of the permutations and scaling factors applied to the left side of A and B. If P(j) is the index of the row interchanged with row j, and D(j) is the scaling factor applied to row j, then
  LSCALE(j) = P(j)    for J = 1,...,ILO-1
            = D(j)    for J = ILO,...,IHI
            = P(j)    for J = IHI+1,...,N.

The order in which the interchanges are made is N to IHI+1, then 1 to ILO-1. Order matters bestie, don't come for her sequencing. πŸ’œ

  • RSCALE
  • RSCALE β€” it's a DOUBLE PRECISION array, dimension (N). She holds the receipts on the permutations and scaling factors that got applied to the right side of A and B. So if P(j) is the index of the column that got swapped with column j, and D(j) is the scaling factor that got applied to column j, then bestie, here's the tea:
  LSCALE(j) = P(j)    for J = 1,...,ILO-1
            = D(j)    for J = ILO,...,IHI
            = P(j)    for J = IHI+1,...,N.

And the order in which those interchanges go down? It's N to IHI+1, then 1 to ILO-1. That's the sequence, don't fight it. πŸ’…

  • WORK β€” WORK is a DOUBLE PRECISION array, dimension (lwork). Now listen: lwork has to be at least max(1,6*N) when JOB = 'S' or 'B', and at least 1 when JOB = 'N' or 'P'. Don't skimp on the workspace, she needs her room. ✨
  • INFO β€” INFO is INTEGER, and she's the vibe check at the end:
    • = 0: successful exit, we ate, no notes. πŸŽ€
    • < 0: if INFO = -i, then the i-th argument had an illegal value. Somebody fumbled the input, not us.

πŸ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

πŸ“š Further Details:

See R.C. WARD, Balancing the generalized eigenvalue problem, SIAM J. Sci. Stat. Comp. 2 (1981), 141-152.

πŸ¦‹ subroutine dla_gbamv

subroutine dla_gbamv (integer TRANS, integer M, integer N, integer KL,
    integer KU, double precision ALPHA, double precision, dimension( ldab, *
    ) AB, integer LDAB, double precision, dimension( * ) X, integer INCX,
    double precision BETA, double precision, dimension( * ) Y, integer INCY)

DLA_GBAMV does a matrix-vector operation to calculate error bounds. That's literally her whole job, and she's so good at it. 🫢

🎯 Purpose:

So DLA_GBAMV performs one of these matrix-vector operations:

     y := alpha*abs(A)*abs(x) + beta*abs(y),
or   y := alpha*abs(A)**T*abs(x) + beta*abs(y),

where alpha and beta are scalars, x and y are vectors, and A is an m by n matrix.

This function is primarily used in calculating error bounds. And here's the underflow protection lore, bestie: to protect against underflow during evaluation, components in the resulting vector get perturbed away from zero by (N+1) times the underflow threshold. And to prevent unnecessarily large errors for block-structure embedded in general matrices, the 'symbolically' zero components do not get perturbed. A zero entry is considered 'symbolic' if all the multiplications involved in computing that entry have at least one zero multiplicand. iykyk πŸ’…

βš™οΈ Parameters

  • TRANS β€” TRANS is INTEGER. On entry, TRANS specifies the operation to be performed, as follows:
  BLAS_NO_TRANS      y := alpha*abs(A)*abs(x) + beta*abs(y)
  BLAS_TRANS         y := alpha*abs(A**T)*abs(x) + beta*abs(y)
  BLAS_CONJ_TRANS    y := alpha*abs(A**T)*abs(x) + beta*abs(y)

Unchanged on exit. Periodt. ✨

  • M β€” M is INTEGER. On entry, M specifies the number of rows of the matrix A. M must be at least zero. Unchanged on exit.
  • N β€” N is INTEGER. On entry, N specifies the number of columns of the matrix A. N must be at least zero. Unchanged on exit.
  • KL β€” KL is INTEGER. The number of subdiagonals within the band of A. KL >= 0.
  • KU β€” KU is INTEGER. The number of superdiagonals within the band of A. KU >= 0.
  • ALPHA β€” ALPHA is DOUBLE PRECISION. On entry, ALPHA specifies the scalar alpha. Unchanged on exit.
  • AB β€” AB is a DOUBLE PRECISION array, dimension ( LDAB, n ). Before entry, the leading m by n part of the array AB must contain the matrix of coefficients. Unchanged on exit.
  • LDAB β€” LDAB is INTEGER. On entry, LDA specifies the first dimension of AB as declared in the calling (sub) program. LDAB must be at least max( 1, m ). Unchanged on exit.
  • X β€” X is a DOUBLE PRECISION array, dimension ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n', and at least ( 1 + ( m - 1 )*abs( INCX ) ) otherwise. Before entry, the incremented array X must contain the vector x. Unchanged on exit.
  • INCX β€” INCX is INTEGER. On entry, INCX specifies the increment for the elements of X. INCX must not be zero. Unchanged on exit.
  • BETA β€” BETA is DOUBLE PRECISION. On entry, BETA specifies the scalar beta. When BETA is supplied as zero then Y need not be set on input. Unchanged on exit.
  • Y β€” Y is a DOUBLE PRECISION array, dimension ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n', and at least ( 1 + ( n - 1 )*abs( INCY ) ) otherwise. Before entry with BETA non-zero, the incremented array Y must contain the vector y. On exit, Y is overwritten by the updated vector y. πŸ’…
  • INCY β€” INCY is INTEGER. On entry, INCY specifies the increment for the elements of Y. INCY must not be zero. Unchanged on exit.
Level 2 Blas routine.

πŸ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.


🌸 double precision function dla_gbrcond

double precision function dla_gbrcond (character TRANS, integer N, integer
    KL, integer KU, double precision, dimension( ldab, * ) AB, integer LDAB,
    double precision, dimension( ldafb, * ) AFB, integer LDAFB, integer,
    dimension( * ) IPIV, integer CMODE, double precision, dimension( * ) C,
    integer INFO, double precision, dimension( * ) WORK, integer, dimension(
    * ) IWORK)

DLA_GBRCOND estimates the Skeel condition number for a general banded matrix. Iconic behaviour honestly. ✨

🎯 Purpose:

        DLA_GBRCOND Estimates the Skeel condition number of  op(A) * op2(C)
        where op2 is determined by CMODE as follows
        CMODE =  1    op2(C) = C
        CMODE =  0    op2(C) = I
        CMODE = -1    op2(C) = inv(C)
        The Skeel condition number  cond(A) = norminf( |inv(A)||A| )
        is computed by computing scaling factors R such that
        diag(R)*A*op2(C) is row equilibrated and computing the standard
        infinity-norm condition number.

βš™οΈ Parameters

  • TRANS β€” TRANS is 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)
  • N β€” N is INTEGER. The number of linear equations, i.e., the order of the matrix A. N >= 0.
  • KL β€” KL is INTEGER. The number of subdiagonals within the band of A. KL >= 0.
  • KU β€” KU is INTEGER. The number of superdiagonals within the band of A. KU >= 0.
  • AB β€” AB is a DOUBLE PRECISION array, dimension (LDAB,N). On entry, the matrix A in band storage, in rows 1 to KL+KU+1. The j-th column of A is stored in the j-th column of the array AB as follows:
  AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
  • LDAB β€” LDAB is INTEGER. The leading dimension of the array AB. LDAB >= KL+KU+1.
  • AFB β€” AFB is a DOUBLE PRECISION array, dimension (LDAFB,N). Details of the LU factorization of the band matrix A, as computed by DGBTRF. U is stored as an upper triangular band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and the multipliers used during the factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
  • LDAFB β€” LDAFB is INTEGER. The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
  • IPIV β€” IPIV is an INTEGER array, dimension (N). The pivot indices from the factorization A = P*L*U as computed by DGBTRF; row i of the matrix was interchanged with row IPIV(i).
  • CMODE β€” CMODE is INTEGER. Determines op2(C) in the formula op(A) * op2(C) as follows:
    • CMODE = 1 op2(C) = C
    • CMODE = 0 op2(C) = I
    • CMODE = -1 op2(C) = inv(C)
  • C β€” C is a DOUBLE PRECISION array, dimension (N). The vector C in the formula op(A) * op2(C).
  • INFO β€” INFO is INTEGER.
    • = 0: Successful exit.
    • i > 0: The ith argument is invalid. πŸ™ˆ
  • WORK β€” WORK is a DOUBLE PRECISION array, dimension (5*N). Workspace, bestie.
  • IWORK β€” IWORK is an INTEGER array, dimension (N). More workspace. πŸŽ€

πŸ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.


🧚 subroutine dla_gbrfsx_extended

subroutine dla_gbrfsx_extended (integer PREC_TYPE, integer TRANS_TYPE,
    integer N, integer KL, integer KU, integer NRHS, double precision,
    dimension( ldab, * ) AB, integer LDAB, double precision, dimension(
    ldafb, * ) AFB, integer LDAFB, integer, dimension( * ) IPIV, logical
    COLEQU, double precision, dimension( * ) C, double precision, dimension(
    ldb, * ) B, integer LDB, double precision, dimension( ldy, * ) Y,
    integer LDY, double precision, dimension(*) BERR_OUT, integer N_NORMS,
    double precision, dimension( nrhs, * ) ERR_BNDS_NORM, double precision,
    dimension( nrhs, * ) ERR_BNDS_COMP, double precision, dimension(*) RES,
    double precision, dimension(*) AYB, double precision, dimension(*) DY,
    double precision, dimension(*) Y_TAIL, double precision RCOND, integer
    ITHRESH, double precision RTHRESH, double precision DZ_UB, logical
    IGNORE_CWISE, integer INFO)

DLA_GBRFSX_EXTENDED improves the computed solution to a system of linear equations for general banded matrices by performing extra-precise iterative refinement, and she also provides error bounds and backward error estimates for the solution. Multitasking queen. πŸ‘‘

🎯 Purpose:

DLA_GBRFSX_EXTENDED is the glow-up routine ✨ it improves the computed solution to a system of linear equations by doing extra-precise iterative refinement, and it hands you error bounds plus backward error estimates for the solution. DGBRFSX is the one that calls it to run that iterative refinement. On top of the normwise error bound, the code also gives you the maximum componentwise error bound when it possibly can β€” peek the comments for ERR_BNDS_NORM and ERR_BNDS_COMP for all the deets on those bounds. But real talk: this subroutine is only responsible for setting the second fields of ERR_BNDS_NORM and ERR_BNDS_COMP. That's its whole job, no cap πŸ’…

  • PREC_TYPE β€” INTEGER. Specifies the intermediate precision to be used in refinement. The value is defined by ILAPREC(P) where P is a CHARACTER, and:
    • P = 'S': Single
    • P = 'D': Double
    • P = 'I': Indigenous
    • P = 'X' or P = 'E': Extra
  • TRANS_TYPE β€” INTEGER. Specifies the transposition operation on A. The value is defined by ILATRANS(T) where T is a CHARACTER, and:
    • T = 'N': No transpose
    • T = 'T': Transpose
    • T = 'C': Conjugate transpose
  • N β€” INTEGER. The number of linear equations, aka the order of the matrix A. N >= 0.
  • KL β€” INTEGER. The number of subdiagonals within the band of A. KL >= 0.
  • KU β€” INTEGER. The number of superdiagonals within the band of A. KU >= 0
  • NRHS β€” INTEGER. The number of right-hand-sides, i.e., the number of columns of the matrix B.
  • AB β€” DOUBLE PRECISION array, dimension (LDAB,N). On entry, the N-by-N matrix AB.
  • LDAB β€” INTEGER. The leading dimension of the array AB. LDBA >= max(1,N).
  • AFB β€” DOUBLE PRECISION array, dimension (LDAFB,N). The factors L and U from the factorization A = P*L*U as computed by DGBTRF.
  • LDAFB β€” INTEGER. The leading dimension of the array AF. LDAFB >= max(1,N).
  • IPIV β€” INTEGER array, dimension (N). The pivot indices from the factorization A = P*L*U as computed by DGBTRF; row i of the matrix was interchanged with row IPIV(i).
  • COLEQU β€” LOGICAL. If .TRUE. then column equilibration was done to A before calling this routine. This is needed to compute the solution and error bounds correctly β€” no shortcuts bestie πŸ™ˆ
  • C β€” DOUBLE PRECISION array, dimension (N). The column scale factors for A. If COLEQU = .FALSE., C is not accessed. If C is input, each element of C should be a power of the radix to ensure a reliable solution and error estimates. Scaling by powers of the radix does not cause rounding errors unless the result underflows or overflows. Rounding errors during scaling lead to refining with a matrix that is not equivalent to the input matrix, producing error estimates that may not be reliable. πŸ‘€ so like, keep it to powers of the radix, okay?
  • B β€” DOUBLE PRECISION array, dimension (LDB,NRHS). The right-hand-side matrix B.
  • LDB β€” INTEGER. The leading dimension of the array B. LDB >= max(1,N).
  • Y β€” DOUBLE PRECISION array, dimension (LDY,NRHS). On entry, the solution matrix X, as computed by DGBTRS. On exit, the improved solution matrix Y. the glow-up happened πŸ’–
  • LDY β€” INTEGER. The leading dimension of the array Y. LDY >= max(1,N).
  • BERR_OUT β€” DOUBLE PRECISION array, dimension (NRHS). On exit, BERR_OUT(j) contains the componentwise relative backward error for right-hand-side j from the formula
max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )

where abs(Z) is the componentwise absolute value of the matrix or vector Z. This is computed by DLA_LIN_BERR.

  • N_NORMS β€” INTEGER. Determines which error bounds to return (see ERR_BNDS_NORM and ERR_BNDS_COMP).
    • If N_NORMS >= 1 return normwise error bounds.
    • If N_NORMS >= 2 return componentwise error bounds.
  • ERR_BNDS_NORM β€” DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS). For each right-hand side, this array contains information about various error bounds and condition numbers corresponding to the normwise relative error, which is defined as follows:

Normwise relative error in the ith solution vector:

      max_j (abs(XTRUE(j,i) - X(j,i)))
     ------------------------------
           max_j abs(X(j,i))

The array is indexed by the type of error information as described below. There currently are up to three pieces of information returned.

The first index in ERR_BNDS_NORM(i,:) corresponds to the ith right-hand side.

The second index in ERR_BNDS_NORM(:,err) contains the following three fields:

  • err = 1 β€” the 'Trust/don't trust' boolean. Trust the answer if the reciprocal condition number is less than the threshold sqrt(n) * slamch('Epsilon').
  • err = 2 β€” the 'Guaranteed' error bound: the estimated forward error, almost certainly within a factor of 10 of the true error so long as the next entry is greater than the threshold sqrt(n) * slamch('Epsilon'). This error bound should only be trusted if the previous boolean is true.
  • err = 3 β€” the reciprocal condition number: estimated normwise reciprocal condition number. Compared with the threshold sqrt(n) * slamch('Epsilon') to determine if the error estimate is 'guaranteed'. These reciprocal condition numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some appropriately scaled matrix Z. Let Z = S*A, where S scales each row by a power of the radix so all absolute row sums of Z are approximately 1.

This subroutine is only responsible for setting the second field above.

See Lapack Working Note 165 for further details and extra cautions. πŸ““

  • ERR_BNDS_COMP β€” DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS). For each right-hand side, this array contains information about various error bounds and condition numbers corresponding to the componentwise relative error, which is defined as follows:

Componentwise relative error in the ith solution vector:

                       abs(XTRUE(j,i) - X(j,i))
                max_j ----------------------
                            abs(X(j,i))

The array is indexed by the right-hand side i (on which the componentwise relative error depends), and the type of error information as described below. There currently are up to three pieces of information returned for each right-hand side. If componentwise accuracy is not requested (PARAMS(3) = 0.0), then ERR_BNDS_COMP is not accessed. If N_ERR_BNDS < 3, then at most the first (:,N_ERR_BNDS) entries are returned.

The first index in ERR_BNDS_COMP(i,:) corresponds to the ith right-hand side.

The second index in ERR_BNDS_COMP(:,err) contains the following three fields:

  • err = 1 β€” the 'Trust/don't trust' boolean. Trust the answer if the reciprocal condition number is less than the threshold sqrt(n) * slamch('Epsilon').
  • err = 2 β€” the 'Guaranteed' error bound: the estimated forward error, almost certainly within a factor of 10 of the true error so long as the next entry is greater than the threshold sqrt(n) * slamch('Epsilon'). This error bound should only be trusted if the previous boolean is true.
  • err = 3 β€” the reciprocal condition number: estimated componentwise reciprocal condition number. Compared with the threshold sqrt(n) * slamch('Epsilon') to determine if the error estimate is 'guaranteed'. These reciprocal condition numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some appropriately scaled matrix Z. Let Z = S*(A*diag(x)), where x is the solution for the current right-hand side and S scales each row of A*diag(x) by a power of the radix so all absolute row sums of Z are approximately 1.

This subroutine is only responsible for setting the second field above.

See Lapack Working Note 165 for further details and extra cautions. πŸ““

  • RES β€” DOUBLE PRECISION array, dimension (N). Workspace to hold the intermediate residual.
  • AYB β€” DOUBLE PRECISION array, dimension (N). Workspace. This can be the same workspace passed for Y_TAIL.
  • DY β€” DOUBLE PRECISION array, dimension (N). Workspace to hold the intermediate solution.
  • Y_TAIL β€” DOUBLE PRECISION array, dimension (N). Workspace to hold the trailing bits of the intermediate solution.
  • RCOND β€” DOUBLE PRECISION. Reciprocal scaled condition number. This is an estimate of the reciprocal Skeel condition number of the matrix A after equilibration (if done). If this is less than the machine precision (in particular, if it is zero), the matrix is singular to working precision. Note that the error may still be small even if this number is very small and the matrix appears ill-conditioned. 😭 don't panic just bc it's tiny, okay?
  • ITHRESH
  • ITHRESH β€” ITHRESH is INTEGER πŸ’– The max number of residual computations allowed for refinement, bestie. Default is 10. For 'aggressive' set it to 100 to permit convergence using approximate factorizations or factorizations other than LU. But lowkey be careful: if the factorization uses a technique other than Gaussian elimination, the guarantees in ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy. 😭
  • RTHRESH β€” RTHRESH is DOUBLE PRECISION ✨ Determines when to stop refinement if the error estimate stops decreasing. Refinement will stop when the next solution no longer satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. Default is 0.5. For 'aggressive' set to 0.9 to permit convergence on extremely ill-conditioned matrices. See LAWN 165 for more details. πŸ‘‘
  • DZ_UB β€” DZ_UB is DOUBLE PRECISION πŸ¦‹ Determines when to start considering componentwise convergence. Componentwise convergence is only considered after each component of the solution Y is stable, which we define as the relative change in each component being less than DZ_UB. Default value is 0.25, requiring the first bit to be stable. See LAWN 165 for more details. 🌸
  • IGNORE_CWISE β€” IGNORE_CWISE is LOGICAL πŸ’… If .TRUE. then ignore componentwise convergence. Default value is .FALSE.. Periodt.
  • INFO β€” INFO is INTEGER πŸ”₯
    • = 0: Successful exit. Yay!
    • < 0: if INFO = -i, the ith argument to DGBTRS had an illegal value. Not iconic.

πŸ‘‘ Author πŸ‘‘

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

πŸ’« double precision function dla_gbrpvgrw πŸ’«

double precision function dla_gbrpvgrw (integer N, integer KL, integer KU,
    integer NCOLS, double precision, dimension( ldab, * ) AB, integer LDAB,
    double precision, dimension( ldafb, * ) AFB, integer LDAFB)

DLA_GBRPVGRW computes the reciprocal pivot growth factor norm(A)/norm(U) for a general banded matrix. Slay.

🎯 Purpose 🎯

DLA_GBRPVGRW computes the reciprocal pivot growth factor norm(A)/norm(U). The 'max absolute element' norm is used. If this is much less than 1, the stability of the LU factorization of the (equilibrated) matrix A could be poor. This also means that the solution X, estimated condition numbers, and error bounds could be unreliable. Big yikes. 😭

✨ Parameters ✨

  • N β€” N is INTEGER πŸ’– The number of linear equations, i.e., the order of the matrix A. N >= 0.
  • KL β€” KL is INTEGER 🌸 The number of subdiagonals within the band of A. KL >= 0.
  • KU β€” KU is INTEGER πŸ¦‹ The number of superdiagonals within the band of A. KU >= 0.
  • NCOLS β€” NCOLS is INTEGER πŸ’… The number of columns of the matrix A. NCOLS >= 0.
  • AB β€” AB is DOUBLE PRECISION array, dimension (LDAB,N) πŸ”₯ On entry, the matrix A in band storage, in rows 1 to KL+KU+1. The j-th column of A is stored in the j-th column of the array AB as follows:
AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)

Keep it exact, bestie.

  • LDAB β€” LDAB is INTEGER πŸ‘‘ The leading dimension of the array AB. LDAB >= KL+KU+1.
  • AFB β€” AFB is DOUBLE PRECISION array, dimension (LDAFB,N) 🌈 Details of the LU factorization of the band matrix A, as computed by DGBTRF. U is stored as an upper triangular band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and the multipliers used during the factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
  • LDAFB β€” LDAFB is INTEGER ⭐ The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.

πŸ‘‘ Author πŸ‘‘

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

🌟 subroutine dorgbr 🌟

subroutine dorgbr (character VECT, integer M, integer N, integer K, double
    precision, dimension( lda, * ) A, integer LDA, double precision,
    dimension( * ) TAU, double precision, dimension( * ) WORK, integer
    LWORK, integer INFO)

DORGBR

🎯 Purpose 🎯

DORGBR generates one of the real orthogonal matrices Q or P**T determined by DGEBRD when reducing a real matrix A to bidiagonal form: A = Q * B * P**T. Q and P**T are defined as products of elementary reflectors H(i) or G(i) respectively. Main character energy.

If VECT = 'Q', A is assumed to have been an M-by-K matrix, and Q is of order M:

  • if m >= k, Q = H(1) H(2) . . . H(k) and DORGBR returns the first n columns of Q, where m >= n >= k;
  • if m < k, Q = H(1) H(2) . . . H(m-1) and DORGBR returns Q as an M-by-M matrix.

If VECT = 'P', A is assumed to have been a K-by-N matrix, and P**T is of order N:

  • if k < n, P**T = G(k) . . . G(2) G(1) and DORGBR returns the first m rows of P**T, where n >= m >= k;
  • if k >= n, P**T = G(n-1) . . . G(2) G(1) and DORGBR returns P**T as an N-by-N matrix.

✨ Parameters ✨

  • VECT β€” VECT is CHARACTER1* πŸ’– Specifies whether the matrix Q or the matrix P**T is required, as defined in the transformation applied by DGEBRD:
    • = 'Q': generate Q;
    • = 'P': generate P**T.
  • M β€” M is INTEGER 🌸 The number of rows of the matrix Q or P**T to be returned. M >= 0.
  • N β€” N is INTEGER πŸ¦‹ The number of columns of the matrix Q or P**T to be returned. N >= 0. If VECT = 'Q', M >= N >= min(M,K); if VECT = 'P', N >= M >= min(N,K).
  • K β€” K is INTEGER πŸ’… If VECT = 'Q', the number of columns in the original M-by-K matrix reduced by DGEBRD. If VECT = 'P', the number of rows in the original K-by-N matrix reduced by DGEBRD. K >= 0.
  • A β€” A is DOUBLE PRECISION array, dimension (LDA,N) πŸ”₯ On entry, the vectors which define the elementary reflectors, as returned by DGEBRD. On exit, the M-by-N matrix Q or P**T.
  • LDA β€” LDA is INTEGER πŸ‘‘ The leading dimension of the array A. LDA >= max(1,M).
  • TAU β€” TAU is DOUBLE PRECISION array, dimension 🌈
    • (min(M,K)) if VECT = 'Q'
    • (min(N,K)) if VECT = 'P' TAU(i) must contain the scalar factor of the elementary reflector H(i) or G(i), which determines Q or P**T, as returned by DGEBRD in its array argument TAUQ or TAUP.
  • WORK β€” WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)) ⭐ On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
  • LWORK β€” LWORK is INTEGER πŸ’œ The dimension of the array WORK. LWORK >= max(1,min(M,N)). For optimum performance LWORK >= min(M,N)*NB, where NB is the optimal blocksize. If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA. No cap.
  • INFO β€” INFO is INTEGER πŸ’–
    • = 0: successful exit
    • < 0: if INFO = -i, the i-th argument had an illegal value

πŸ‘‘ Author πŸ‘‘

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

πŸ€– Author πŸ€–

Generated automatically by Doxygen for LAPACK from the source code.

And that's the tea, bestie! This whole iconic page is from LAPACK Version 3.11.0, dated Sun Nov 27 2022. Stay slay. πŸ’…βœ¨πŸ’–

πŸ“¦ where this page comes from