public interface getsls
GETSLS solves overdetermined or underdetermined complex linear systems
involving an M-by-N matrix A, using a tall skinny QR or short wide LQ
factorization of A. It is assumed that A has full rank.
The following options are provided:
1. If TRANS = 'N' and m >= n: find the least squares solution of
an overdetermined system, i.e., solve the least squares problem
minimize || B - AX ||.
2. If TRANS = 'N' and m < n: find the minimum norm solution of
an underdetermined system A * X = B.
3. If TRANS = 'C' and m >= n: find the minimum norm solution of
an undetermined system AT * X = B.
4. If TRANS = 'C' and m < n: find the least squares solution of
an overdetermined system, i.e., solve the least squares problem
minimize || B - A*T * X ||.
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.
Subroutines
Arguments
| Type |
Intent | Optional | Attributes |
|
Name |
|
|
character(len=1),
|
intent(in) |
|
|
:: |
trans |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
m |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
n |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
nrhs |
|
|
complex(kind=sp),
|
intent(inout) |
|
|
:: |
a(lda,*) |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
lda |
|
|
complex(kind=sp),
|
intent(inout) |
|
|
:: |
b(ldb,*) |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
ldb |
|
|
complex(kind=sp),
|
intent(out) |
|
|
:: |
work(*) |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
lwork |
|
|
integer(kind=ilp),
|
intent(out) |
|
|
:: |
info |
|
Arguments
| Type |
Intent | Optional | Attributes |
|
Name |
|
|
character(len=1),
|
intent(in) |
|
|
:: |
trans |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
m |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
n |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
nrhs |
|
|
real(kind=dp),
|
intent(inout) |
|
|
:: |
a(lda,*) |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
lda |
|
|
real(kind=dp),
|
intent(inout) |
|
|
:: |
b(ldb,*) |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
ldb |
|
|
real(kind=dp),
|
intent(out) |
|
|
:: |
work(*) |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
lwork |
|
|
integer(kind=ilp),
|
intent(out) |
|
|
:: |
info |
|
Arguments
| Type |
Intent | Optional | Attributes |
|
Name |
|
|
character(len=1),
|
intent(in) |
|
|
:: |
trans |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
m |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
n |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
nrhs |
|
|
real(kind=sp),
|
intent(inout) |
|
|
:: |
a(lda,*) |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
lda |
|
|
real(kind=sp),
|
intent(inout) |
|
|
:: |
b(ldb,*) |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
ldb |
|
|
real(kind=sp),
|
intent(out) |
|
|
:: |
work(*) |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
lwork |
|
|
integer(kind=ilp),
|
intent(out) |
|
|
:: |
info |
|
Arguments
| Type |
Intent | Optional | Attributes |
|
Name |
|
|
character(len=1),
|
intent(in) |
|
|
:: |
trans |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
m |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
n |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
nrhs |
|
|
complex(kind=dp),
|
intent(inout) |
|
|
:: |
a(lda,*) |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
lda |
|
|
complex(kind=dp),
|
intent(inout) |
|
|
:: |
b(ldb,*) |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
ldb |
|
|
complex(kind=dp),
|
intent(out) |
|
|
:: |
work(*) |
|
|
integer(kind=ilp),
|
intent(in) |
|
|
:: |
lwork |
|
|
integer(kind=ilp),
|
intent(out) |
|
|
:: |
info |
|
Module Procedures