tbsv(3)

πŸ’… tbsv(3) β€” Library Functions Manual

okay bestie, buckle up πŸ’– this is the manual page for tbsv β€” that's the triangular matrix-vector solve situation, and yes, "tbsv" is also literally what the NAME section calls it, so like, the naming committee said what they said πŸŽ€


✨ NAME ✨

tbsv β€” tbsv: triangular matrix-vector solve

fr fr that's the whole thing: you got a triangular matrix, you got a vector, you solve. iconic behavior 😌


πŸ¦‹ SYNOPSIS πŸ¦‹

Functions

subroutine ctbsv (uplo, trans, diag, n, k, a, lda, x, incx)
    CTBSV
subroutine dtbsv (uplo, trans, diag, n, k, a, lda, x, incx)
    DTBSV
subroutine stbsv (uplo, trans, diag, n, k, a, lda, x, incx)
    STBSV
subroutine ztbsv (uplo, trans, diag, n, k, a, lda, x, incx)
    ZTBSV

four flavors, one vibe 🌈 β€” C for complex, D for double precision, S for single precision, Z for double complex, and each one is just the same solve wrapped in a different letter. iykyk πŸ’œ


🌸 Detailed Description 🌸

so the actual details all live down in the per-function docs below β€” every routine gets its own section with the full rundown, no cap. keep scrolling, it's giving organized πŸ‘‘


πŸ”₯ Function Documentation πŸ”₯

subroutine ctbsv (character uplo, character trans, character diag, integer n, integer k, complex, dimension(lda,*) a, integer lda, complex, dimension(*) x, integer incx)

CTBSV

🫢 Purpose:

okay so CTBSV solves one of these systems of equations, and yes you get options bestie:

A*x = b,   or   A**T*x = b,   or   A**H*x = b,

where b and x are n element vectors and A is an n by n unit, or non-unit, upper or lower triangular band matrix, with ( k + 1 ) diagonals ✨

⚠️ no cap, this one matters: no test for singularity or near-singularity is included in this routine. such tests must be performed before calling this routine. it is not gonna vibe-check your matrix for you πŸ’€ do that yourself, bestie.

🌟 Parameters

UPLO

UPLO is CHARACTER*1. on entry, UPLO specifies whether the matrix is an upper or lower triangular matrix, like:

  • UPLO = 'U' or 'u' β€” A is an upper triangular matrix πŸ‘‘
  • UPLO = 'L' or 'l' β€” A is a lower triangular matrix πŸ¦‹

TRANS

TRANS is CHARACTER*1. on entry, TRANS specifies which equations you're out here solving, as follows:

  • TRANS = 'N' or 'n' β€” A*x = b.
  • TRANS = 'T' or 't' β€” A**T*x = b.
  • TRANS = 'C' or 'c' β€” A**H*x = b.

DIAG

DIAG is CHARACTER*1. on entry, DIAG specifies whether or not A is unit triangular, like:

  • DIAG = 'U' or 'u' β€” A is assumed to be unit triangular.
  • DIAG = 'N' or 'n' β€” A is not assumed to be unit triangular.

N

N is INTEGER. on entry, N specifies the order of the matrix A. N must be at least zero. (zero is allowed, don't come for her 🫢)

K

K is INTEGER.

  • on entry with UPLO = 'U' or 'u', K specifies the number of super-diagonals of the matrix A.
  • on entry with UPLO = 'L' or 'l', K specifies the number of sub-diagonals of the matrix A.
  • K must satisfy 0 .le. K.

A

A is COMPLEX array, dimension ( LDA, N ).

before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) by n part of the array A must contain the upper triangular band part of the matrix of coefficients, supplied column by column, with the leading diagonal of the matrix in row ( k + 1 ) of the array, the first super-diagonal starting at position 2 in row k, and so on. the top left k by k triangle of the array A is not referenced 🚫

the following program segment will transfer an upper triangular band matrix from conventional full matrix storage to band storage:

      DO 20, J = 1, N
         M = K + 1 - J
         DO 10, I = MAX( 1, J - K ), J
            A( M + I, J ) = matrix( I, J )
       10    CONTINUE
     20 CONTINUE

