posvx(3)
β¨ posvx(3) β¨
bestie, this is the Library Functions Manual entry for posvx, and it's literally giving factor and solve, expert energy. no cap, we're in expert mode. π
πΈ NAME πΈ
posvx β posvx: factor and solve, expert. periodt.
π SYNOPSIS π
β¨ Functions β¨
π
cposvx
subroutine cposvx (fact, uplo, n, nrhs, a, lda, af, ldaf, equed, s, b,
ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
CPOSVX computes the solution to system of linear equations A * X = B for PO matrices.
π
dposvx
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.
π
sposvx
subroutine sposvx (fact, uplo, n, nrhs, a, lda, af, ldaf, equed, s, b,
ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
SPOSVX computes the solution to system of linear equations A * X = B for PO matrices.
π
zposvx
subroutine zposvx (fact, uplo, n, nrhs, a, lda, af, ldaf, equed, s, b,
ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
ZPOSVX computes the solution to system of linear equations A * X = B for PO matrices.
π Detailed Description π
okay so this is the detailed description zone β the actual function documentation is right below, bestie π
π§ Function Documentation π§
π subroutine cposvx π
subroutine cposvx (character fact, character uplo, integer n, integer nrhs,
complex, dimension( lda, * ) a, integer lda, complex, dimension( ldaf, *
) af, integer ldaf, character equed, real, dimension( * ) s, complex,
dimension( ldb, * ) b, integer ldb, complex, dimension( ldx, * ) x,
integer ldx, real rcond, real, dimension( * ) ferr, real, dimension( * )
berr, complex, dimension( * ) work, real, dimension( * ) rwork, integer
info)
CPOSVX computes the solution to system of linear equations A * X = B for PO matrices.
π Purpose π
okay so CPOSVX uses the Cholesky factorization A = U**H*U or A = L*L**H to compute the solution to a complex system of linear equations
A * X = B
where A is an N-by-N Hermitian positive definite matrix and X and B are N-by-NRHS matrices. Error bounds on the solution and a condition estimate are also provided. no cap, it's giving expert mode. π
π 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**H* U, if UPLO = 'U', or
A = L * L**H, 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βFACT is 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βUPLO is CHARACTER*1.= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored.
NβN is INTEGER. The number of linear equations, i.e., the order of the matrixA.N >= 0.NRHSβNRHS is INTEGER. The number of right hand sides, i.e., the number of columns of the matricesBandX.NRHS >= 0.AβA is COMPLEX array, dimension (LDA,N). On entry, the Hermitian matrixA, except ifFACT = 'F'andEQUED = 'Y', thenAmust contain the equilibrated matrixdiag(S)*A*diag(S). IfUPLO = 'U', the leading N-by-N upper triangular part ofAcontains the upper triangular part of the matrixA, and the strictly lower triangular part ofAis not referenced. IfUPLO = 'L', the leading N-by-N lower 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, if FACT = 'E' and EQUED = 'Y', A is overwritten by diag(S)*A*diag(S).
LDAβLDA is INTEGER. The leading dimension of the arrayA.LDA >= max(1,N).AFβAF is COMPLEX array, dimension (LDAF,N). IfFACT = 'F', thenAFis an input argument and on entry contains the triangular factorUorLfrom the Cholesky factorizationA = U**H*UorA = L*L**H, in the same storage format asA. IfEQUED .ne. 'N', thenAFis the factored form of the equilibrated matrixdiag(S)*A*diag(S).
If FACT = 'N', then AF is an output argument and on exit returns the triangular factor U or L from the Cholesky factorization A = U**H*U or A = L*L**H of the original matrix A.
If FACT = 'E', then AF is an output argument and on exit returns the triangular factor U or L from the Cholesky factorization A = U**H*U or A = L*L**H of the equilibrated matrix A (see the description of A for the form of the equilibrated matrix).
LDAFβLDAF is INTEGER. The leading dimension of the arrayAF.LDAF >= max(1,N).EQUEDβEQUED is 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).
EQUED is an input argument if FACT = 'F'; otherwise, it is an output argument.
SβS is REAL 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βB is COMPLEX array, dimension (LDB,NRHS). On entry, the N-by-NRHS righthand side matrixB. On exit, ifEQUED = 'N',Bis not modified; ifEQUED = 'Y',Bis overwritten bydiag(S) * B.LDBβLDB is INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).XβX is COMPLEX array, dimension (LDX,NRHS). IfINFO = 0orINFO = N+1, the N-by-NRHS solution 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βLDX is INTEGER. The leading dimension of the arrayX.LDX >= max(1,N).RCONDβRCOND is REAL. 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βFERR is REAL 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βBERR is REAL 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βWORK is COMPLEX array, dimension (2*N).RWORKβRWORK is REAL array, dimension (N).INFOβ the full description is in the next part, bestie π (hold that thought!)INFOβ anINTEGER, and yes she's the one who tells you how it went π= 0: iconic, it worked, successful exit β¨< 0: messy β ifINFO = -i, then the i-th argument had an illegal value (check your inputs bestie π)> 0: ifINFO = i, and i isβ¦<= N: the leading principal minor of order i ofAis not positive, so the factorization could not be completed, and the solution has not been computed.RCOND = 0is returned. Not the vibe. π= 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. So likeβ¦ she's still gonna try π«Ά
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π Definition
Definition at line 303 of file cposvx.f.
πΈ subroutine dposvx
Okay bestie, next up: the double precision sister π same energy, bigger floats.
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)
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 equationsc A * X = B,whereAis anN-by-Nsymmetric positive definite matrix andXandBareN-by-NRHSmatrices. Error bounds on the solution and a condition estimate are also provided.
Like, she doesn't just hand you X and dip β she also gives you the receipts on how wrong it might be π
β¨
π¦ Description
Here's the whole glow-up routine, step by step β 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. Splitting her into triangles, as one does π
- If the leading principal minor of order i is not positive, then the routine returns with
INFO = 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. She's dramatic but she doesn't give up π€ - 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. Glow-up round two, no cap π₯
- If equilibration was used, the matrix
Xis premultiplied bydiag(S)so that it solves the original system before equilibration. Undoing the makeover so you get your answer back π«Ά
π Parameters
FACTβFACTisCHARACTER*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βUPLOisCHARACTER*1.= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored.
NβNisINTEGER. The number of linear equations, i.e., the order of the matrixA.N >= 0.NRHSβNRHSisINTEGER. The number of right hand sides, i.e., the number of columns of the matricesBandX.NRHS >= 0.AβAisDOUBLE PRECISIONarray, 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, if FACT = 'E' and EQUED = 'Y', A is overwritten by diag(S)*A*diag(S). π
LDAβLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,N).AFβAFisDOUBLE PRECISIONarray, dimension(LDAF,N).- If
FACT = '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). - If
FACT = 'N', thenAFis an output argument and on exit returns the triangular factorUorLfrom the Cholesky factorizationA = U**T*UorA = L*L**Tof the original matrixA. - If
FACT = '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).
- If
LDAFβLDAFisINTEGER. The leading dimension of the arrayAF.LDAF >= max(1,N).EQUEDβEQUEDisCHARACTER*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).
EQUED is an input argument if FACT = 'F'; otherwise, it is an output argument. She's giving both ways, iykyk π§
SβSisDOUBLE PRECISIONarray, 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βBisDOUBLE PRECISIONarray, 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βLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).XβXisDOUBLE PRECISIONarray, 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. The main character of the whole page tbh πLDXβLDXisINTEGER. The leading dimension of the arrayX.LDX >= max(1,N).RCONDβRCONDisDOUBLE 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βFERRisDOUBLE PRECISIONarray, dimension(NRHS). The estimated forward error bound for each solution vectorX(j)(the j-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. Overestimating a lil bit, honestly relatable πBERRβBERRisDOUBLE PRECISIONarray, 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βWORKisDOUBLE PRECISIONarray, dimension(3*N). Scratch space, she's just here to do the work πͺIWORKβIWORKisINTEGERarray, dimension(N). More scratch, but integers this time πINFOβ hold that thought bestie βINFOhas a whole breakdown of her own and it's coming right up πINFOβ itβs anINTEGER, and hereβs the whole mood ring of exit codes:= 0: successful exit. slay.< 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.
π¦ subroutine sposvx
subroutine sposvx (character fact, character uplo, integer n, integer nrhs,
real, dimension( lda, * ) a, integer lda, real, dimension( ldaf, * ) af,
integer ldaf, character equed, real, dimension( * ) s, real, dimension(
ldb, * ) b, integer ldb, real, dimension( ldx, * ) x, integer ldx, real
rcond, real, dimension( * ) ferr, real, dimension( * ) berr, real,
dimension( * ) work, integer, dimension( * ) iwork, integer info)
SPOSVX computes the solution to system of linear equations A * X = B for PO matrices. iconic behavior, honestly.
β¨ Purpose
SPOSVX uses the Cholesky factorization A = U**T*U or A = L*L**T to 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. bestie, itβs giving βsolve it and also tell you how sketchy the solve is.β π
π 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βFACT is 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βUPLO is CHARACTER*1.= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored.
NβN is INTEGER. The number of linear equations, i.e., the order of the matrixA.N >= 0.NRHSβNRHS is INTEGER. The number of right hand sides, i.e., the number of columns of the matricesBandX.NRHS >= 0.AβA is REAL 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βLDA is INTEGER. The leading dimension of the arrayA.LDA >= max(1,N).AFβAF is REAL 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βLDAF is INTEGER. The leading dimension of the arrayAF.LDAF >= max(1,N).EQUEDβEQUED is 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βS is REAL 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βB is REAL 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βLDB is INTEGER. The leading dimension of the arrayB.LDB >= max(1,N).XβX is REAL 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βLDX is INTEGER. The leading dimension of the arrayX.LDX >= max(1,N).RCONDβRCOND is REAL. 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βFERR is REAL 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βBERR is REAL 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βWORK is REAL array, dimension (3*N).IWORKβIWORK is INTEGER array, dimension (N).INFOβINFOisINTEGERβ bestie, here's the exit-code tea:= 0: successful exit. Slay.< 0: ifINFO = -i, the i-th argument had an illegal value. Not iconic.> 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 sposvx.f.
π¦ subroutine zposvx
subroutine zposvx (character fact, character uplo, integer n, integer nrhs,
complex*16, dimension( lda, * ) a, integer lda, complex*16, dimension(
ldaf, * ) af, integer ldaf, character equed, double precision,
dimension( * ) s, complex*16, dimension( ldb, * ) b, integer ldb,
complex*16, dimension( ldx, * ) x, integer ldx, double precision rcond,
double precision, dimension( * ) ferr, double precision, dimension( * )
berr, complex*16, dimension( * ) work, double precision, dimension( * )
rwork, integer info)
ZPOSVX computes the solution to system of linear equations A * X = B for PO matrices β periodt.
π― Purpose
Okay so ZPOSVX uses the Cholesky factorization A = U**H*U or A = L*L**H to compute the solution to a complex system of linear equations
A * X = B,
where A is an N-by-N Hermitian positive definite matrix and X and B are N-by-NRHS matrices.
Error bounds on the solution and a condition estimate are also provided. Highkey useful.
β¨ 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**H* U, if UPLO = 'U', or
A = L * L**H, 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βFACTisCHARACTER*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βUPLOisCHARACTER*1.= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored.
NβNisINTEGER. The number of linear equations, i.e., the order of the matrixA.N >= 0.NRHSβNRHSisINTEGER. The number of right hand sides, i.e., the number of columns of the matricesBandX.NRHS >= 0.AβAisCOMPLEX*16array, dimension(LDA,N). On entry, the Hermitian matrixA, except ifFACT = 'F'andEQUED = 'Y', thenAmust contain the equilibrated matrixdiag(S)*A*diag(S). IfUPLO = 'U', the leading N-by-N upper triangular part ofAcontains the upper triangular part of the matrixA, and the strictly lower triangular part ofAis not referenced. IfUPLO = 'L', the leading N-by-N lower 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, if FACT = 'E' and EQUED = 'Y', A is overwritten by diag(S)*A*diag(S).
LDAβLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,N).AFβAFisCOMPLEX*16array, dimension(LDAF,N). IfFACT = 'F', thenAFis an input argument and on entry contains the triangular factorUorLfrom the Cholesky factorizationA = U**H *UorA = L*L**H, in the same storage format asA. IfEQUED .ne. 'N', thenAFis the factored form of the equilibrated matrixdiag(S)*A*diag(S).
If FACT = 'N', then AF is an output argument and on exit returns the triangular factor U or L from the Cholesky factorization A = U**H *U or A = L*L**H of the original matrix A.
If FACT = 'E', then AF is an output argument and on exit returns the triangular factor U or L from the Cholesky factorization A = U**H *U or A = L*L**H of the equilibrated matrix A (see the description of A for the form of the equilibrated matrix).
LDAFβLDAFisINTEGER. The leading dimension of the arrayAF.LDAF >= max(1,N).EQUEDβEQUEDisCHARACTER*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).
EQUED is an input argument if FACT = 'F'; otherwise, it is an output argument.
SβSisDOUBLE PRECISIONarray, 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βBisCOMPLEX*16array, dimension(LDB,NRHS). On entry, the N-by-NRHS righthand side matrixB. On exit, ifEQUED = 'N',Bis not modified; ifEQUED = 'Y',Bis overwritten bydiag(S) * B.LDBβLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).XβXisCOMPLEX*16array, dimension(LDX,NRHS). IfINFO = 0orINFO = N+1, the N-by-NRHS solution 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βLDXisINTEGER. The leading dimension of the arrayX.LDX >= max(1,N).RCONDβRCONDisDOUBLE 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βFERRisDOUBLE PRECISIONarray, dimension(NRHS). The estimated forward error bound for each solution vectorX(j)(the j-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βBERRisDOUBLE PRECISIONarray, 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βWORKisCOMPLEX*16array, dimension(2*N).RWORKβRWORKisDOUBLE PRECISIONarray, dimension(N).INFOβ
INFO β the receipts, bestie π
INFO is INTEGER, and it's the one telling you how the whole thing went. Vibe check:
INFO = 0β successful exit. Slay, it worked. β¨INFO < 0β ifINFO = -i, the i-th argument had an illegal value. Not iconic, but at least it tells you which arg flopped. πINFO > 0β ifINFO = i, and i is:<= Nβ the leading principal minor of order i ofAis not positive, so the factorization could not be completed, and the solution has not been computed.RCOND = 0is returned. That's a hard no, no cap. π= N+1βUis nonsingular, butRCONDis less than machine precision, meaning 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. So likeβ¦ it's giving βmessy but let her cook.β ππ₯
Author π«Ά
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition π
Definition at line 303 of file zposvx.f.
Author, but the Doxygen kind π€
Author: Generated automatically by Doxygen for LAPACK from the source code.
That's the whole page, bestie! This posvx(3) page is from LAPACK Version 3.12.0 and was generated automatically by Doxygen from the source code β the footer we've got doesn't print a date, so I'm not gonna invent one. Bye! ππ
π¦ 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