trtrs(3)

✨ trtrs(3) ✨ β€” the LAPACK triangular-solve girlies (Library Functions Manual)

okay so bestie. welcome to trtrs, the family of routines that solve triangular systems. it's giving "i have a triangle, i have a right-hand side, and i need the X". this is part 1 of the page so buckle up, we're going through every single routine and every single parameter, no skips, no cap πŸ’…


πŸŽ€ NAME πŸŽ€

trtrs β€” trtrs: triangular solve


πŸ¦‹ SYNOPSIS πŸ¦‹

🌸 Functions 🌸

  • subroutine ctrtrs (uplo, trans, diag, n, nrhs, a, lda, b, ldb, info) β€” CTRTRS
  • subroutine dtrtrs (uplo, trans, diag, n, nrhs, a, lda, b, ldb, info) β€” DTRTRS
  • subroutine strtrs (uplo, trans, diag, n, nrhs, a, lda, b, ldb, info) β€” STRTRS
  • subroutine ztrtrs (uplo, trans, diag, n, nrhs, a, lda, b, ldb, info) β€” ZTRTRS

🌈 Detailed Description 🌈

yeah so there's not really a big intro blurb here, the docs go straight into the function documentation. iconic behaviour honestly, she doesn't waste your time πŸ’…


πŸ‘‘ Function Documentation πŸ‘‘

🧚 ctrtrs β€” CTRTRS 🧚

subroutine ctrtrs (character uplo, character trans, character diag, integer
n, integer nrhs, complex, dimension( lda, * ) a, integer lda, complex,
dimension( ldb, * ) b, integer ldb, integer info)

πŸ’– Purpose

so CTRTRS 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.

ngl this next bit matters: this subroutine verifies that A is nonsingular, but callers should note that only exact singularity is detected. it is conceivable for one or more diagonal elements of A to be subnormally tiny numbers without this subroutine signalling an error 😭

if a possible loss of numerical precision due to near-singular matrices is a concern, the caller should verify that A is nonsingular within some tolerance before calling this subroutine. like, do the vibe check yourself first 🫢

🌟 Parameters

  • UPLO β€” UPLO is CHARACTER*1
    • = 'U': A is upper triangular;
    • = 'L': A is lower triangular.
  • 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)
  • DIAG β€” DIAG is CHARACTER*1
    • = 'N': A is non-unit triangular;
    • = 'U': A is unit triangular.
  • N β€” N is INTEGER, the order of the matrix A. N >= 0.
  • NRHS β€” NRHS is INTEGER, the number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
  • A β€” A is COMPLEX 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.
  • LDA β€” LDA is INTEGER, the leading dimension of the array A. LDA >= max(1,N).
  • B β€” B is COMPLEX array, dimension (LDB,NRHS). on entry, the right hand side matrix B. on exit, if INFO = 0, the solution matrix X. ✨
  • LDB β€” LDB is INTEGER, the leading dimension of the array B. 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 exactly zero, indicating that the matrix is singular and the solutions X have not been computed πŸ’€

πŸŽ€ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

Definition at line 144 of file ctrtrs.f.


πŸ¦‹ dtrtrs β€” DTRTRS πŸ¦‹

subroutine dtrtrs (character uplo, character trans, character diag, integer
n, integer nrhs, double precision, dimension( lda, * ) a, integer lda,
double precision, dimension( ldb, * ) b, integer ldb, integer info)

πŸ’– Purpose

DTRTRS solves a triangular system of the form

A * X = B  or  A**T * X = B,

where A is a triangular matrix of order N, and B is an N-by-NRHS matrix.

same disclaimer, bestie: this subroutine verifies that A is nonsingular, but callers should note that only exact singularity is detected. it is conceivable for one or more diagonal elements of A to be subnormally tiny numbers without this subroutine signalling an error 😭

if a possible loss of numerical precision due to near-singular matrices is a concern, the caller should verify that A is nonsingular within some tolerance before calling this subroutine. periodt.

🌟 Parameters

  • UPLO β€” UPLO is CHARACTER*1
    • = 'U': A is upper triangular;
    • = 'L': A is lower triangular.
  • 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 = Transpose)
  • DIAG β€” DIAG is CHARACTER*1
    • = 'N': A is non-unit triangular;
    • = 'U': A is unit triangular.
  • N β€” N is INTEGER, the order of the matrix A. N >= 0.
  • NRHS β€” NRHS is INTEGER, the number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
  • A β€” A is DOUBLE PRECISION 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.
  • LDA β€” LDA is INTEGER, the leading dimension of the array A. LDA >= max(1,N).
  • B β€” B is DOUBLE PRECISION array, dimension (LDB,NRHS). on entry, the right hand side matrix B. on exit, if INFO = 0, the solution matrix X. ✨
  • LDB β€” LDB is INTEGER, the leading dimension of the array B. 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 exactly zero, indicating that the matrix is singular and the solutions X have not been computed πŸ’€