before entry with UPLO = 'L' or 'l', the leading ( k + 1 ) by n part of the array A must contain the lower triangular band part of the matrix of coefficients, supplied column by column, with the leading diagonal of the matrix in row 1 of the array, the first sub-diagonal starting at position 1 in row 2, and so on. the bottom right k by k triangle of the array A is not referenced 🚫

the following program segment will transfer a lower triangular band matrix from conventional full matrix storage to band storage:

      DO 20, J = 1, N
         M = 1 - J
         DO 10, I = J, MIN( N, J + K )
            A( M + I, J ) = matrix( I, J )
       10    CONTINUE
     20 CONTINUE

note that when DIAG = 'U' or 'u' the elements of the array A corresponding to the diagonal elements of the matrix are not referenced, but are assumed to be unity ✨ (so don't bother filling them in, she's not looking πŸ‘€)

LDA

LDA is INTEGER. on entry, LDA specifies the first dimension of A as declared in the calling (sub) program. LDA must be at least ( k + 1 ).

X

X is COMPLEX array, dimension at least ( 1 + ( n - 1 )*abs( INCX ) ).

before entry, the incremented array X must contain the n element right-hand side vector b. on exit, X is overwritten with the solution vector x πŸ’… (yes, she destroys your input on the way out. that's the deal.)

INCX

INCX is INTEGER. on entry, INCX specifies the increment for the elements of X. INCX must not be zero 🚨


πŸ‘‘ Author

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

🧚 Further Details:

Level 2 Blas routine. β€” Written on 22-October-1986. Jack Dongarra, Argonne National Lab. Jeremy Du Croz, Nag Central Office. Sven Hammarling, Nag Central Office. Richard Hanson, Sandia National Labs.

definition at line 188 of file ctbsv.f πŸŽ€


subroutine dtbsv (character uplo, character trans, character diag, integer n, integer k, double precision, dimension(lda,*) a, integer lda, double precision, dimension(*) x, integer incx)

DTBSV

🫢 Purpose:

DTBSV solves one of the systems of equations:

A*x = b,   or   A**T*x = b,

where b and x are n element vectors and A is an n by n unit, or non-unit, upper or lower triangular band matrix, with ( k + 1 ) diagonals ✨

⚠️ same energy as before, and it bears repeating: no test for singularity or near-singularity is included in this routine. such tests must be performed before calling this routine. the routine is not your therapist and will not catch your singular matrix for you πŸ’€

🌟 Parameters

UPLO

UPLO is CHARACTER*1. on entry, UPLO specifies whether the matrix is an upper or lower triangular matrix, as follows:

  • UPLO = 'U' or 'u' β€” A is an upper triangular matrix πŸ‘‘
  • UPLO = 'L' or 'l' β€” A is a lower triangular matrix πŸ¦‹

TRANS

TRANS is CHARACTER*1. on entry, TRANS specifies the equations to be solved as follows:

  • TRANS = 'N' or 'n' β€” A*x = b.
  • TRANS = 'T' or 't' β€” A**T*x = b.
  • TRANS = 'C' or 'c' β€” A**T*x = b.
🫢 real talk: in this D version, 'T' and 'C' are both listed as A**T*x = b. β€” that's what the page says, so that's what you get. no conjugating happening over here, she's real-valued only 😌

DIAG

DIAG is CHARACTER*1. on entry, DIAG specifies whether or not A is unit triangular as follows:

  • DIAG = 'U' or 'u' β€” A is assumed to be unit triangular.
  • DIAG = 'N' or 'n' β€” A is not assumed to be unit triangular.

N

N is INTEGER. on entry, N specifies the order of the matrix A. N must be at least zero.

K

K is INTEGER.

  • on entry with UPLO = 'U' or 'u', K specifies the number of super-diagonals of the matrix A.
  • on entry with UPLO = 'L' or 'l', K specifies the number of sub-diagonals of the matrix A.
  • K must satisfy 0 .le. K.

A

aaaand this description is a whole saga, so it's picking up right where it left off in the next chunk bestie πŸŽ€βœ¨

  • A β€” is DOUBLE PRECISION array, dimension ( LDA, N ).

Okay so before you enter with UPLO = 'U' or 'u', the leading ( k + 1 ) by n part of the array A has to contain the upper triangular band part of the matrix of coefficients, supplied column by column, with the leading diagonal of the matrix in row ( k + 1 ) of the array, the first super-diagonal starting at position 2 in row k, and so on ✨. The top left k by k triangle of the array A is not referenced, bestie.

This next little program segment will transfer an upper triangular band matrix from conventional full matrix storage to band storage β€” iconic behavior, no notes:

DO 20, J = 1, N
   M = K + 1 - J
   DO 10, I = MAX( 1, J - K ), J
      A( M + I, J ) = matrix( I, J )
 10    CONTINUE
 20 CONTINUE

Before entry with UPLO = 'L' or 'l', the leading ( k + 1 ) by n part of the array A must contain the lower triangular band part of the matrix of coefficients, supplied column by column, with the leading diagonal of the matrix in row 1 of the array, the first sub-diagonal starting at position 1 in row 2, and so on 🌸. The bottom right k by k triangle of the array A is not referenced.

And here's the transfer segment for a lower triangular band matrix, from conventional full matrix storage to band storage:

DO 20, J = 1, N
   M = 1 - J
   DO 10, I = J, MIN( N, J + K )
      A( M + I, J ) = matrix( I, J )
 10    CONTINUE
 20 CONTINUE
Heads up, bestie πŸ’› β€” when DIAG = 'U' or 'u', the elements of the array A corresponding to the diagonal elements of the matrix are not referenced, but they're assumed to be unity. Like, the routine just trusts them. Rude but valid πŸ’….
  • LDA β€” is INTEGER.

On entry, LDA specifies the first dimension of A as declared in the calling (sub) program. LDA must be at least ( k + 1 ). That's the floor, periodt.

  • X β€” is DOUBLE PRECISION array, dimension at least ( 1 + ( n - 1 )*abs( INCX ) ).

Before entry, the incremented array X must contain the n element right-hand side vector b. On exit, X is overwritten with the solution vector x πŸ”₯ β€” so yeah, your b is gone, it's x's world now. Plan accordingly.

  • INCX β€” is INTEGER.

On entry, INCX specifies the increment for the elements of X. INCX must not be zero. Like, zero is genuinely not the vibe here 😭.

πŸ‘‘ Author πŸ‘‘

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

🌈 Further Details: 🌈

Level 2 Blas routine.

-- Written on 22-October-1986.
   Jack Dongarra, Argonne National Lab.
   Jeremy Du Croz, Nag Central Office.
   Sven Hammarling, Nag Central Office.
   Richard Hanson, Sandia National Labs.

Definition at line 188 of file dtbsv.f.


πŸ’– stbsv πŸ’–

subroutine stbsv (character uplo, character trans, character diag, integer
n, integer k, real, dimension(lda,*) a, integer lda, real, dimension(*)
x, integer incx)

STBSV β€” the single-precision sibling, she's giving exactly what you'd expect πŸ’…

⭐ Purpose: ⭐

STBSV  solves one of the systems of equations

   A*x = b,   or   A**T*x = b,

where b and x are n element vectors and A is an n by n unit, or non-unit, upper or lower triangular band matrix, with ( k + 1 ) diagonals πŸ¦‹.

Real talk 🚨 β€” no test for singularity or near-singularity is included in this routine. Such tests must be performed before calling this routine. She will not warn you, she will just go. Do your own vibe check first, fr fr.

πŸŽ€ Parameters πŸŽ€

  • UPLO β€” is CHARACTER*1.

On entry, UPLO specifies whether the matrix is an upper or lower triangular matrix as follows:

  • UPLO = 'U' or 'u' β€” A is an upper triangular matrix.
  • UPLO = 'L' or 'l' β€” A is a lower triangular matrix.
  • TRANS β€” is CHARACTER*1.

On entry, TRANS specifies the equations to be solved as follows:

  • TRANS = 'N' or 'n' β€” A*x = b.
  • TRANS = 'T' or 't' β€” A**T*x = b.
  • TRANS = 'C' or 'c' β€” A**T*x = b.
  • DIAG β€” is CHARACTER*1.

On entry, DIAG specifies whether or not A is unit triangular as follows:

  • DIAG = 'U' or 'u' β€” A is assumed to be unit triangular.
  • DIAG = 'N' or 'n' β€” A is not assumed to be unit triangular.
  • N β€” is INTEGER.

On entry, N specifies the order of the matrix A. N must be at least zero 🫢.

  • K β€” is INTEGER.

On entry with UPLO = 'U' or 'u', K specifies the number of super-diagonals of the matrix A. On entry with UPLO = 'L' or 'l', K specifies the number of sub-diagonals of the matrix A. K must satisfy 0 .le. K. That's a hard floor, bestie, zero or bigger only πŸ’€.

  • A β€” is REAL array, dimension ( LDA, N ).

Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) by n part of the array A must contain the upper triangular band part of the matrix of coefficients, supplied column by column, with the leading diagonal of the matrix in row ( k + 1 ) of the array, the first super-diagonal starting at position 2 in row k, and so on. The top left k by k triangle of the array A is not referenced.

