posv(3)
π posv(3) β Library Functions Manual π
okay bestie, so this is posv β the factor-and-solve girlie from the Library Functions Manual. She comes in four flavors (cposv, dposv, sposv, zposv) and they all do the exact same iconic thing: take your A * X = B situation, factor A with Cholesky, and hand you back X. No cap. Let's get into it π
β¨ NAME β¨
posv β posv: factor and solve π
πΈ SYNOPSIS πΈ
π Functions π
subroutine cposv (uplo, n, nrhs, a, lda, b, ldb, info)β CPOSV computes the solution to system of linear equationsA * X = Bfor PO matricessubroutine dposv (uplo, n, nrhs, a, lda, b, ldb, info)β DPOSV computes the solution to system of linear equationsA * X = Bfor PO matricessubroutine sposv (uplo, n, nrhs, a, lda, b, ldb, info)β SPOSV computes the solution to system of linear equationsA * X = Bfor PO matricessubroutine zposv (uplo, n, nrhs, a, lda, b, ldb, info)β ZPOSV computes the solution to system of linear equationsA * X = Bfor PO matrices
π¦ DETAILED DESCRIPTION π¦
So the page has a Detailed Description section and it is lowkey just a heading doing main character energy with nothing under it π β the actual tea is all in Function Documentation right below. Every single function gets the full treatment there. Scroll with me π«Ά
π FUNCTION DOCUMENTATION π
π subroutine cposv
subroutine cposv (character uplo, integer n, integer nrhs, complex,
dimension( lda, * ) a, integer lda, complex, dimension( ldb, * ) b,
integer ldb, integer info)
CPOSV computes the solution to system of linear equations A * X = B for PO matrices
π Purpose
ok so picture this: CPOSV computes 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. obsessed.
The Cholesky decomposition is used to factor A 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. Then the factored form of A is used to solve the system of equations A * X = B. literally the whole pipeline β¨
π Parameters
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 matrixB.NRHS >= 0.AβAisCOMPLEXarray, dimension(LDA,N).- On entry, the Hermitian matrix
A. 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. like, don't even look at it π - On exit, if
INFO = 0, the factorUorLfrom the Cholesky factorizationA = U**H*UorA = L*L**H.
- On entry, the Hermitian matrix
LDAβLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,N).BβBisCOMPLEXarray, dimension(LDB,NRHS).- On entry, the
N-by-NRHSright hand side matrixB. - On exit, if
INFO = 0, theN-by-NRHSsolution matrixX. she ate π
- On entry, the
LDBβLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).INFOβINFOisINTEGER= 0: successful exit π< 0: ifINFO = -i, thei-th argument had an illegal value> 0: ifINFO = i, the leading principal minor of orderiofAis not positive, so the factorization could not be completed, and the solution has not been computed. π so yeah, check yourINFO, bestie.
π«Ά Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
π Definition
Definition at line 129 of file cposv.f.
π subroutine dposv
subroutine dposv (character uplo, integer n, integer nrhs, double precision,
dimension( lda, * ) a, integer lda, double precision, dimension( ldb, *
) b, integer ldb, integer info)
DPOSV computes the solution to system of linear equations A * X = B for PO matrices
π Purpose
DPOSV computes 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.
The Cholesky decomposition is used to factor A 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. The factored form of A is then used to solve the system of equations A * X = B. same energy, but real numbers this time π
π Parameters
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 matrixB.NRHS >= 0.AβAisDOUBLE PRECISIONarray, dimension(LDA,N).- On entry, the symmetric matrix
A. 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. - On exit, if
INFO = 0, the factorUorLfrom the Cholesky factorizationA = U**T*UorA = L*L**T.
- On entry, the symmetric matrix
LDAβLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,N).BβBisDOUBLE PRECISIONarray, dimension(LDB,NRHS).- On entry, the
N-by-NRHSright hand side matrixB. - On exit, if
INFO = 0, theN-by-NRHSsolution matrixX.
- On entry, the
LDBβLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).INFOβINFOisINTEGER= 0: successful exit π< 0: ifINFO = -i, thei-th argument had an illegal value> 0: ifINFO = i, the leading principal minor of orderiofAis not positive, so the factorization could not be completed, and the solution has not been computed.
π«Ά Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
π Definition
Definition at line 129 of file dposv.f.
π subroutine sposv
subroutine sposv (character uplo, integer n, integer nrhs, real, dimension(
lda, * ) a, integer lda, real, dimension( ldb, * ) b, integer ldb,
integer info)
SPOSV computes the solution to system of linear equations A * X = B for PO matrices
π Purpose
SPOSV computes 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.
The Cholesky decomposition is used to factor A 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. The factored form of A is then used to solve the system of equations A * X = B. single precision said "I'm also here" πΈ
π Parameters
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 matrixB.NRHS >= 0.AβAisREALarray, dimension(LDA,N).- On entry, the symmetric matrix
A. 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. - On exit, if
INFO = 0, the factorUorLfrom the Cholesky factorizationA = U**T*UorA = L*L**T.
- On entry, the symmetric matrix
LDAβLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,N).BβBisREALarray, dimension(LDB,NRHS).- On entry, the
N-by-NRHSright hand side matrixB. - On exit, if
INFO = 0, theN-by-NRHSsolution matrixX.
- On entry, the
LDBβLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).INFOβINFOisINTEGER= 0: successful exit π< 0: ifINFO = -i, thei-th argument had an illegal value> 0: ifINFO = i, the leading principal minor of orderiofAis not positive, so the factorization could not be completed, and the solution has not been computed.
π«Ά Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
π Definition
Definition at line 129 of file sposv.f.
π subroutine zposv
subroutine zposv (character uplo, integer n, integer nrhs, complex*16,
dimension( lda, * ) a, integer lda, complex*16, dimension( ldb, * ) b,
integer ldb, integer info)
ZPOSV computes the solution to system of linear equations A * X = B for PO matrices
π Purpose
π¦ (...and this is exactly where part 1 runs out of runway β zposv's Purpose section keeps going in part 2, so don't go anywhere bestie) π¦
ZPOSV is literally here 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. π
β¨
The Cholesky decomposition is used to factor A 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. The factored form of A is then used to solve the system of equations A * X = B. π«Ά
β¨ Parameters β¨
UPLOβ isCHARACTER*1.= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored. π¦
Nβ isINTEGER. The number of linear equations, i.e., the order of the matrixA.N >= 0. πΈNRHSβ isINTEGER. The number of right hand sides, i.e., the number of columns of the matrixB.NRHS >= 0. πAβ isCOMPLEX*16array, dimension(LDA,N). On entry, the Hermitian matrixA. 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.
On exit, if INFO = 0, the factor U or L from the Cholesky factorization A = U**H *U or A = L*L**H. π₯
LDAβ isINTEGER. The leading dimension of the arrayA.LDA >= max(1,N). β¨Bβ isCOMPLEX*16array, dimension(LDB,NRHS). On entry, theN-by-NRHSright hand side matrixB. On exit, ifINFO = 0, theN-by-NRHSsolution matrixX. πLDBβ isINTEGER. The leading dimension of the arrayB.LDB >= max(1,N). πINFOβ isINTEGER.= 0: successful exit< 0: ifINFO = -i, the i-th argument had an illegal value> 0: ifINFO = i, the leading principal minor of order i ofAis not positive, so the factorization could not be completed, and the solution has not been computed. π
π«Ά Author π«Ά
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 129 of file zposv.f. π
πΈ Author πΈ
Generated automatically by Doxygen for LAPACK from the source code. π§
And that's the footer tea, bestie: source/version/date energy is LAPACK, Version 3.12.0, posv(3) β iconic, no cap. ππ
π¦ 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