CTPCON(3)

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

CTPCON - bestie's guide to condition numbers on packed triangular matrices πŸ’…

Okay so welcome to the CTPCON page, and yes it lives at /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/ctpcon.f β€” that's the file, that's the vibe, we move. This is part of LAPACK and it's lowkey iconic. Let's get into it. ✨


SYNOPSIS

subroutine CTPCON (norm, uplo, diag, n, ap, rcond, work, rwork, info)

Like, here's the full signature with all the types spelled out, no gatekeeping:

subroutine CTPCON (character norm, character uplo, character diag, integer
    n, complex, dimension( * ) ap, real rcond, complex, dimension( * ) work,
    real, dimension( * ) rwork, integer info)

She's called CTPCON and she does exactly one thing but she does it well. πŸ’β€β™€οΈ


Function/Subroutine Documentation πŸ’–

Purpose

Okay so picture this: you've got a packed triangular matrix A and you need to know how close to singular it is. That's literally CTPCON's whole job. She estimates the reciprocal of the condition number of A, in either the 1-norm or the infinity-norm.

Here's the tea on how it works:

  • The norm of A gets computed
  • An estimate is obtained for norm(inv(A))
  • Then the reciprocal of the condition number is computed as:
RCOND = 1 / ( norm(A) * norm(inv(A)) ).

Periodt. That's the formula. No cap. πŸŽ€


Parameters

Okay bestie, let's go through every single one of these because they ALL matter. No skipping. None. πŸ’…

  • NORM β€” CHARACTER*1. This one tells us whether you want the 1-norm condition number or the infinity-norm condition number. Your options are:
    • = '1' or 'O': 1-norm
    • = 'I': Infinity-norm
  • UPLO β€” CHARACTER*1. Which triangle are we working with?
    • = 'U': A is upper triangular
    • = 'L': A is lower triangular
  • DIAG β€” CHARACTER*1. What's the deal with the diagonal?
    • = 'N': A is non-unit triangular (the diagonal entries are whatever they are, they're real)
    • = 'U': A is unit triangular (diagonal is all 1s, don't even worry about it)
  • N β€” INTEGER. The order of the matrix A. And she said N >= 0 β€” that's the rule, okay? Respect the constraint. 🌸
  • AP β€” COMPLEX array, dimension (N*(N+1)/2). This is THE array. The upper or lower triangular matrix A, packed columnwise in a linear array. Here's exactly how the j-th column of A gets stored in AP:
    • if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
    • if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.

And heads up: if DIAG = 'U', the diagonal elements of A are not referenced and are assumed to be 1. So like, don't come for them, they're not even in the conversation. πŸ¦‹

  • RCOND β€” REAL. The reciprocal of the condition number of the matrix A, computed as RCOND = 1/(norm(A) * norm(inv(A))). This is the output you actually care about, bestie. πŸ’–
  • WORK β€” COMPLEX array, dimension (2*N). Workspace array. She needs room to think. 🧠
  • RWORK β€” REAL array, dimension (N). More workspace, but real this time. Yes queen, use both. πŸ‘‘
  • INFO β€” INTEGER. The vibe check at the end:
    • = 0: successful exit β€” slay! πŸŽ‰
    • < 0: if INFO = -i, the i-th argument had an illegal value β€” not slay, fix your input. πŸ’€

Author

So who made this masterpiece? It's giving collaborative excellence:

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

Dream team fr fr. 🫢


Definition

Definition at line 128 of file ctpcon.f. β€” that's where she lives in the source. Little home. 🏑


Ngl, if you're out here passing illegal arguments, INFO will clock you with a negative number and you'll know exactly which one was the problem. The i-th argument. She keeps receipts. πŸ“‹

Generated automatically by Doxygen for LAPACK from the source code. That's the fine print, bestie.

And that's the whole page! LAPACK Version 3.12.0, living at /home/abui...RC/ctpcon.f(3) β€” thanks for coming to my TED talk, stay iconic, and remember: always check your norms. πŸŒˆπŸ’œπŸŽ€

πŸ“¦ where this page comes from