The following program segment will transfer an upper triangular band matrix from conventional full matrix storage to band storage:

DO 20, J = 1, N
   M = K + 1 - J
   DO 10, I = MAX( 1, J - K ), J
      A( M + I, J ) = matrix( I, J )
 10    CONTINUE
 20 CONTINUE

Before entry with UPLO = 'L' or 'l', the leading ( k + 1 ) by n part of the array A must contain the lower triangular band part of the matrix of coefficients, supplied column by column, with the leading diagonal of the matrix in row 1 of the array, the first sub-diagonal starting at position 1 in row 2, and so on. The bottom right k by k triangle of the array A is not referenced.

The following program segment will transfer a lower triangular band matrix from conventional full matrix storage to band storage:

DO 20, J = 1, N
   M = 1 - J
   DO 10, I = J, MIN( N, J + K )
      A( M + I, J ) = matrix( I, J )
 10    CONTINUE
 20 CONTINUE
Note note note πŸ‘ β€” when DIAG = 'U' or 'u' the elements of the array A corresponding to the diagonal elements of the matrix are not referenced, but are assumed to be unity.
  • LDA β€” is INTEGER.

On entry, LDA specifies the first dimension of A as declared in the calling (sub) program. LDA must be at least ( k + 1 ).

  • X β€” is REAL array, dimension at least ( 1 + ( n - 1 )*abs( INCX ) ).

