ZTRTRS(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

πŸ’– 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 β†’ if INFO = -i, the i-th argument had an illegal value (someone didn't read the constraints, and we all know who)
  • > 0 β†’ if INFO = i, the i-th diagonal element of A is zero, meaning the matrix is singular and the solutions X have not been computed. so like... no X for 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