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 matrix A. and N >= 0, always, no exceptions πŸ’…
  • NRHS β€” NRHS is INTEGER. the number of right hand sides, i.e. the number of columns of the matrix B. also NRHS >= 0 🫢
  • A β€” A is COMPLEX array, dimension (LDA,N). on entry, it's the N-by-N coefficient matrix A. on exit, it holds the factors L and U from the factorization A = P*L*U β€” and heads up, the unit diagonal elements of L are not stored πŸ™ˆ
  • LDA β€” LDA is INTEGER. the leading dimension of the array A, and it's gotta satisfy LDA >= max(1,N) ⭐
  • IPIV β€” IPIV is INTEGER array, dimension (N). the pivot indices that define the permutation matrix P β€” specifically, row i of the matrix was interchanged with row IPIV(i) πŸ‘‘
  • B β€” B is COMPLEX array, dimension (LDB,NRHS). on entry, the N-by-NRHS matrix of right hand side matrix B. on exit, if INFO = 0, it's the N-by-NRHS solution matrix X ✨ slay.
  • LDB β€” LDB is INTEGER. the leading dimension of the array B, and it needs LDB >= max(1,N) πŸ¦‹
  • INFO β€” INFO is INTEGER, and this one's the vibe check at the end:
    • = 0: successful exit πŸ’–
    • < 0: if INFO = -i, the i-th argument had an illegal value 😭
    • > 0: if INFO = i, U(i,i) is exactly zero. the factorization has been completed, but the factor U is 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