Purpose
=======
DLASD1 computes the SVD of an upper bidiagonal N-by-M matrix B,
where N = NL + NR + 1 and M = N + SQRE. DLASD1 is called from DLASD0.
A related subroutine DLASD7 handles the case in which the singular
values (and the singular vectors in factored form) are desired.
DLASD1 computes the SVD as follows:
( D1(in) 0 0 0 )
B = U(in) * ( Z1' a Z2' b ) * VT(in)
( 0 0 D2(in) 0 )
= U(out) * ( D(out) 0) * VT(out)
where Z' = (Z1' a Z2' b) = u' VT', and u is a vector of dimension M
with ALPHA and BETA in the NL+1 and NL+2 th entries and zeros
elsewhere; and the entry b is empty if SQRE = 0.
The left singular vectors of the original matrix are stored in U, and
the transpose of the right singular vectors are stored in VT, and the
singular values are in D. The algorithm consists of three stages:
The first stage consists of deflating the size of the problem
when there are multiple singular values or when there are zeros in
the Z vector. For each such occurence the dimension of the
secular equation problem is reduced by one. This stage is
performed by the routine DLASD2.
The second stage consists of calculating the updated
singular values. This is done by finding the square roots of the
roots of the secular equation via the routine DLASD4 (as called
by DLASD3). This routine also calculates the singular vectors of
the current problem.
The final stage consists of computing the updated singular vectors
directly using the updated singular values. The singular vectors
for the current problem are multiplied with the singular vectors
from the overall problem.
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 NL,
int NR,
int SQRE,
ref double[] D,
int offset_d,
ref double ALPHA,
ref double BETA,
ref double[] U,
int offset_u,
int LDU,
ref double[] VT,
int offset_vt,
int LDVT,
ref int[] IDXQ,
int offset_idxq,
ref int[] IWORK,
int offset_iwork,
ref double[] WORK,
int offset_work,
ref int INFO
)
Public Sub Run (
NL As Integer,
NR As Integer,
SQRE As Integer,
ByRef D As Double(),
offset_d As Integer,
ByRef ALPHA As Double,
ByRef BETA As Double,
ByRef U As Double(),
offset_u As Integer,
LDU As Integer,
ByRef VT As Double(),
offset_vt As Integer,
LDVT As Integer,
ByRef IDXQ As Integer(),
offset_idxq As Integer,
ByRef IWORK As Integer(),
offset_iwork As Integer,
ByRef WORK As Double(),
offset_work As Integer,
ByRef INFO As Integer
)
Request Example
View SourceParameters
- NL Int32
-
(input) INTEGER
The row dimension of the upper block. NL .GE. 1.
- NR Int32
-
(input) INTEGER
The row dimension of the lower block. NR .GE. 1.
- SQRE Int32
-
(input) INTEGER
= 0: the lower block is an NR-by-NR square matrix.
= 1: the lower block is an NR-by-(NR+1) rectangular matrix.
The bidiagonal matrix has row dimension N = NL + NR + 1,
and column dimension M = N + SQRE.
- D Double
-
(input/output) DOUBLE PRECISION array,
dimension (N = NL+NR+1).
On entry D(1:NL,1:NL) contains the singular values of the
upper block; and D(NL+2:N) contains the singular values of
the lower block. On exit D(1:N) contains the singular values
of the modified matrix.
- offset_d Int32
-
- ALPHA Double
-
(input/output) DOUBLE PRECISION
Contains the diagonal element associated with the added row.
- BETA Double
-
(input/output) DOUBLE PRECISION
Contains the off-diagonal element associated with the added
row.
- U Double
-
(input/output) DOUBLE PRECISION array, dimension(LDU,N)
On entry U(1:NL, 1:NL) contains the left singular vectors of
the upper block; U(NL+2:N, NL+2:N) contains the left singular
vectors of the lower block. On exit U contains the left
singular vectors of the bidiagonal matrix.
- offset_u Int32
-
- LDU Int32
-
(input) INTEGER
The leading dimension of the array U. LDU .GE. max( 1, N ).
- VT Double
-
(input/output) DOUBLE PRECISION array, dimension(LDVT,M)
where M = N + SQRE.
On entry VT(1:NL+1, 1:NL+1)' contains the right singular
vectors of the upper block; VT(NL+2:M, NL+2:M)' contains
the right singular vectors of the lower block. On exit
VT' contains the right singular vectors of the
bidiagonal matrix.
- offset_vt Int32
-
- LDVT Int32
-
(input) INTEGER
The leading dimension of the array VT. LDVT .GE. max( 1, M ).
- IDXQ Int32
-
(output) INTEGER array, dimension(N)
This contains the permutation which will reintegrate the
subproblem just solved back into sorted order, i.e.
D( IDXQ( I = 1, N ) ) will be in ascending order.
- offset_idxq Int32
-
- IWORK Int32
-
(workspace) INTEGER array, dimension( 4 * N )
- offset_iwork Int32
-
- WORK Double
-
(workspace) DOUBLE PRECISION array, dimension( 3*M**2 + 2*M )
- offset_work Int32
-
- INFO Int32
-
(output) INTEGER
= 0: successful exit.
.LT. 0: if INFO = -i, the i-th argument had an illegal value.
.GT. 0: if INFO = 1, an singular value did not converge
See Also