CTPCON(3)
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
Agets 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':Ais upper triangular= 'L':Ais lower triangular
DIAGβCHARACTER*1. What's the deal with the diagonal?= 'N':Ais non-unit triangular (the diagonal entries are whatever they are, they're real)= 'U':Ais unit triangular (diagonal is all 1s, don't even worry about it)
NβINTEGER. The order of the matrixA. And she saidN >= 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 matrixA, packed columnwise in a linear array. Here's exactly how the j-th column ofAgets stored inAP:- if
UPLO = 'U',AP(i + (j-1)*j/2) = A(i,j)for1<=i<=j; - if
UPLO = 'L',AP(i + (j-1)*(2n-j)/2) = A(i,j)forj<=i<=n.
- if
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 matrixA, computed asRCOND = 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: ifINFO = -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
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms