tptrs(3)
β¨ tptrs(3) β triangular solve β¨
okay bestie, buckle up, this is the tptrs family from the Library Functions Manual and it's literally the glow-up squad for triangular solves π
We've got four routines here β one per data type β and they all do the same iconic thing: solve a triangular system where A is triangular and stored in packed format. No cap.
πΈ NAME πΈ
tptrs β tptrs: triangular solve
That's it. That's the whole name. Short, sweet, main character energy π
π SYNOPSIS π
Functions
subroutine ctptrs (uplo, trans, diag, n, nrhs, ap, b, ldb, info)βCTPTRSsubroutine dtptrs (uplo, trans, diag, n, nrhs, ap, b, ldb, info)βDTPTRSsubroutine stptrs (uplo, trans, diag, n, nrhs, ap, b, ldb, info)βSTPTRSsubroutine ztptrs (uplo, trans, diag, n, nrhs, ap, b, ldb, info)βZTPTRS
Same argument list every single time, bestie. The only thing that changes is the flavour of the numbers inside. Obsessed with the consistency π«Ά
π¦ Detailed Description π¦
This page is the whole tptrs friend group: CTPTRS, DTPTRS, STPTRS and ZTPTRS. They solve triangular systems with the matrix packed columnwise into one flat array, and every one of them has the exact same parameter lineup β <italic>uplo</italic>, <italic>trans</italic>, <italic>diag</italic>, <italic>n</italic>, <italic>nrhs</italic>, <italic>ap</italic>, <italic>b</italic>, <italic>ldb</italic>, <italic>info</italic>. Periodt.
π₯ Function Documentation π₯
β subroutine ctptrs β
subroutine ctptrs (character uplo, character trans, character diag, integer
n, integer nrhs, complex, dimension( * ) ap, complex, dimension( ldb, *
) b, integer ldb, integer info)
CTPTRS
Purpose
okay so CTPTRS 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 stored in packed format, and B is an N-by-NRHS matrix.
π¨ lowkey important: 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. Like, it will not catch that for you π
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. Fr fr, do your own vibe check 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.APβAPisCOMPLEX array, dimension (N*(N+1)/2). The upper or lower triangular matrixA, packed columnwise in a linear array. Thej-th column ofAis stored in the arrayAPas follows:- if
UPLO = 'U',AP(i + (j-1)*j/2) = A(i,j)for1<=i<=j; - if
UPLO = 'L',AP(i + (j-1)*(2*n-j)/2) = A(i,j)forj<=i<=n.
- if
BβBisCOMPLEX array, dimension (LDB,NRHS). On entry, the right hand side matrixB. On exit, ifINFO = 0, the solution matrixX. it's giving transformation arc β¨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 134 of file ctptrs.f.
β subroutine dtptrs β
subroutine dtptrs (character uplo, character trans, character diag, integer
n, integer nrhs, double precision, dimension( * ) ap, double precision,
dimension( ldb, * ) b, integer ldb, integer info)
DTPTRS
Purpose
DTPTRS solves a triangular system of the form
A * X = B or A**T * X = B,
where A is a triangular matrix of order N stored in packed format, and B is an N-by-NRHS matrix.
π¨ same warning, 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. Sneaky little subnormal numbers, no cap π
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. Do it yourself, don't make it everyone else's problem π
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) β note the extra "= Transpose", she's different π«
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.APβAPisDOUBLE PRECISION array, dimension (N*(N+1)/2). The upper or lower triangular matrixA, packed columnwise in a linear array. Thej-th column ofAis stored in the arrayAPas follows:- if
UPLO = 'U',AP(i + (j-1)*j/2) = A(i,j)for1<=i<=j; - if
UPLO = 'L',AP(i + (j-1)*(2*n-j)/2) = A(i,j)forj<=i<=n.
- if
BβBisDOUBLE PRECISION array, 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 134 of file dtptrs.f.
β subroutine stptrs β
subroutine stptrs (character uplo, character trans, character diag, integer
n, integer nrhs, real, dimension( * ) ap, real, dimension( ldb, * ) b,
integer ldb, integer info)
STPTRS
Purpose
STPTRS solves a triangular system of the form
A * X = B or A**T * X = B,
where A is a triangular matrix of order N stored in packed format, and B is an N-by-NRHS matrix.
π¨ again for the people in the back: 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. it's giving "technically correct but numerically stressful" π
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. Your tolerance, your problem, bestie π«Ά
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.APβAPisREAL array, dimension (N*(N+1)/2). The upper or lower triangular matrixA, packed columnwise in a linear array. Thej-th column ofAis stored in the arrayAPas follows:- if
UPLO = 'U',AP(i + (j-1)*j/2) = A(i,j)for1<=i<=j; - if
UPLO = 'L',AP(i + (j-1)*(2*n-j)/2) = A(i,j)forj<=i<=n.
- if
BβBisREAL array, 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 134 of file stptrs.f.
β subroutine ztptrs β
subroutine ztptrs (character uplo, character trans, character diag, integer
n, integer nrhs, complex*16, dimension( * ) ap, complex*16, dimension(
ldb, * ) b, integer ldb, integer info)
ZTPTRS
Purpose
β¨ and this is where part 1 wraps β ZTPTRS's purpose is coming at you in part 2, stay tuned bestie β¨
β¨ Parameters β¨
Okay bestie, here's the tea on every single argument β no skipping, no cap. π
UPLOβCHARACTER*1. This one tells us which triangle ofAwe're working with:= 'U':Ais upper triangular;= 'L':Ais lower triangular.
TRANSβCHARACTER*1. Specifies the form of the system of equations, iykyk:= 'N':A * X = B(No transpose)= 'T':A**T * X = B(Transpose)= 'C':A**H * X = B(Conjugate transpose)
DIAGβCHARACTER*1. Are we dealing with a unit triangular matrix or not? That's the question:= 'N':Ais non-unit triangular;= 'U':Ais unit triangular.
NβINTEGER. The order of the matrixA. The vibe check here isN >= 0.NRHSβINTEGER. The number of right hand sides, i.e., the number of columns of the matrixB. Gotta haveNRHS >= 0.APβCOMPLEX*16 array, dimension (N*(N+1)/2). The upper or lower triangular matrixA, packed columnwise in a linear array. The j-th column ofAis stored in the arrayAPas follows:- if
UPLO = 'U',AP(i + (j-1)*j/2) = A(i,j)for1<=i<=j; - if
UPLO = 'L',AP(i + (j-1)*(2*n-j)/2) = A(i,j)forj<=i<=n.
- if
BβCOMPLEX*16 array, dimension (LDB,NRHS). On entry, the right hand side matrixB. On exit, ifINFO = 0, the solution matrixX. It's giving glow-up. β¨LDBβINTEGER. The leading dimension of the arrayB. Respect the constraint:LDB >= max(1,N).INFOβINTEGER. The receipts:= 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.
Definition at line 134 of file ztptrs.f.
Author: Generated automatically by Doxygen for LAPACK from the source code.
That's the whole page, bestie! π«Ά This lil' icon is from LAPACK, Version 3.12.0, and it's tptrs(3) β go slay some triangular systems. ππ
π¦ 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