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'βAis an upper triangular matrix πUPLO = 'L' or 'l'βAis 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'βAis assumed to be unit triangular.DIAG = 'N' or 'n'βAis 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',Kspecifies the number of super-diagonals of the matrixA. - on entry with
UPLO = 'L' or 'l',Kspecifies the number of sub-diagonals of the matrixA. Kmust satisfy0 .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'βAis an upper triangular matrix πUPLO = 'L' or 'l'βAis 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 thisDversion,'T'and'C'are both listed asA**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'βAis assumed to be unit triangular.DIAG = 'N' or 'n'βAis 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',Kspecifies the number of super-diagonals of the matrixA. - on entry with
UPLO = 'L' or 'l',Kspecifies the number of sub-diagonals of the matrixA. Kmust satisfy0 .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β isDOUBLE PRECISIONarray, 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 π β whenDIAG = 'U'or'u', the elements of the arrayAcorresponding 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β isINTEGER.
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β isDOUBLE PRECISIONarray, 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β isINTEGER.
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β isCHARACTER*1.
On entry, UPLO specifies whether the matrix is an upper or lower triangular matrix as follows:
UPLO = 'U'or'u'βAis an upper triangular matrix.UPLO = 'L'or'l'βAis a lower triangular matrix.
TRANSβ isCHARACTER*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β isCHARACTER*1.
On entry, DIAG specifies whether or not A is unit triangular as follows:
DIAG = 'U'or'u'βAis assumed to be unit triangular.DIAG = 'N'or'n'βAis not assumed to be unit triangular.
Nβ isINTEGER.
On entry, N specifies the order of the matrix A. N must be at least zero π«Ά.
Kβ isINTEGER.
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β isREALarray, 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 π β whenDIAG = 'U'or'u'the elements of the arrayAcorresponding to the diagonal elements of the matrix are not referenced, but are assumed to be unity.
LDAβ isINTEGER.
On entry, LDA specifies the first dimension of A as declared in the calling (sub) program. LDA must be at least ( k + 1 ).
Xβ isREALarray, 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β isINTEGER.
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β isCHARACTER*1.
On entry, UPLO specifies whether the matrix is an upper or lower triangular matrix as follows:
UPLO = 'U'or'u'βAis an upper triangular matrix.UPLO = 'L'or'l'βAis a lower triangular matrix.
TRANSβ isCHARACTER*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β isCHARACTER*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'βAis assumed to be unit triangular.DIAG = 'N'or'n'βAis 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
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms