SRC/dposvx.f(3)
From the Library Functions Manual, this is the SRC/dposvx.f(3) page, bestie.
π NAME π
SRC/dposvx.f β that's literally the whole name entry, no cap. This is the page for that file, and we're about to get into it.
β¨ SYNOPSIS β¨
π Functions/Subroutines π
okay so here's the function roster: it's one subroutine, and she's the main character:
subroutine dposvx (fact, uplo, n, nrhs, a, lda, af, ldaf, equed, s, b,
ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
DPOSVX computes the solution to system of linear equations A * X = B for PO matrices π
π» Function/Subroutine Documentation
Okay bestie, hereβs the actual signature, copied exactly because we do not play with argument order:
subroutine dposvx (character fact, character uplo, integer n, integer nrhs,
double precision, dimension( lda, * ) a, integer lda, double precision,
dimension( ldaf, * ) af, integer ldaf, character equed, double
precision, dimension( * ) s, double precision, dimension( ldb, * ) b,
integer ldb, double precision, dimension( ldx, * ) x, integer ldx,
double precision rcond, double precision, dimension( * ) ferr, double
precision, dimension( * ) berr, double precision, dimension( * ) work,
integer, dimension( * ) iwork, integer info)
And the one-liner is literally: DPOSVX computes the solution to system of linear equations A * X = B for PO matrices β¨
π Purpose
DPOSVXuses the Cholesky factorizationA = U**T*UorA = L*L**Tto compute the solution to a real system of linear equations
A * X = B,
where A is an N-by-N symmetric positive definite matrix and X and B are N-by-NRHS matrices.
Error bounds on the solution and a condition estimate are also provided. So yes, itβs not just βsolve and byeβ β itβs giving thorough π
π¦ Description
The following steps are performed:
- If
FACT = 'E', real scaling factors are computed to equilibrate the system:
diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
Whether or not the system will be equilibrated depends on the scaling of the matrix A, but if equilibration is used, A is overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
- If
FACT = 'N'or'E', the Cholesky decomposition is used to factor the matrixA(after equilibration ifFACT = 'E') as
A = U**T* U, if UPLO = 'U', or
A = L * L**T, if UPLO = 'L',
where U is an upper triangular matrix and L is a lower triangular matrix.
- If the leading principal minor of order
iis not positive, then the routine returns withINFO = i. Otherwise, the factored form ofAis used to estimate the condition number of the matrixA. If the reciprocal of the condition number is less than machine precision,INFO = N+1is returned as a warning, but the routine still goes on to solve forXand compute error bounds as described below. - The system of equations is solved for
Xusing the factored form ofA. - Iterative refinement is applied to improve the computed solution matrix and calculate error bounds and backward error estimates for it.
- If equilibration was used, the matrix
Xis premultiplied bydiag(S)so that it solves the original system before equilibration.
π Parameters
FACTβCHARACTER*1. Specifies whether or not the factored form of the matrixAis supplied on entry, and if not, whether the matrixAshould be equilibrated before it is factored.'F': On entry,AFcontains the factored form ofA. IfEQUED = 'Y', the matrixAhas been equilibrated with scaling factors given byS.AandAFwill not be modified.'N': The matrixAwill be copied toAFand factored.'E': The matrixAwill be equilibrated if necessary, then copied toAFand factored.
UPLOβCHARACTER*1.'U': Upper triangle ofAis stored;'L': Lower triangle ofAis stored.
NβINTEGER. The number of linear equations, i.e., the order of the matrixA. Constraint:N >= 0.NRHSβINTEGER. The number of right hand sides, i.e., the number of columns of the matricesBandX. Constraint:NRHS >= 0.AβDOUBLE PRECISION array, dimension (LDA,N). On entry, the symmetric matrixA, except ifFACT = 'F'andEQUED = 'Y', thenAmust contain the equilibrated matrixdiag(S)*A*diag(S). IfUPLO = 'U', the leadingN-by-Nupper triangular part ofAcontains the upper triangular part of the matrixA, and the strictly lower triangular part ofAis not referenced. IfUPLO = 'L', the leadingN-by-Nlower triangular part ofAcontains the lower triangular part of the matrixA, and the strictly upper triangular part ofAis not referenced.Ais not modified ifFACT = 'F'or'N', or ifFACT = 'E'andEQUED = 'N'on exit. On exit, ifFACT = 'E'andEQUED = 'Y',Ais overwritten bydiag(S)*A*diag(S).LDAβINTEGER. The leading dimension of the arrayA. Constraint:LDA >= max(1,N).AFβDOUBLE PRECISION array, dimension (LDAF,N). IfFACT = 'F', thenAFis an input argument and on entry contains the triangular factorUorLfrom the Cholesky factorizationA = U**T*UorA = L*L**T, in the same storage format asA. IfEQUED .ne. 'N', thenAFis the factored form of the equilibrated matrixdiag(S)*A*diag(S). IfFACT = 'N', thenAFis an output argument and on exit returns the triangular factorUorLfrom the Cholesky factorizationA = U**T*UorA = L*L**Tof the original matrixA. IfFACT = 'E', thenAFis an output argument and on exit returns the triangular factorUorLfrom the Cholesky factorizationA = U**T*UorA = L*L**Tof the equilibrated matrixA(see the description ofAfor the form of the equilibrated matrix).LDAFβINTEGER. The leading dimension of the arrayAF. Constraint:LDAF >= max(1,N).EQUEDβCHARACTER*1. Specifies the form of equilibration that was done.'N': No equilibration (always true ifFACT = 'N').'Y': Equilibration was done, i.e.,Ahas been replaced bydiag(S) * A * diag(S).EQUEDis an input argument ifFACT = 'F'; otherwise, it is an output argument.
SβDOUBLE PRECISION array, dimension (N). The scale factors forA; not accessed ifEQUED = 'N'.Sis an input argument ifFACT = 'F'; otherwise,Sis an output argument. IfFACT = 'F'andEQUED = 'Y', each element ofSmust be positive.BβDOUBLE PRECISION array, dimension (LDB,NRHS). On entry, theN-by-NRHSright hand side matrixB. On exit, ifEQUED = 'N',Bis not modified; ifEQUED = 'Y',Bis overwritten bydiag(S) * B.LDBβINTEGER. The leading dimension of the arrayB. Constraint:LDB >= max(1,N).XβDOUBLE PRECISION array, dimension (LDX,NRHS). IfINFO = 0orINFO = N+1, theN-by-NRHSsolution matrixXto the original system of equations. Note that ifEQUED = 'Y',AandBare modified on exit, and the solution to the equilibrated system isinv(diag(S))*X.LDXβINTEGER. The leading dimension of the arrayX. Constraint:LDX >= max(1,N).RCONDβDOUBLE PRECISION. The estimate of the reciprocal condition number of the matrixAafter equilibration (if done). IfRCONDis less than the machine precision (in particular, ifRCOND = 0), the matrix is singular to working precision. This condition is indicated by a return code ofINFO > 0.FERRβDOUBLE PRECISION array, dimension (NRHS). The estimated forward error bound for each solution vectorX(j)(thej-th column of the solution matrixX). IfXTRUEis the true solution corresponding toX(j),FERR(j)is an estimated upper bound for the magnitude of the largest element in(X(j) - XTRUE)divided by the magnitude of the largest element inX(j). The estimate is as reliable as the estimate forRCOND, and is almost always a slight overestimate of the true error.BERRβDOUBLE PRECISION array, dimension (NRHS). The componentwise relative backward error of each solution vectorX(j)(i.e., the smallest relative change in any element ofAorBthat makesX(j)an exact solution).WORKβDOUBLE PRECISION array, dimension (3*N).IWORKβINTEGER array, dimension (N).INFOβINTEGER.= 0: successful exit< 0: ifINFO = -i, thei-th argument had an illegal value> 0: ifINFO = i, andiis<= N: the leading principal minor of orderiofAis not positive, so the factorization could not be completed, and the solution has not been computed.RCOND = 0is returned.= N+1:Uis nonsingular, butRCONDis less than machine precision, meaning that the matrix is singular to working precision. Nevertheless, the solution and error bounds are computed because there are a number of situations where the computed solution can be more accurate than the value ofRCONDwould suggest.
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 304 of file dposvx.f.
π AUTHOR
So likeβ¦ nobody actually wrote this one by hand, bestie. It was generated automatically by Doxygen for LAPACK from the source code β the docs equivalent of a bot doing its lil thing and honestly? It ate. π β¨
Which means no human author to credit here, just the machinery doing its job and the LAPACK source code being the real main character. π«Ά
And that's the whole page, periodt! π This was LAPACK Version 3.12.0, living its best life as SRC/dposvx.f(3), auto-generated by Doxygen from the source code. Go forth and dposvx responsibly, icon. πππ₯
π¦ where this page comes from
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms