?bdsvdx
?bdsvdx
Computes the SVD of a bidiagonal matrix.
Syntax
lapack_int
LAPACKE_sbdsvdx
(
int
matrix_layout
,
char
uplo
,
char
jobz
,
char
range
,
lapack_int
n
,
float
*
d
,
float
*
e
,
float
vl
,
float
vu
,
lapack_int
il
,
lapack_int
iu
,
lapack_int
*
ns
,
float
*
s
,
float
*
z
,
lapack_int
ldz
,
lapack_int
*
superb
);
lapack_int
LAPACKE_dbdsvdx
(
int
matrix_layout
,
char
uplo
,
char
jobz
,
char
range
,
lapack_int
n
,
double
*
d
,
double
*
e
,
double
vl
,
double
vu
,
lapack_int
il
,
lapack_int
iu
,
lapack_int
*
ns
,
double
*
s
,
double
*
z
,
lapack_int
ldz
,
lapack_int
*
superb
);
Include Files
- mkl.h
Description
?bdsvdx
computes the singular value decomposition (SVD) of a real n
-by-n
(upper or lower) bidiagonal matrix B
, B
= U
* S
* VT
, where S
is a diagonal matrix with non-negative diagonal elements (the singular values of B
), and U
and VT
are orthogonal matrices of left and right singular vectors, respectively. Given an upper bidiagonal ] and superdiagonal ],
B
with diagonal d
= [d
1
d
2
... d
n
e
= [e
1
e
2
... e
n
- 1?bdsvdx
computes the singular value decompositon of B
through the eigenvalues and eigenvectors of the n
*2-by-n
*2 tridiagonal matrix
If (
, and
.
s
,u
,v
) is a singular triplet of B
with ||u
|| = ||v
|| = 1, then (±
s
,q
), ||q
|| = 1, are eigenpairs of TGK, with 

Given a TGK matrix, one can either
- compute -s, -vand change signs so that the singular values (and corresponding vectors) are already in descending order (as in?gesvd/?gesdd) or
- computes,vand reorder the values (and corresponding vectors).
?bdsvdx
implements (1) by calling ?stevx
(bisection plus inverse iteration, to be replaced with a version of the Multiple Relative Robust Representation algorithm. (See P. Willems and B. Lang, A framework for the MR^3 algorithm: theory and implementation, SIAM J. Sci. Comput., 35:740-766, 2013.)Input Parameters
- matrix_layout
- Specifies whether matrix storage layout is row major (LAPACK_ROW_MAJOR) or column major (LAPACK_COL_MAJOR).
- uplo
- = 'U':Bis upper bidiagonal;= 'L': B is lower bidiagonal.
- jobz
- = 'N': Compute singular values only;= 'V': Compute singular values and singular vectors.
- range
- = 'A': Find all singular values.= 'V': all singular values in the half-open interval [vl,vu) are found.= 'I': theil-th throughiu-th singular values are found.
- n
- The order of the bidiagonal matrix.n>= 0.
- d
- Array, sizen.Thendiagonal elements of the bidiagonal matrixB.
- e
- Array, size (max(1,n- 1))The (n- 1) superdiagonal elements of the bidiagonal matrixBin elements 1 ton- 1.
- vl
- vl≥0.
- vu
- Ifrange='V', the lower and upper bounds of the interval to be searched for singular values.vu>vl.Not referenced ifrange= 'A' or 'I'.
- il,iu
- Ifrange='I', the indices (in ascending order) of the smallest and largest singular values to be returned.1≤il≤iu≤min(m,n), if min(m,n) > 0.Not referenced ifrange= 'A' or 'V'.
- ldz
- The leading dimension of the arrayz.ldz≥1, and ifjobz= 'V',ldz≥max(2,n*2).
Output Parameters
- ns
- The total number of singular values found. 0≤ns≤n.Ifrange= 'A',ns=n, and ifrange= 'I',ns=iu-il+ 1.
- s
- Array, size (n)The firstnselements contain the selected singular values in ascending order.
- z
- Array, size2*n*kIfjobz= 'V', then ifinfo= 0 the firstnscolumns ofzcontain the singular vectors of the matrixBcorresponding to the selected singular values, withUin rows 1 tonandVin rowsn+1 ton*2, i.e.z=Ifjobz= 'N', thenzis not referenced.Make sure that at leastk=ns+1 columns are supplied in the arrayz; ifrange= 'V', the exact value ofnsis not known in advance and an upper bound must be used.
- superb
- Array, size (12*n).Ifjobz= 'V', then ifinfo= 0, the firstnselements ofiworkare zero. Ifinfo> 0, theniworkcontains the indices of the eigenvectors that failed to converge in?stevx.
Return Values
This function returns a value
info
.= 0: successful exit.
< 0: if
info
= -i
, the i
-th argument had an illegal value. > 0:
if
info
= i
, then i
eigenvectors failed to converge in ?stevx
. The indices of the eigenvectors (as returned by ?stevx
) are stored in the array iwork
.if
info
= n
*2 + 1, an internal error occurred.