Developer Reference

  • 2020.2
  • 07/15/2020
  • Public Content
Contents

?lalsd

Uses the singular value decomposition of A to solve the least squares problem.

Syntax

call slalsd
(
uplo
,
smlsiz
,
n
,
nrhs
,
d
,
e
,
b
,
ldb
,
rcond
,
rank
,
work
,
iwork
,
info
)
call dlalsd
(
uplo
,
smlsiz
,
n
,
nrhs
,
d
,
e
,
b
,
ldb
,
rcond
,
rank
,
work
,
iwork
,
info
)
call clalsd
(
uplo
,
smlsiz
,
n
,
nrhs
,
d
,
e
,
b
,
ldb
,
rcond
,
rank
,
work
,
rwork
,
iwork
,
info
)
call zlalsd
(
uplo
,
smlsiz
,
n
,
nrhs
,
d
,
e
,
b
,
ldb
,
rcond
,
rank
,
work
,
rwork
,
iwork
,
info
)
Include Files
  • mkl.fi
Description
The routine uses the singular value decomposition of
A
to solve the least squares problem of finding
X
to minimize the Euclidean norm of each column of
A*X
-
B
, where
A
is
n
-by-
n
upper bidiagonal, and
X
and
B
are
n
-by-
nrhs
. The solution
X
overwrites
B
.
The singular values of
A
smaller than
rcond
times the largest singular value are treated as zero in solving the least squares problem; in this case a minimum norm solution is returned. The actual singular values are returned in
d
in ascending order.
This code makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on those binary machines without guard digits which subtract like the Cray XMP, Cray YMP, Cray C 90, or Cray 2.
It could conceivably fail on hexadecimal or decimal machines without guard digits, but we know of none.
Input Parameters
uplo
CHARACTER*1
.
If
uplo
=
'U'
,
d
and
e
define an upper bidiagonal matrix.
If
uplo
=
'L'
,
d
and
e
define a lower bidiagonal matrix.
smlsiz
INTEGER
. The maximum size of the subproblems at the bottom of the computation tree.
n
INTEGER
. The dimension of the bidiagonal matrix.
n
0
.
nrhs
INTEGER
. The number of columns of
B
. Must be at least 1.
d
REAL
for
slalsd
/
clalsd
DOUBLE PRECISION
for
dlalsd
/
zlalsd
Array,
DIMENSION
(
n
). On entry,
d
contains the main diagonal of the bidiagonal matrix.
e
REAL
for
slalsd
/
clalsd
DOUBLE PRECISION
for
dlalsd
/
zlalsd
Array,
DIMENSION
(
n
-1). Contains the super-diagonal entries of the bidiagonal matrix. On exit,
e
is destroyed.
b
REAL
for
slalsd
DOUBLE PRECISION
for
dlalsd
COMPLEX
for
clalsd
DOUBLE COMPLEX
for
zlalsd
Array,
DIMENSION
(
ldb
,
nrhs
).
On input,
b
contains the right hand sides of the least squares problem. On output,
b
contains the solution X.
ldb
INTEGER
. The leading dimension of
b
in the calling subprogram. Must be at least
max(1,
n
)
.
rco