slasd1 (l)  Linux Manuals
slasd1: computes the SVD of an upper bidiagonal NbyM matrix B,
NAME
SLASD1  computes the SVD of an upper bidiagonal NbyM matrix B,SYNOPSIS
 SUBROUTINE SLASD1(
 NL, NR, SQRE, D, ALPHA, BETA, U, LDU, VT, LDVT, IDXQ, IWORK, WORK, INFO )
 INTEGER INFO, LDU, LDVT, NL, NR, SQRE
 REAL ALPHA, BETA
 INTEGER IDXQ( * ), IWORK( * )
 REAL D( * ), U( LDU, * ), VT( LDVT, * ), WORK( * )
PURPOSE
SLASD1 computes the SVD of an upper bidiagonal NbyM matrix B, where N = NL + NR + 1 and M = N + SQRE. SLASD1 is called from SLASD0. A related subroutine SLASD7 handles the case in which the singular values (and the singular vectors in factored form) are desired. SLASD1 computes the SVD as follows:where Zaq = (Z1aq a Z2aq b) = uaq VTaq, 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.
secular equation problem is reduced by one.
performed by the routine SLASD2.
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 SLASD4
by SLASD3). 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.
for the current problem are multiplied with the singular vectors
from the overall problem.
ARGUMENTS
 NL (input) INTEGER
 The row dimension of the upper block. NL >= 1.
 NR (input) INTEGER
 The row dimension of the lower block. NR >= 1.
 SQRE (input) INTEGER

= 0: the lower block is an NRbyNR square matrix.
= 1: the lower block is an NRby(NR+1) rectangular matrix. The bidiagonal matrix has row dimension N = NL + NR + 1, and column dimension M = N + SQRE.  D (input/output) REAL array, dimension (NL+NR+1).

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.  ALPHA (input/output) REAL
 Contains the diagonal element associated with the added row.
 BETA (input/output) REAL
 Contains the offdiagonal element associated with the added row.
 U (input/output) REAL 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.  LDU (input) INTEGER
 The leading dimension of the array U. LDU >= max( 1, N ).
 VT (input/output) REAL array, dimension (LDVT,M)

where M = N + SQRE.
On entry VT(1:NL+1, 1:NL+1)aq contains the right singular
vectors of the upper block; VT(NL+2:M, NL+2:M)aq contains the right singular vectors of the lower block. On exit VTaq contains the right singular vectors of the bidiagonal matrix.  LDVT (input) INTEGER
 The leading dimension of the array VT. LDVT >= max( 1, M ).
 IDXQ (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.
 IWORK (workspace) INTEGER array, dimension (4*N)
 WORK (workspace) REAL array, dimension (3*M**2+2*M)
 INFO (output) INTEGER

= 0: successful exit.
< 0: if INFO = i, the ith argument had an illegal value.
> 0: if INFO = 1, an singular value did not converge
FURTHER DETAILS
Based on contributions byMing Gu and Huan Ren, Computer Science Division, University of
California at Berkeley, USA