ZTRTRS(3)
π ZTRTRS π
okay so bestie, this is a page from LAPACK β the Library Functions Manual β and today's main character is ztrtrs.f, straight out of /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/ztrtrs.f. yes that's the whole name, it's giving "my parents named me after the family business" π
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine ZTRTRS (uplo, trans, diag, n, nrhs, a, lda, b, ldb, info)
^ that's the whole squad. one subroutine. ZTRTRS. iconic behavior honestly.
π Function/Subroutine Documentation π
subroutine ZTRTRS (character uplo, character trans, character diag, integer n, integer nrhs, complex*16, dimension( lda, * ) a, integer lda, complex*16, dimension( ldb, * ) b, integer ldb, integer info)
ZTRTRS π
πΈ Purpose πΈ
!> !> ZTRTRS solves a triangular system of the form !> !> A * X = B, A**T * X = B, or A**H * X = B, !> !> where A is a triangular matrix of order N, and B is an N-by-NRHS !> matrix. A check is made to verify that A is nonsingular. !>
so basically it solves your triangular system for X β three whole flavors of it β and it also checks that A isn't singular, which is lowkey the responsible-friend move of this subroutine. π«Ά
β Parameters β
UPLO
!> UPLO is CHARACTER*1 !> = 'U': A is upper triangular; !> = 'L': A is lower triangular. !>
which triangle of A you're working with. 'U' = upper, 'L' = lower. pick your fighter. π
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) !>
which form of the system you're solving. 'N' = no transpose, 'T' = transpose, 'C' = conjugate transpose. it's giving choose-your-own-adventure β¨
DIAG
!> DIAG is CHARACTER*1 !> = 'N': A is non-unit triangular; !> = 'U': A is unit triangular. !>
'N' = non-unit triangular, 'U' = unit triangular. (iykyk what unit triangular means β and if you don't, that's a you-and-your-linear-algebra-professor situation, this page isn't gonna gatekeep you further π)
N
!> N is INTEGER !> The order of the matrix A. N >= 0. !>
the order of matrix A. must be N >= 0. no negative girlies allowed π
NRHS
!> NRHS is INTEGER !> The number of right hand sides, i.e., the number of columns !> of the matrix B. NRHS >= 0. !>
how many right hand sides you got β aka how many columns B has. NRHS >= 0, periodt.
A
!> A is COMPLEX*16 array, dimension (LDA,N) !> The triangular matrix A. If UPLO = 'U', the leading N-by-N !> upper triangular part of the array A contains the upper !> triangular matrix, and the strictly lower triangular part of !> A is not referenced. If UPLO = 'L', the leading N-by-N lower !> triangular part of the array A contains the lower triangular !> matrix, and the strictly upper triangular part of A is not !> referenced. If DIAG = 'U', the diagonal elements of A are !> also not referenced and are assumed to be 1. !>
the triangular matrix itself, COMPLEX*16, dimension (LDA,N). if UPLO = 'U', the leading N-by-N upper triangular part of A is your matrix and the strict lower part is literally not referenced (it's just vibing, unbothered πΈ). if UPLO = 'L', swap that β leading N-by-N lower triangular part is the matrix, strict upper part is not referenced. and if DIAG = 'U', the diagonal elements of A are also not referenced and are assumed to be 1. so don't bother filling them in bestie, nobody's looking π
LDA
!> LDA is INTEGER !> The leading dimension of the array A. LDA >= max(1,N). !>
leading dimension of A. constraint: LDA >= max(1,N). no cap.
B
!> B is COMPLEX*16 array, dimension (LDB,NRHS) !> On entry, the right hand side matrix B. !> On exit, if INFO = 0, the solution matrix X. !>
COMPLEX*16, dimension (LDB,NRHS). on entry it's the right hand side matrix B; on exit, if INFO = 0, it's been glow-up-transformed into the solution matrix X. we love a transformation arc π₯
LDB
!> LDB is INTEGER !> The leading dimension of the array B. LDB >= max(1,N). !>
leading dimension of B. constraint: LDB >= max(1,N).
INFO
!> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value !> > 0: if INFO = i, the i-th diagonal element of A is zero, !> indicating that the matrix is singular and the solutions !> X have not been computed. !>
the vibe check at the end π:
= 0β successful exit, slay, we're done< 0β ifINFO = -i, thei-th argument had an illegal value (someone didn't read the constraints, and we all know who)> 0β ifINFO = i, thei-th diagonal element ofAis zero, meaning the matrix is singular and the solutionsXhave not been computed. so like... noXfor you. singular matrix said "not today" π
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
four institutions, one subroutine, absolute group project energy that somehow actually worked π«Ά
Definition at line 138 of file ztrtrs.f.
π¦ Author (the meta one) π¦
Generated automatically by Doxygen for LAPACK from the source code. yes the docs wrote themselves, we love an independent queen β¨
π that's the whole page bestie β go solve some triangular systems, and remember: check your LDA, respect your INFO, and never trust a zero diagonal π
LAPACK, Version 3.12.0 βztrtrs.f(3), filed under/home/abui...RC/ztrtrs.f(3), signed off with love π
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms