LA_GELSS and LA_GELSD compute the minimum-norm least squares solution to one or more real or complex linear systems A*x = b using the singular value decomposition of A. Matrix A is rectangular and may be rank-deficient. The vectors b and corresponding solution vectors x are the columns of matrices denoted B and X, respectively.
The effective rank of A is determined by treating as zero those singular values which are less than RCOND times the largest singular value. In addition to X, the routines also return the right singular vectors and, optionally, the rank and singular values of A.
LA_GELSD combines the singular value decomposition with a divide and conquer technique. For large matrices it is often much faster than LA_GELSS but uses more workspace.
LAPACK95 interface driver routine (version 3.0) -- UNI-C, Denmark; Univ. of Tennessee, USA; NAG Ltd., UK September, 2000
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(inout) | :: | a(:,:) | |||
real(kind=r8), | intent(inout) | :: | b(:,:) | |||
integer, | intent(out), | optional | :: | rank | ||
real(kind=r8), | intent(out), | optional, | target | :: | s(:) | |
real(kind=r8), | intent(in), | optional | :: | rcond | ||
integer, | intent(out), | optional | :: | info |