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) β€” CTPTRS
  • subroutine dtptrs (uplo, trans, diag, n, nrhs, ap, b, ldb, info) β€” DTPTRS
  • subroutine stptrs (uplo, trans, diag, n, nrhs, ap, b, ldb, info) β€” STPTRS
  • subroutine 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 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. 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 β€” 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.
  • AP β€” AP is COMPLEX array, dimension (N*(N+1)/2). The upper or lower triangular matrix A, packed columnwise in a linear array. The j-th column of A is stored in the array AP as follows:
    • if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
    • if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=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. it's giving transformation arc ✨
  • 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 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 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. 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 β€” 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) ← note the extra "= Transpose", she's different πŸ’«
  • 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.
  • AP β€” AP is DOUBLE PRECISION array, dimension (N*(N+1)/2). The upper or lower triangular matrix A, packed columnwise in a linear array. The j-th column of A is stored in the array AP as follows:
    • if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
    • if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=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 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 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. 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 β€” 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.
  • AP β€” AP is REAL array, dimension (N*(N+1)/2). The upper or lower triangular matrix A, packed columnwise in a linear array. The j-th column of A is stored in the array AP as follows:
    • if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
    • if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=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 β€” 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 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 of A we're working with:
    • = 'U': A is upper triangular;
    • = 'L': A is 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': A is non-unit triangular;
    • = 'U': A is unit triangular.
  • N β€” INTEGER. The order of the matrix A. The vibe check here is N >= 0.
  • NRHS β€” INTEGER. The number of right hand sides, i.e., the number of columns of the matrix B. Gotta have NRHS >= 0.
  • AP β€” COMPLEX*16 array, dimension (N*(N+1)/2). The upper or lower triangular matrix A, packed columnwise in a linear array. The j-th column of A is stored in the array AP as follows:
    • if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
    • if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
  • B β€” COMPLEX*16 array, dimension (LDB,NRHS). On entry, the right hand side matrix B. On exit, if INFO = 0, the solution matrix X. It's giving glow-up. ✨
  • LDB β€” INTEGER. The leading dimension of the array B. Respect the constraint: LDB >= max(1,N).
  • INFO β€” INTEGER. The receipts:
    • = 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 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