Purpose
=======
DLALSA is an itermediate step in solving the least squares problem
by computing the SVD of the coefficient matrix in compact form (The
singular vectors are computed as products of simple orthorgonal
matrices.).
If ICOMPQ = 0, DLALSA applies the inverse of the left singular vector
matrix of an upper bidiagonal matrix to the right hand side; and if
ICOMPQ = 1, DLALSA applies the right singular vector matrix to the
right hand side. The singular vector matrices were generated in
compact form by DLALSA.
Namespace: DotNumerics.LinearAlgebra.CSLapackAssembly: DWSIM.MathOps.DotNumerics (in DWSIM.MathOps.DotNumerics.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public void Run(
int ICOMPQ,
int SMLSIZ,
int N,
int NRHS,
ref double[] B,
int offset_b,
int LDB,
ref double[] BX,
int offset_bx,
int LDBX,
double[] U,
int offset_u,
int LDU,
double[] VT,
int offset_vt,
int[] K,
int offset_k,
double[] DIFL,
int offset_difl,
double[] DIFR,
int offset_difr,
double[] Z,
int offset_z,
double[] POLES,
int offset_poles,
int[] GIVPTR,
int offset_givptr,
int[] GIVCOL,
int offset_givcol,
int LDGCOL,
int[] PERM,
int offset_perm,
double[] GIVNUM,
int offset_givnum,
double[] C,
int offset_c,
double[] S,
int offset_s,
ref double[] WORK,
int offset_work,
ref int[] IWORK,
int offset_iwork,
ref int INFO
)
Public Sub Run (
ICOMPQ As Integer,
SMLSIZ As Integer,
N As Integer,
NRHS As Integer,
ByRef B As Double(),
offset_b As Integer,
LDB As Integer,
ByRef BX As Double(),
offset_bx As Integer,
LDBX As Integer,
U As Double(),
offset_u As Integer,
LDU As Integer,
VT As Double(),
offset_vt As Integer,
K As Integer(),
offset_k As Integer,
DIFL As Double(),
offset_difl As Integer,
DIFR As Double(),
offset_difr As Integer,
Z As Double(),
offset_z As Integer,
POLES As Double(),
offset_poles As Integer,
GIVPTR As Integer(),
offset_givptr As Integer,
GIVCOL As Integer(),
offset_givcol As Integer,
LDGCOL As Integer,
PERM As Integer(),
offset_perm As Integer,
GIVNUM As Double(),
offset_givnum As Integer,
C As Double(),
offset_c As Integer,
S As Double(),
offset_s As Integer,
ByRef WORK As Double(),
offset_work As Integer,
ByRef IWORK As Integer(),
offset_iwork As Integer,
ByRef INFO As Integer
)
Request Example
View SourceParameters
- ICOMPQ Int32
-
(input) INTEGER
Specifies whether the left or the right singular vector
matrix is involved.
= 0: Left singular vector matrix
= 1: Right singular vector matrix
- SMLSIZ Int32
-
(input) INTEGER
The maximum size of the subproblems at the bottom of the
computation tree.
- N Int32
-
(input) INTEGER
The row and column dimensions of the upper bidiagonal matrix.
- NRHS Int32
-
(input) INTEGER
The number of columns of B and BX. NRHS must be at least 1.
- B Double
-
(input/output) DOUBLE PRECISION array, dimension ( LDB, NRHS )
On input, B contains the right hand sides of the least
squares problem in rows 1 through M.
On output, B contains the solution X in rows 1 through N.
- offset_b Int32
-
- LDB Int32
-
(input) INTEGER
The leading dimension of B in the calling subprogram.
LDB must be at least max(1,MAX( M, N ) ).
- BX Double
-
(output) DOUBLE PRECISION array, dimension ( LDBX, NRHS )
On exit, the result of applying the left or right singular
vector matrix to B.
- offset_bx Int32
-
- LDBX Int32
-
(input) INTEGER
The leading dimension of BX.
- U Double
-
(input) DOUBLE PRECISION array, dimension ( LDU, SMLSIZ ).
On entry, U contains the left singular vector matrices of all
subproblems at the bottom level.
- offset_u Int32
-
- LDU Int32
-
(input) INTEGER, LDU = .GT. N.
The leading dimension of arrays U, VT, DIFL, DIFR,
POLES, GIVNUM, and Z.
- VT Double
-
(input) DOUBLE PRECISION array, dimension ( LDU, SMLSIZ+1 ).
On entry, VT' contains the right singular vector matrices of
all subproblems at the bottom level.
- offset_vt Int32
-
- K Int32
-
(input) INTEGER array, dimension ( N ).
- offset_k Int32
-
- DIFL Double
-
(input) DOUBLE PRECISION array, dimension ( LDU, NLVL ).
where NLVL = INT(log_2 (N/(SMLSIZ+1))) + 1.
- offset_difl Int32
-
- DIFR Double
-
(input) DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ).
On entry, DIFL(*, I) and DIFR(*, 2 * I -1) record
distances between singular values on the I-th level and
singular values on the (I -1)-th level, and DIFR(*, 2 * I)
record the normalizing factors of the right singular vectors
matrices of subproblems on I-th level.
- offset_difr Int32
-
- Z Double
-
(input) DOUBLE PRECISION array, dimension ( LDU, NLVL ).
On entry, Z(1, I) contains the components of the deflation-
adjusted updating row vector for subproblems on the I-th
level.
- offset_z Int32
-
- POLES Double
-
(input) DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ).
On entry, POLES(*, 2 * I -1: 2 * I) contains the new and old
singular values involved in the secular equations on the I-th
level.
- offset_poles Int32
-
- GIVPTR Int32
-
(input) INTEGER array, dimension ( N ).
On entry, GIVPTR( I ) records the number of Givens
rotations performed on the I-th problem on the computation
tree.
- offset_givptr Int32
-
- GIVCOL Int32
-
(input) INTEGER array, dimension ( LDGCOL, 2 * NLVL ).
On entry, for each I, GIVCOL(*, 2 * I - 1: 2 * I) records the
locations of Givens rotations performed on the I-th level on
the computation tree.
- offset_givcol Int32
-
- LDGCOL Int32
-
(input) INTEGER, LDGCOL = .GT. N.
The leading dimension of arrays GIVCOL and PERM.
- PERM Int32
-
(input) INTEGER array, dimension ( LDGCOL, NLVL ).
On entry, PERM(*, I) records permutations done on the I-th
level of the computation tree.
- offset_perm Int32
-
- GIVNUM Double
-
(input) DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ).
On entry, GIVNUM(*, 2 *I -1 : 2 * I) records the C- and S-
values of Givens rotations performed on the I-th level on the
computation tree.
- offset_givnum Int32
-
- C Double
-
(input) DOUBLE PRECISION array, dimension ( N ).
On entry, if the I-th subproblem is not square,
C( I ) contains the C-value of a Givens rotation related to
the right null space of the I-th subproblem.
- offset_c Int32
-
- S Double
-
(input) DOUBLE PRECISION array, dimension ( N ).
On entry, if the I-th subproblem is not square,
S( I ) contains the S-value of a Givens rotation related to
the right null space of the I-th subproblem.
- offset_s Int32
-
- WORK Double
-
(workspace) DOUBLE PRECISION array.
The dimension must be at least N.
- offset_work Int32
-
- IWORK Int32
-
(workspace) INTEGER array.
The dimension must be at least 3 * N
- offset_iwork Int32
-
- INFO Int32
-
(output) INTEGER
= 0: successful exit.
.LT. 0: if INFO = -i, the i-th argument had an illegal value.
See Also