Before entry, the incremented array X must contain the n element right-hand side vector b. On exit, X is overwritten with the solution vector x.

  • INCX β€” is INTEGER.

On entry, INCX specifies the increment for the elements of X. INCX must not be zero.

πŸ‘‘ Author πŸ‘‘

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

🌈 Further Details: 🌈

Level 2 Blas routine.

-- Written on 22-October-1986.
   Jack Dongarra, Argonne National Lab.
   Jeremy Du Croz, Nag Central Office.
   Sven Hammarling, Nag Central Office.
   Richard Hanson, Sandia National Labs.

Definition at line 188 of file stbsv.f.


🧚 ztbsv 🧚

subroutine ztbsv (character uplo, character trans, character diag, integer
n, integer k, complex*16, dimension(lda,*) a, integer lda, complex*16,
dimension(*) x, integer incx)

ZTBSV β€” the complex*16 one, she has conjugation powers and she is not afraid to use them βœ¨πŸ’œ

⭐ Purpose: ⭐

ZTBSV  solves one of the systems of equations

   A*x = b,   or   A**T*x = b,   or   A**H*x = b,

where b and x are n element vectors and A is an n by n unit, or non-unit, upper or lower triangular band matrix, with ( k + 1 ) diagonals πŸ”₯.

Take notes bestie πŸ“ β€” no test for singularity or near-singularity is included in this routine. Such tests must be performed before calling this routine. She's not your mom, she's not checking your matrix is invertible first.

πŸŽ€ Parameters πŸŽ€

  • UPLO β€” is CHARACTER*1.