πŸŽ€ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

Definition at line 144 of file dtrtrs.f.


🌸 strtrs β€” STRTRS 🌸

subroutine strtrs (character uplo, character trans, character diag, integer
n, integer nrhs, real, dimension( lda, * ) a, integer lda, real,
dimension( ldb, * ) b, integer ldb, integer info)

πŸ’– Purpose

STRTRS solves a triangular system of the form

A * X = B  or  A**T * X = B,

where A is a triangular matrix of order N, and B is an N-by-NRHS matrix.

okay so this is the single-precision one and the caveat is still the same: this subroutine verifies that A is nonsingular, but callers should note that only exact singularity is detected. it is conceivable for one or more diagonal elements of A to be subnormally tiny numbers without this subroutine signalling an error 😭

if a possible loss of numerical precision due to near-singular matrices is a concern, the caller should verify that A is nonsingular within some tolerance before calling this subroutine. iykyk 🫢

🌟 Parameters

  • UPLO β€” UPLO is CHARACTER*1
    • = 'U': A is upper triangular;
    • = 'L': A is lower triangular.
  • 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 = Transpose)
  • DIAG β€” DIAG is CHARACTER*1
    • = 'N': A is non-unit triangular;
    • = 'U': A is unit triangular.
  • N β€” N is INTEGER, the order of the matrix A. N >= 0.
  • NRHS β€” NRHS is INTEGER, the number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
  • A β€” A is REAL 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.
  • LDA β€” LDA is INTEGER, the leading dimension of the array A. LDA >= max(1,N).
  • B β€” B is REAL array, dimension (LDB,NRHS). on entry, the right hand side matrix B. on exit, if INFO = 0, the solution matrix X. ✨
  • LDB β€” LDB is INTEGER, the leading dimension of the array B. LDB >= max(1,N).
  • INFO β€” 🫢 hold that thought, INFO keeps going in part 2
  • INFO is INTEGER β€” the final vibe check:
    • = 0: successful exit, we slayed ✨
    • < 0: if INFO = -i, the i-th argument had an illegal value, so something you passed was lowkey not it πŸ™ˆ
    • > 0: if INFO = i, the i-th diagonal element of A is exactly zero β€” that means the matrix is singular and the solutions X have not been computed, so no results for you πŸ’€

Author

Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver, NAG Ltd. β€” the absolute icons who wrote this πŸ‘‘

Definition

Definition at line 144 of file strtrs.f.


πŸ’… subroutine ztrtrs (ZTRTRS)

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 ✨

Okay so 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. Slay.

This subroutine verifies that A is nonsingular, but bestie, listen: only exact singularity is detected. It is conceivable for one or more diagonal elements of A to be subnormally tiny numbers without this subroutine signalling an error. So like, it's not a full vibe check on near-singularity.

If a possible loss of numerical precision due to near-singular matrices is a concern, the caller should verify that A is nonsingular within some tolerance before calling this subroutine. No cap, that's on you.

Parameters

  • UPLO is CHARACTER*1 β€” tells us the triangular vibe:
    • = 'U': A is upper triangular;
    • = 'L': A is lower triangular.
  • 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)
  • DIAG is CHARACTER*1 β€” unit or non-unit diagonal:
    • = 'N': A is non-unit triangular;
    • = 'U': A is unit triangular.
  • N is INTEGER β€” the order of the matrix A. N >= 0.
  • NRHS is INTEGER β€” the number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
  • 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.
  • LDA is INTEGER β€” the leading dimension of the array A. LDA >= max(1,N).
  • 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.
  • LDB is INTEGER β€” the leading dimension of the array B. LDB >= max(1,N).
  • INFO is INTEGER β€” the results:
    • = 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 exactly zero, indicating that the matrix is singular and the solutions X have not been computed πŸ’€

Author

Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver, NAG Ltd. β€” same iconic squad 🫢

Definition

Definition at line 144 of file ztrtrs.f.

Author

Generated automatically by Doxygen for LAPACK from the source code.


And that's the tea! This page is from LAPACK version 3.12.0 (the date wasn't in the footer, but you know it's giving timeless πŸ’…). Stay slaying those triangular systems, bestie! πŸŽ€βœ¨

πŸ“¦ where this page comes from