SPST01(3)
π SPST01(3) β like, the LAPACK testing routine for reconstructing a symmetric positive semidefinite matrix, bestie β¨
okay so first things first: this page lives at /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/LIN/spst01.f and it's part of the LAPACK library functions manual (3). That's the whole vibe. It's a testing routine, which means it exists to check that other routines did their job right β the hype squad of linear algebra, lowkey. π
β¨ SYNOPSIS β¨
πΈ Functions/Subroutines
subroutine SPST01 (uplo, n, a, lda, afac, ldafac, perm, ldperm, piv,
rwork, resid, rank)
SPST01 π«Ά
π¦ Function/Subroutine Documentation π¦
subroutine SPST01 (character uplo, integer n, real, dimension( lda, * ) a,
integer lda, real, dimension( ldafac, * ) afac, integer ldafac, real,
dimension( ldperm, * ) perm, integer ldperm, integer, dimension( * )
piv, real, dimension( * ) rwork, real resid, integer rank)
SPST01 β
π Purpose:
!> !> SPST01 reconstructs a symmetric positive semidefinite matrix A !> from its L or U factors and the permutation matrix P and computes !> the residual !> 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. !>
So like, it takes your factors, rebuilds A from them, throws the permutation matrix P into the mix, and then measures how far off the reconstruction is from the original. It's giving "trust but verify" energy. π
π Parameters
UPLOβ okay soUPLOisCHARACTER*1and it tells us which triangular half of the symmetric matrixAis actually stored:= 'U': Upper triangular π= 'L': Lower triangular πΈ
NβNisINTEGER, the number of rows and columns of the matrixA(it's square, obvi). Constraint:N >= 0. β¨AβAisREAL array, dimension (LDA,N). It's the original symmetric matrixA, the main character. πLDAβLDAisINTEGER, the leading dimension of the arrayA. Constraint:LDA >= max(1,N). Don't skimp on this one bestie. π«ΆAFACβAFACisREAL array, dimension (LDAFAC,N), holding the factorLorUfrom theL*L'orU'*Ufactorization ofA. πLDAFACβLDAFACisINTEGER, the leading dimension of the arrayAFAC. Constraint:LDAFAC >= max(1,N). πPERMβPERMisREAL array, dimension (LDPERM,N), and it gets overwritten with the reconstructed matrix, and then with the differenceP*L*L'*P' - A(orP*U'*U*P' - A). So yeah, it's not coming back the same, fair warning πLDPERMβLDPERMisINTEGER, the leading dimension of the arrayPERM. Constraint:LDAPERM >= max(1,N). (yes, the original really does spell itLDAPERMhere β we don't fix, we report π«‘)PIVβPIVisINTEGER array, dimension (N).PIVis such that the nonzero entries areP( PIV( K ), K ) = 1. That's the permutation, periodt. π₯RWORKβRWORKisREAL array, dimension (N). That's it, that's the whole description. Scratch space doing its little job. π§RESIDβRESIDisREAL, the actual residual:- If
UPLO = 'L', it'snorm(L*L' - A) / ( N * norm(A) * EPS ) - If
UPLO = 'U', it'snorm(U'*U - A) / ( N * norm(A) * EPS )
- If
iykyk π
RANKβRANKisINTEGER, the number of nonzero singular values ofA. π
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 132 of file spst01.f. π
π Author (the meta one) π
Generated automatically by Doxygen for LAPACK from the source code. Not me writing fanfic, the robots did it. π€β¨
k bye bestie, go check those residuals π
β this iconic page is from LAPACK, Version 3.12.0, and it was served fresh from /home/abui...IN/spst01.f(3). Slay π¦πΈ
π¦ 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