On entry, UPLO specifies whether the matrix is an upper or lower triangular matrix as follows:

  • UPLO = 'U' or 'u' β€” A is an upper triangular matrix.
  • UPLO = 'L' or 'l' β€” A is a lower triangular matrix.
  • TRANS β€” is CHARACTER*1.

On entry, TRANS specifies the equations to be solved as follows:

  • TRANS = 'N' or 'n' β€” A*x = b.
  • TRANS = 'T' or 't' β€” A**T*x = b.
  • TRANS = 'C' or 'c' β€” A**H*x = b.
  • DIAG β€” is CHARACTER*1.

On entry, DIAG specifies whether or not A is unit triangular as follows:

DIAG

okay so DIAG is a CHARACTER*1 β€” on entry it tells us whether A is unit triangular or not, like:

  • DIAG = 'U' or 'u' β€” A is assumed to be unit triangular.
  • DIAG = 'N' or 'n' β€” A is not assumed to be unit triangular.

N

N is INTEGER. On entry, N specifies the order of the matrix A. N must be at least zero. no cap, bestie 🫢


K

K is INTEGER. On entry with UPLO = 'U' or 'u', K specifies the number of super-diagonals of the matrix A. On entry with UPLO = 'L' or 'l', K specifies the number of sub-diagonals of the matrix A. K must satisfy 0 .le. K.


A

A is COMPLEX*16 array, dimension ( LDA, N ). this is the main character right here πŸ‘‘

Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) by n part of the array A must contain the upper triangular band part of the matrix of coefficients, supplied column by column, with the leading diagonal of the matrix in row ( k + 1 ) of the array, the first super-diagonal starting at position 2 in row k, and so on. The top left k by k triangle of the array A is not referenced.

The following program segment will transfer an upper triangular band matrix from conventional full matrix storage to band storage:

                 DO 20, J = 1, N
                    M = K + 1 - J
                    DO 10, I = MAX( 1, J - K ), J
                       A( M + I, J ) = matrix( I, J )
              10    CONTINUE
              20 CONTINUE

Before entry with UPLO = 'L' or 'l', the leading ( k + 1 ) by n part of the array A must contain the lower triangular band part of the matrix of coefficients, supplied column by column, with the leading diagonal of the matrix in row 1 of the array, the first sub-diagonal starting at position 1 in row 2, and so on. The bottom right k by k triangle of the array A is not referenced.

The following program segment will transfer a lower triangular band matrix from conventional full matrix storage to band storage:

                 DO 20, J = 1, N
                    M = 1 - J
                    DO 10, I = J, MIN( N, J + K )
                       A( M + I, J ) = matrix( I, J )
              10    CONTINUE
              20 CONTINUE

Note that when DIAG = 'U' or 'u' the elements of the array A corresponding to the diagonal elements of the matrix are not referenced, but are assumed to be unity. she’s unit triangular and she knows it πŸ’…


LDA

LDA is INTEGER. On entry, LDA specifies the first dimension of A as declared in the calling (sub) program. LDA must be at least ( k + 1 ).


X

X is COMPLEX*16 array, dimension at least ( 1 + ( n - 1 )*abs( INCX ) ). Before entry, the incremented array X must contain the n element right-hand side vector b. On exit, X is overwritten with the solution vector x.


INCX

INCX is INTEGER. On entry, INCX specifies the increment for the elements of X. INCX must not be zero. fr fr, zero is not the vibe here πŸ’€


πŸ‘‘ Author πŸ‘‘

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

Further Details: 🌈

  • Level 2 Blas routine.
  • -- Written on 22-October-1986.
    • Jack Dongarra, Argonne National Lab.
    • Jeremy Du Croz, Nag Central Office.
    • Sven Hammarling, Nag Central Office.
    • Richard Hanson, Sandia National Labs.

Definition at line 188 of file ztbsv.f.

Author ✨

Generated automatically by Doxygen for LAPACK from the source code.


okay bestie, that’s the whole page β€” signed, sealed, and slaying by LAPACK Version 3.12.0 β€” tbsv(3) β€” stay iconic πŸ’…βœ¨

πŸ“¦ where this page comes from