SRC/slaqgb.f(3)

✨ SRC/slaqgb.f ✨

okay bestie, so this is one of those LAPACK pages β€” it lives in the Library Functions Manual and honestly? it's giving "quiet hero of numerical linear algebra." it's a .f file, so yes, it's Fortran, and yes, she's iconic for it. πŸ’…


🌸 SYNOPSIS 🌸

Functions/Subroutines

  • subroutine slaqgb (m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, equed) β€” SLAQGB scales a general band matrix, using row and column scaling factors computed by sgbequ. slay πŸ’–

πŸŽ€ Function/Subroutine Documentation πŸŽ€

subroutine slaqgb (integer m, integer n, integer kl, integer ku, real, dimension( ldab, * ) ab, integer ldab, real, dimension( * ) r, real, dimension( * ) c, real rowcnd, real colcnd, real amax, character equed)

subroutine slaqgb (integer m, integer n, integer kl, integer ku, real, dimension( ldab, * ) ab, integer ldab, real, dimension( * ) r, real, dimension( * ) c, real rowcnd, real colcnd, real amax, character equed)

SLAQGB scales a general band matrix, using row and column scaling factors computed by sgbequ. she's the glow-up phase of your matrix, no cap ✨


πŸ¦‹ Purpose πŸ¦‹

!> !> SLAQGB equilibrates a general M by N band matrix A with KL !> subdiagonals and KU superdiagonals using the row and scaling factors !> in the vectors R and C. !>

so basically: band matrix A walks in looking a lil unbalanced, and SLAQGB is like "bestie, we're fixing that" using the row factors in R and the column factors in C. periodt. πŸ’œ


πŸ‘‘ Parameters πŸ‘‘

  • M β€” M is INTEGER. the number of rows of the matrix A. M >= 0.
!> 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.
!> 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.
!> 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.
!> KU is INTEGER !> The number of superdiagonals within the band of A. KU >= 0. >
  • AB β€” AB is REAL array, dimension (LDAB,N).
!> AB is REAL 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(m,j+kl) !> !> On exit, the equilibrated matrix, in the same storage format !> as A. See EQUED for the form of the equilibrated matrix. >

on entry she's holding your matrix A in band storage, rows 1 to KL+KU+1. on exit she's holding the equilibrated matrix, same storage format as A β€” check EQUED for exactly what form it took. πŸ”₯

  • LDAB β€” LDAB is INTEGER. the leading dimension of the array AB. LDA >= KL+KU+1.
!> LDAB is INTEGER !> The leading dimension of the array AB. LDA >= KL+KU+1. >
  • R β€” R is REAL array, dimension (M). the row scale factors for A.
!> R is REAL array, dimension (M) !> The row scale factors for A. >
  • C β€” C is REAL array, dimension (N). the column scale factors for A.
!> C is REAL array, dimension (N) !> The column scale factors for A. >
  • ROWCND β€” ROWCND is REAL. ratio of the smallest R(i) to the largest R(i).
!> ROWCND is REAL !> Ratio of the smallest R(i) to the largest R(i). >
  • COLCND β€” COLCND is REAL. ratio of the smallest C(i) to the largest C(i).
!> COLCND is REAL !> Ratio of the smallest C(i) to the largest C(i). >
  • AMAX β€” AMAX is REAL. absolute value of largest matrix entry.
!> AMAX is REAL !> Absolute value of largest matrix entry. >
  • EQUED β€” EQUED is CHARACTER*1. specifies the form of equilibration that was done. this is the receipts section, bestie β€” read it carefully 🫢
!> EQUED is CHARACTER*1 !> Specifies the form of equilibration that was done. !> = '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). >

so like: '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), and 'B' = both row and column equilibration, i.e., A has been replaced by diag(R) * A * diag(C). all four are valid, don't @ me πŸ’…


🌈 Internal Parameters 🌈

!> THRESH is a threshold value used to decide if row or column scaling !> should be done based on the ratio of the row or column scaling !> factors. If ROWCND < THRESH, row scaling is done, and if !> COLCND < THRESH, column scaling is done. !> !> LARGE and SMALL are threshold values used to decide if row scaling !> should be done based on the absolute size of the largest matrix !> element. If AMAX > LARGE or AMAX < SMALL, row scaling is done. >

so THRESH is the vibe check: it decides whether row or column scaling happens, based on the ratio of the row or column scaling factors. if ROWCND < THRESH, row scaling is done, and if COLCND < THRESH, column scaling is done. πŸ’«

and then LARGE and SMALL are threshold values that decide whether row scaling should be done based on the absolute size of the largest matrix element. if AMAX > LARGE or AMAX < SMALL, row scaling is done. she's thorough like that. ⭐


πŸ’– Author πŸ’–

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

Definition at line 157 of file slaqgb.f.


🧚 Author 🧚

Generated automatically by Doxygen for LAPACK from the source code. (yes, the page has two Author sections β€” that's just how she is, we don't question it πŸ™ˆ)


later bestie!! πŸŒΈπŸ’œπŸ¦‹βœ¨ this lil page came to you from LAPACK, Version 3.12.0, dated SRC/slaqgb.f(3) β€” go balance some matrices, you've got this πŸ’…πŸŽ€

πŸ“¦ where this page comes from