CGELSS(3)
π CGELSS(3) β Library Functions Manual β¨
okay bestie, you've landed in the Library Functions Manual, and this is the page for CGELSS(3). The header path is literally /home/abui...RC/cgelss.f(3) β now let's get into the complex least-squares tea π«Ά
πΈ NAME πΈ
The source file behind this whole situation is, fr fr:
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/cgelss.f
β¨ SYNOPSIS β¨
π§ Functions/Subroutines π§
Here's the signature in all its main-character glory:
subroutine CGELSS (m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work,
lwork, rwork, info)
CGELSS solves overdetermined or underdetermined systems for GE
matrices
π Function/Subroutine Documentation π
Full signature, types and dimensions and everything β copy-paste safe, bestie:
subroutine CGELSS (integer m, integer n, integer nrhs, complex, dimension(
lda, * ) a, integer lda, complex, dimension( ldb, * ) b, integer ldb,
real, dimension( * ) s, real rcond, integer rank, complex, dimension( *
) work, integer lwork, real, dimension( * ) rwork, integer info)
CGELSS solves overdetermined or underdetermined systems for GE matrices
π Purpose π
okay so, here's the tea: CGELSS computes the minimum norm solution to a complex linear least squares problem:
Minimize 2-norm(| b - A*x |).
using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient.
Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X.
The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value. periodt π
π Parameters π
okay bestie, here's every single parameter, no skips, no cap:
π M
M is INTEGER. The number of rows of the matrix A. M >= 0.
π N
N is INTEGER. The number of columns of the matrix A. N >= 0.
π NRHS
NRHS is INTEGER. The number of right hand sides, i.e., the number of columns of the matrices B and X. NRHS >= 0.
π A
A is COMPLEX array, dimension (LDA,N). On entry, the M-by-N matrix A. On exit, the first min(m,n) rows of A are overwritten with its right singular vectors, stored rowwise.
π LDA
LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M).
π B
B is COMPLEX array, dimension (LDB,NRHS). On entry, the M-by-NRHS right hand side matrix B. On exit, B is overwritten by the N-by-NRHS solution matrix X. If m >= n and RANK = n, the residual sum-of-squares for the solution in the i-th column is given by the sum of squares of the modulus of elements n+1:m in that column.
π LDB
LDB is INTEGER. The leading dimension of the array B. LDB >= max(1,M,N).
π S
S is REAL array, dimension (min(M,N)). The singular values of A in decreasing order. The condition number of A in the 2-norm = S(1)/S(min(m,n)).
π RCOND
RCOND is REAL. RCOND is used to determine the effective rank of A. Singular values S(i) <= RCOND*S(1) are treated as zero. If RCOND < 0, machine precision is used instead.
π RANK
RANK is INTEGER. The effective rank of A, i.e., the number of singular values which are greater than RCOND*S(1).
π WORK
WORK is COMPLEX array, dimension (MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
π LWORK
LWORK is INTEGER. The dimension of the array WORK. LWORK >= 1, and also:
LWORK >= 2*min(M,N) + max(M,N,NRHS)
For good performance, LWORK should generally be larger.
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.
π RWORK
RWORK is REAL array, dimension (5*min(M,N)).
π INFO
INFO is INTEGER.
= 0: successful exit< 0: ifINFO = -i, the i-th argument had an illegal value.> 0: the algorithm for computing the SVD failed to converge; ifINFO = i, i off-diagonal elements of an intermediate bidiagonal form did not converge to zero.
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 176 of file cgelss.f.
π Author π
Generated automatically by Doxygen for LAPACK from the source code.
mwah π that's the whole page, bestie! Footer vibe check: LAPACK Version 3.12.0 and source path /home/abui...RC/cgelss.f(3) β signed off and slaying. π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms