CPST01(3)
π CPST01(3) β Library Functions Manual π
ok so bestie, we are deep in the LAPACK testing trenches today. this page lives at /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/LIN/cpst01.f and honestly? it's giving "unsung hero of the test suite." she reconstructs stuff, she checks residuals, she does NOT get enough credit. let's get into it β¨
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine CPST01 (uplo, n, a, lda, afac, ldafac, perm, ldperm, piv, rwork, resid, rank)β that's her! that's the girl!
π¦ Function/Subroutine Documentation π¦
subroutine CPST01 (character uplo, integer n, complex, dimension( lda, * )
a, integer lda, complex, dimension( ldafac, * ) afac, integer ldafac,
complex, dimension( ldperm, * ) perm, integer ldperm, integer,
dimension( * ) piv, real, dimension( * ) rwork, real resid, integer
rank)
CPST01
πΈ Purpose πΈ
ok so listen. CPST01 reconstructs an Hermitian positive semidefinite matrix A from its L or U factors and the permutation matrix P, and then it computes the residual. it's basically doing a vibe check on your factorization and ngl it does NOT miss π€
norm( P*L*L'*P' - A ) / ( N * norm(A) * EPS ) or
norm( P*U'*U*P' - A ) / ( N * norm(A) * EPS ),
where EPS is the machine epsilon, L' is the conjugate transpose of L, and U' is the conjugate transpose of U. periodt π
π Parameters π
UPLOβUPLOisCHARACTER*1. it specifies whether the upper or lower triangular part of the Hermitian matrixAis stored:= 'U': Upper triangular= 'L': Lower triangular
NβNisINTEGER. the number of rows and columns of the matrixA.N >= 0. (no negatives bestie, we don't do that here π«)AβAisCOMPLEXarray, dimension(LDA,N). the original Hermitian matrixA. the main character, truly πLDAβLDAisINTEGER. the leading dimension of the arrayA.LDA >= max(1,N).AFACβAFACisCOMPLEXarray, dimension(LDAFAC,N). the factorLorUfrom theL*L'orU'*Ufactorization ofA. she's the reconstructed glow-up β¨LDAFACβLDAFACisINTEGER. the leading dimension of the arrayAFAC.LDAFAC >= max(1,N).PERMβPERMisCOMPLEXarray, dimension(LDPERM,N). overwritten with the reconstructed matrix, and then with the differenceP*L*L'*P' - A(orP*U'*U*P' - A). yes she gets overwritten TWICE, she's busy πLDPERMβLDPERMisINTEGER. the leading dimension of the arrayPERM.LDAPERM >= max(1,N).(that's literally how the original spells it, don't come for me π)PIVβPIVisINTEGERarray, dimension(N).PIVis such that the nonzero entries are
P( PIV( K ), K ) = 1.
RWORKβRWORKisREALarray, dimension(N). that's it. that's the whole description. she's lowkey mysterious πRESIDβRESIDisREAL.- If
UPLO = 'L',norm(L*L' - A) / ( N * norm(A) * EPS ) - If
UPLO = 'U',norm(U'*U - A) / ( N * norm(A) * EPS )
- If
RANKβRANKisINTEGER. number of nonzero singular values ofA.
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line134of filecpst01.f.
π Author (the meta one) π
Generated automatically by Doxygen for LAPACK from the source code. yeah she was birthed by a doc generator, we don't hold that against her π«Ά
and that's the whole page bestie!! this was LAPACK, Version 3.12.0, served fresh from /home/abui...IN/cpst01.f(3) β mwah, go reconstruct something beautiful πβ¨π
π¦ 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