?lasda
?lasda
Computes the singular value decomposition (SVD) of a real upper bidiagonal matrix with diagonal
d
and off-diagonal e
. Used by ?bdsdc
.Syntax
void slasda
(
lapack_int
*icompq
,
lapack_int
*smlsiz
,
lapack_int
*n
,
lapack_int
*sqre
,
float
*d
,
float
*e
,
float
*u
,
lapack_int
*ldu
,
float
*vt
,
lapack_int
*k
,
float
*difl
,
float
*difr
,
float
*z
,
float
*poles
,
lapack_int
*givptr
,
lapack_int
*givcol
,
lapack_int
*ldgcol
,
lapack_int
*perm
,
float
*givnum
,
float
*c
,
float
*s
,
float
*work
,
lapack_int
*iwork
,
lapack_int
*info
);
void dlasda
(
lapack_int
*icompq
,
lapack_int
*smlsiz
,
lapack_int
*n
,
lapack_int
*sqre
,
double
*d
,
double
*e
,
double
*u
,
lapack_int
*ldu
,
double
*vt
,
lapack_int
*k
,
double
*difl
,
double
*difr
,
double
*z
,
double
*poles
,
lapack_int
*givptr
,
lapack_int
*givcol
,
lapack_int
*ldgcol
,
lapack_int
*perm
,
double
*givnum
,
double
*c
,
double
*s
,
double
*work
,
lapack_int
*iwork
,
lapack_int
*info
);
Include Files
- mkl.h
Description
Using a divide and conquer approach, .
?lasda
computes the singular value decomposition (SVD
) of a real upper bidiagonal n
-by-m
matrix B
with diagonal d
and off-diagonal e
, where m
= n
+ sqre
The algorithm computes the singular values in the . The orthogonal matrices
SVD
B
= U
*S
*VT
U
and VT
are optionally computed in compact form. A related subroutine ?lasd0
computes the singular values and the singular vectors in explicit form.Input Parameters
- icompq
- Specifies whether singular vectors are to be computed in compact form, as follows:= 0: Compute singular values only.= 1: Compute singular vectors of upper bidiagonal matrix in compact form.
- smlsiz
- The maximum size of the subproblems at the bottom of the computation tree.
- n
- The row dimension of the upper bidiagonal matrix. This is also the dimension of the main diagonal arrayd.
- sqre
- Specifies the column dimension of the bidiagonal matrix.If: the bidiagonal matrix has column dimensionsqre= 0m=nIf: the bidiagonal matrix has column dimensionsqre= 1.m=n+ 1
- d
- Array,DIMENSION(n). On entry,dcontains the main diagonal of the bidiagonal matrix.
- e
- Array,DIMENSION(m- 1 ). Contains the subdiagonal entries of the bidiagonal matrix. On exit,eis destroyed.
- ldu
- The leading dimension of arraysu,vt,difl,difr,poles,givnum, andz..ldu≥n
- ldgcol
- The leading dimension of arraysgivcolandperm..ldgcol≥n
- work
- Workspace array,DIMENSION(6.n+(smlsiz+1)2)
- iwork
- Workspace array,Dimensionmust be at least (7n).
Output Parameters
- d
- On exitd, if, contains the singular values of the bidiagonal matrix.info= 0
- u
- Array,DIMENSION(ldu,smlsiz) if.icompq=1Not referenced if.icompq= 0If, on exit,icompq= 1ucontains the left singular vector matrices of all subproblems at the bottom level.
- vt
- Array,DIMENSION(ldu,smlsiz+1 ) if, and not referenced ificompq= 1. Ificompq= 0, on exit,icompq= 1vt' contains the right singular vector matrices of all subproblems at the bottom level.
- k
- Array,DIMENSION(n) ifandicompq= 1DIMENSION(1) if.icompq= 0If, on exit,icompq= 1k(i) is the dimension of thei-th secular equation on the computation tree.
- difl
- REALforslasdaDOUBLE PRECISIONfordlasda.Array,DIMENSION(ldu,nlvl),where.nlvl= floor(log2(n/smlsiz))
- difr
- Array,DIMENSION(ldu, 2nlvl) ifandicompq= 1DIMENSION(n) if.icompq= 0If, on exit,icompq= 1difl(1:n,i) anddifr(1:n,2i-1) record distances between singular values on thei-th level and singular values on the (i-1)-th level, anddifr(1:n, 2i ) contains the normalizing factors for the right singular vector matrix. See?lasd8for details.
- z
- Array,DIMENSION(ldu,nlvl) ifandicompq= 1DIMENSION(n) if. The firsticompq= 0kelements ofz(1,i) contain the components of the deflation-adjusted updating row vector for subproblems on thei-th level.
- poles
- Array,DIMENSION(ldu, 2*nlvl)if, and not referenced ificompq= 1. Ificompq= 0, on exit,icompq= 1poles(1, 2i- 1) andpoles(1, 2i) contain the new and old singular values involved in the secular equations on thei-th level.
- givptr
- Array,DIMENSION(n) if, and not referenced ificompq= 1. Ificompq= 0, on exit,icompq= 1givptr(i) records the number of Givens rotations performed on thei-th problem on the computation tree.
- givcol
- Array,DIMENSION(ifldgcol, 2*nlvl), and not referenced ificompq= 1. Ificompq= 0, on exit, for eachicompq= 1i,givcol(1, 2i- 1) andgivcol(1, 2i) record the locations of Givens rotations performed on thei-th level on the computation tree.
- perm
- Array,DIMENSION(ldgcol,nlvl) if, and not referenced ificompq= 1. Ificompq= 0, on exit,icompq= 1perm(1,i) records permutations done on thei-th level of the computation tree.
- givnum
- ArrayDIMENSION(ldu, 2*nlvl) if, and not referenced ificompq= 1. Ificompq= 0, on exit, for eachicompq= 1i,givnum(1, 2i- 1) andgivnum(1, 2i) record theC- andS-values of Givens rotations performed on thei-th level on the computation tree.
- c
- Array,DIMENSION(n) if, andicompq= 1DIMENSION(1) if.icompq= 0Ifand theicompq= 1i-th subproblem is not square, on exit,c(i) contains theC-value of a Givens rotation related to the right null space of thei-th subproblem.
- s
- Array,DIMENSION(n), andicompq= 1DIMENSION(1) if.icompq= 0Ifand theicompq= 1i-th subproblem is not square, on exit,s(i) contains theS-value of a Givens rotation related to the right null space of thei-th subproblem.
- info
- = 0: successful exit.< 0: ifinfo= -i, thei-th argument had an illegal value> 0: If, an singular value did not convergeinfo= 1