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)βCTRTRSsubroutine dtrtrs (uplo, trans, diag, n, nrhs, a, lda, b, ldb, info)βDTRTRSsubroutine strtrs (uplo, trans, diag, n, nrhs, a, lda, b, ldb, info)βSTRTRSsubroutine 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 thatAis nonsingular, but callers should note that only exact singularity is detected. it is conceivable for one or more diagonal elements ofAto 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βUPLOisCHARACTER*1= 'U':Ais upper triangular;= 'L':Ais lower triangular.
TRANSβTRANSisCHARACTER*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βDIAGisCHARACTER*1= 'N':Ais non-unit triangular;= 'U':Ais unit triangular.
NβNisINTEGER, the order of the matrixA.N >= 0.NRHSβNRHSisINTEGER, the number of right hand sides, i.e., the number of columns of the matrixB.NRHS >= 0.AβAisCOMPLEXarray, dimension(LDA,N), the triangular matrixA. ifUPLO = 'U', the leadingN-by-Nupper triangular part of the arrayAcontains the upper triangular matrix, and the strictly lower triangular part ofAis not referenced. ifUPLO = 'L', the leadingN-by-Nlower triangular part of the arrayAcontains the lower triangular matrix, and the strictly upper triangular part ofAis not referenced. ifDIAG = 'U', the diagonal elements ofAare also not referenced and are assumed to be1.LDAβLDAisINTEGER, the leading dimension of the arrayA.LDA >= max(1,N).BβBisCOMPLEXarray, dimension(LDB,NRHS). on entry, the right hand side matrixB. on exit, ifINFO = 0, the solution matrixX. β¨LDBβLDBisINTEGER, the leading dimension of the arrayB.LDB >= max(1,N).INFOβINFOisINTEGER= 0: successful exit< 0: ifINFO = -i, thei-th argument had an illegal value> 0: ifINFO = i, thei-th diagonal element ofAis exactly zero, indicating that the matrix is singular and the solutionsXhave 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 thatAis nonsingular, but callers should note that only exact singularity is detected. it is conceivable for one or more diagonal elements ofAto 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βUPLOisCHARACTER*1= 'U':Ais upper triangular;= 'L':Ais lower triangular.
TRANSβTRANSisCHARACTER*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βDIAGisCHARACTER*1= 'N':Ais non-unit triangular;= 'U':Ais unit triangular.
NβNisINTEGER, the order of the matrixA.N >= 0.NRHSβNRHSisINTEGER, the number of right hand sides, i.e., the number of columns of the matrixB.NRHS >= 0.AβAisDOUBLE PRECISIONarray, dimension(LDA,N), the triangular matrixA. ifUPLO = 'U', the leadingN-by-Nupper triangular part of the arrayAcontains the upper triangular matrix, and the strictly lower triangular part ofAis not referenced. ifUPLO = 'L', the leadingN-by-Nlower triangular part of the arrayAcontains the lower triangular matrix, and the strictly upper triangular part ofAis not referenced. ifDIAG = 'U', the diagonal elements ofAare also not referenced and are assumed to be1.LDAβLDAisINTEGER, the leading dimension of the arrayA.LDA >= max(1,N).BβBisDOUBLE PRECISIONarray, dimension(LDB,NRHS). on entry, the right hand side matrixB. on exit, ifINFO = 0, the solution matrixX. β¨LDBβLDBisINTEGER, the leading dimension of the arrayB.LDB >= max(1,N).INFOβINFOisINTEGER= 0: successful exit< 0: ifINFO = -i, thei-th argument had an illegal value> 0: ifINFO = i, thei-th diagonal element ofAis exactly zero, indicating that the matrix is singular and the solutionsXhave 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 thatAis nonsingular, but callers should note that only exact singularity is detected. it is conceivable for one or more diagonal elements ofAto 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βUPLOisCHARACTER*1= 'U':Ais upper triangular;= 'L':Ais lower triangular.
TRANSβTRANSisCHARACTER*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βDIAGisCHARACTER*1= 'N':Ais non-unit triangular;= 'U':Ais unit triangular.
NβNisINTEGER, the order of the matrixA.N >= 0.NRHSβNRHSisINTEGER, the number of right hand sides, i.e., the number of columns of the matrixB.NRHS >= 0.AβAisREALarray, dimension(LDA,N), the triangular matrixA. ifUPLO = 'U', the leadingN-by-Nupper triangular part of the arrayAcontains the upper triangular matrix, and the strictly lower triangular part ofAis not referenced. ifUPLO = 'L', the leadingN-by-Nlower triangular part of the arrayAcontains the lower triangular matrix, and the strictly upper triangular part ofAis not referenced. ifDIAG = 'U', the diagonal elements ofAare also not referenced and are assumed to be1.LDAβLDAisINTEGER, the leading dimension of the arrayA.LDA >= max(1,N).BβBisREALarray, dimension(LDB,NRHS). on entry, the right hand side matrixB. on exit, ifINFO = 0, the solution matrixX. β¨LDBβLDBisINTEGER, the leading dimension of the arrayB.LDB >= max(1,N).INFOβ π«Ά hold that thought,INFOkeeps going in part 2INFOisINTEGERβ the final vibe check:= 0: successful exit, we slayed β¨< 0: ifINFO = -i, the i-th argument had an illegal value, so something you passed was lowkey not it π> 0: ifINFO = i, the i-th diagonal element ofAis exactly zero β that means the matrix is singular and the solutionsXhave 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
UPLOisCHARACTER*1β tells us the triangular vibe:= 'U':Ais upper triangular;= 'L':Ais lower triangular.
TRANSisCHARACTER*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)
DIAGisCHARACTER*1β unit or non-unit diagonal:= 'N':Ais non-unit triangular;= 'U':Ais unit triangular.
NisINTEGERβ the order of the matrixA.N >= 0.NRHSisINTEGERβ the number of right hand sides, i.e., the number of columns of the matrixB.NRHS >= 0.AisCOMPLEX*16array, dimension(LDA,N)β the triangular matrixA. IfUPLO = 'U', the leadingN-by-Nupper triangular part of the arrayAcontains the upper triangular matrix, and the strictly lower triangular part ofAis not referenced. IfUPLO = 'L', the leadingN-by-Nlower triangular part of the arrayAcontains the lower triangular matrix, and the strictly upper triangular part ofAis not referenced. IfDIAG = 'U', the diagonal elements ofAare also not referenced and are assumed to be1.LDAisINTEGERβ the leading dimension of the arrayA.LDA >= max(1,N).BisCOMPLEX*16array, dimension(LDB,NRHS)β on entry, the right hand side matrixB. On exit, ifINFO = 0, the solution matrixX.LDBisINTEGERβ the leading dimension of the arrayB.LDB >= max(1,N).INFOisINTEGERβ the results:= 0: successful exit β¨< 0: ifINFO = -i, the i-th argument had an illegal value π> 0: ifINFO = i, the i-th diagonal element ofAis exactly zero, indicating that the matrix is singular and the solutionsXhave 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
- 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