SRC/cgesv.f(3)
π SRC/cgesv.f(3) β LAPACK Library Functions Manual π
ok so bestie, welcome to the cgesv page β¨ this is a real one from the LAPACK manual, and it's genuinely iconic β let's get into it π«Ά
β¨ NAME β¨
SRC/cgesv.f β like, that's literally the file, that's the whole name, no notes π
πΈ SYNOPSIS πΈ
Functions/Subroutines
subroutine cgesv (n, nrhs, a, lda, ipiv, b, ldb, info)
π Function/Subroutine Documentation π
subroutine cgesv (integer n, integer nrhs, complex, dimension( lda, * ) a,
integer lda, integer, dimension( * ) ipiv, complex, dimension( ldb, * )
b, integer ldb, integer info)
β Purpose β
!> !> CGESV computes the solution to a complex system of linear equations !> A * X = B, !> where A is an N-by-N matrix and X and B are N-by-NRHS matrices. !> !> The LU decomposition with partial pivoting and row interchanges is !> used to factor A as !> A = P * L * U, !> where P is a permutation matrix, L is unit lower triangular, and U is !> upper triangular. The factored form of A is then used to solve the !> system of equations A * X = B. !>
so, in bestie terms: you hand it a complex linear system A * X = B, and it goes off and does an LU decomposition with partial pivoting and row interchanges, factoring A as A = P * L * U β P is a permutation matrix, L is unit lower triangular, U is upper triangular β and then it uses that factored form to actually solve the system π no cap, that's the whole vibe.
π Parameters π
ok this is the part where you actually pay attention, bestie, because every single one of these matters π₯
NβN is INTEGER. it's the number of linear equations, i.e. the order of the matrixA. andN >= 0, always, no exceptions πNRHSβNRHS is INTEGER. the number of right hand sides, i.e. the number of columns of the matrixB. alsoNRHS >= 0π«ΆAβA is COMPLEX array, dimension (LDA,N). on entry, it's the N-by-N coefficient matrixA. on exit, it holds the factorsLandUfrom the factorizationA = P*L*Uβ and heads up, the unit diagonal elements ofLare not stored πLDAβLDA is INTEGER. the leading dimension of the arrayA, and it's gotta satisfyLDA >= max(1,N)βIPIVβIPIV is INTEGER array, dimension (N). the pivot indices that define the permutation matrixPβ specifically, row i of the matrix was interchanged with rowIPIV(i)πBβB is COMPLEX array, dimension (LDB,NRHS). on entry, the N-by-NRHS matrix of right hand side matrixB. on exit, ifINFO = 0, it's the N-by-NRHS solution matrixXβ¨ slay.LDBβLDB is INTEGER. the leading dimension of the arrayB, and it needsLDB >= max(1,N)π¦INFOβINFO is INTEGER, and this one's the vibe check at the end:= 0: successful exit π< 0: ifINFO = -i, the i-th argument had an illegal value π> 0: ifINFO = i,U(i,i)is exactly zero. the factorization has been completed, but the factorUis exactly singular, so the solution could not be computed π β fr fr, that's a real "we did all that work and it still didn't solve" moment.
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 123 of file cgesv.f. π
π Author π
Generated automatically by Doxygen for LAPACK from the source code. (yes, a robot wrote this page, not me, i'm just the messenger π§)
π that's the whole page bestie, every flag, every value, every default, every single !> line β nothing skipped, nothing invented π
signing off with love: LAPACK, Version 3.12.0 β SRC/cgesv.f(3) β go solve something iconic today, iykyk β¨ππ
π¦ 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