bdsqr#
Functions
-
void sbdsqr(const char *uplo, const INT n, const INT ncvt, const INT nru, const INT ncc, f32 *restrict D, f32 *restrict E, f32 *restrict VT, const INT ldvt, f32 *restrict U, const INT ldu, f32 *restrict C, const INT ldc, f32 *restrict work, INT *info)#
SBDSQR computes the singular values and, optionally, the right and/or left singular vectors from the singular value decomposition (SVD) of a real N-by-N (upper or lower) bidiagonal matrix B using the implicit zero-shift QR algorithm.
The SVD of B has the form
B = Q * S * P**T
where S is the diagonal matrix of singular values, Q is an orthogonal matrix of left singular vectors, and P is an orthogonal matrix of right singular vectors. If left singular vectors are requested, this subroutine actually returns U*Q instead of Q, and, if right singular vectors are requested, this subroutine returns P**T*VT instead of P**T, for given real input matrices U and VT. When U and VT are the orthogonal matrices that reduce a general matrix A to bidiagonal form: A = U*B*VT, as computed by SGEBRD, then
A = (U*Q) * S * (P**T*VT)
is the SVD of A. Optionally, the subroutine may also compute Q**T*C for a given real input matrix C.
Parameters
inuplo= ‘U’: B is upper bidiagonal; = ‘L’: B is lower bidiagonal.
innThe order of the matrix B. n >= 0.
inncvtThe number of columns of the matrix VT. ncvt >= 0.
innruThe number of rows of the matrix U. nru >= 0.
innccThe number of columns of the matrix C. ncc >= 0.
inoutDDouble precision array, dimension (n). On entry, the n diagonal elements of the bidiagonal matrix B. On exit, if info=0, the singular values of B in decreasing order.
inoutEDouble precision array, dimension (n-1). On entry, the N-1 offdiagonal elements of the bidiagonal matrix B. On exit, if info = 0, E is destroyed; if info > 0, D and E will contain the diagonal and superdiagonal elements of a bidiagonal matrix orthogonally equivalent to the one given as input.
inoutVTDouble precision array, dimension (ldvt, ncvt). On entry, an N-by-NCVT matrix VT. On exit, VT is overwritten by P**T * VT. Not referenced if ncvt = 0.
inldvtThe leading dimension of the array VT. ldvt >= max(1,n) if ncvt > 0; ldvt >= 1 if ncvt = 0.
inoutUDouble precision array, dimension (ldu, n). On entry, an NRU-by-N matrix U. On exit, U is overwritten by U * Q. Not referenced if nru = 0.
inlduThe leading dimension of the array U. ldu >= max(1,nru).
inoutCDouble precision array, dimension (ldc, ncc). On entry, an N-by-NCC matrix C. On exit, C is overwritten by Q**T * C. Not referenced if ncc = 0.
inldcThe leading dimension of the array C. ldc >= max(1,n) if ncc > 0; ldc >=1 if ncc = 0.
outworkDouble precision array, dimension (lwork). lwork = 4*n if ncvt = nru = ncc = 0, lwork = 4*(n-1) otherwise.
outinfo= 0: successful exit
< 0: if info = -i, the i-th argument had an illegal value
> 0: the algorithm did not converge; D and E contain the elements of a bidiagonal matrix which is orthogonally similar to the input matrix B; if info = i, i elements of E have not converged to zero.
void sbdsqr(
const char* uplo,
const INT n,
const INT ncvt,
const INT nru,
const INT ncc,
f32* restrict D,
f32* restrict E,
f32* restrict VT,
const INT ldvt,
f32* restrict U,
const INT ldu,
f32* restrict C,
const INT ldc,
f32* restrict work,
INT* info
);
Functions
-
void dbdsqr(const char *uplo, const INT n, const INT ncvt, const INT nru, const INT ncc, f64 *restrict D, f64 *restrict E, f64 *restrict VT, const INT ldvt, f64 *restrict U, const INT ldu, f64 *restrict C, const INT ldc, f64 *restrict work, INT *info)#
DBDSQR computes the singular values and, optionally, the right and/or left singular vectors from the singular value decomposition (SVD) of a real N-by-N (upper or lower) bidiagonal matrix B using the implicit zero-shift QR algorithm.
The SVD of B has the form
B = Q * S * P**T
where S is the diagonal matrix of singular values, Q is an orthogonal matrix of left singular vectors, and P is an orthogonal matrix of right singular vectors. If left singular vectors are requested, this subroutine actually returns U*Q instead of Q, and, if right singular vectors are requested, this subroutine returns P**T*VT instead of P**T, for given real input matrices U and VT. When U and VT are the orthogonal matrices that reduce a general matrix A to bidiagonal form: A = U*B*VT, as computed by DGEBRD, then
A = (U*Q) * S * (P**T*VT)
is the SVD of A. Optionally, the subroutine may also compute Q**T*C for a given real input matrix C.
Parameters
inuplo= ‘U’: B is upper bidiagonal; = ‘L’: B is lower bidiagonal.
innThe order of the matrix B. n >= 0.
inncvtThe number of columns of the matrix VT. ncvt >= 0.
innruThe number of rows of the matrix U. nru >= 0.
innccThe number of columns of the matrix C. ncc >= 0.
inoutDDouble precision array, dimension (n). On entry, the n diagonal elements of the bidiagonal matrix B. On exit, if info=0, the singular values of B in decreasing order.
inoutEDouble precision array, dimension (n-1). On entry, the N-1 offdiagonal elements of the bidiagonal matrix B. On exit, if info = 0, E is destroyed; if info > 0, D and E will contain the diagonal and superdiagonal elements of a bidiagonal matrix orthogonally equivalent to the one given as input.
inoutVTDouble precision array, dimension (ldvt, ncvt). On entry, an N-by-NCVT matrix VT. On exit, VT is overwritten by P**T * VT. Not referenced if ncvt = 0.
inldvtThe leading dimension of the array VT. ldvt >= max(1,n) if ncvt > 0; ldvt >= 1 if ncvt = 0.
inoutUDouble precision array, dimension (ldu, n). On entry, an NRU-by-N matrix U. On exit, U is overwritten by U * Q. Not referenced if nru = 0.
inlduThe leading dimension of the array U. ldu >= max(1,nru).
inoutCDouble precision array, dimension (ldc, ncc). On entry, an N-by-NCC matrix C. On exit, C is overwritten by Q**T * C. Not referenced if ncc = 0.
inldcThe leading dimension of the array C. ldc >= max(1,n) if ncc > 0; ldc >=1 if ncc = 0.
outworkDouble precision array, dimension (lwork). lwork = 4*n if ncvt = nru = ncc = 0, lwork = 4*(n-1) otherwise.
outinfo= 0: successful exit
< 0: if info = -i, the i-th argument had an illegal value
> 0: the algorithm did not converge; D and E contain the elements of a bidiagonal matrix which is orthogonally similar to the input matrix B; if info = i, i elements of E have not converged to zero.
void dbdsqr(
const char* uplo,
const INT n,
const INT ncvt,
const INT nru,
const INT ncc,
f64* restrict D,
f64* restrict E,
f64* restrict VT,
const INT ldvt,
f64* restrict U,
const INT ldu,
f64* restrict C,
const INT ldc,
f64* restrict work,
INT* info
);
Functions
-
void cbdsqr(const char *uplo, const INT n, const INT ncvt, const INT nru, const INT ncc, f32 *restrict D, f32 *restrict E, c64 *restrict VT, const INT ldvt, c64 *restrict U, const INT ldu, c64 *restrict C, const INT ldc, f32 *restrict rwork, INT *info)#
CBDSQR computes the singular values and, optionally, the right and/or left singular vectors from the singular value decomposition (SVD) of a real N-by-N (upper or lower) bidiagonal matrix B using the implicit zero-shift QR algorithm.
The SVD of B has the form
B = Q * S * P**H
where S is the diagonal matrix of singular values, Q is an orthogonal matrix of left singular vectors, and P is an orthogonal matrix of right singular vectors. If left singular vectors are requested, this subroutine actually returns U*Q instead of Q, and, if right singular vectors are requested, this subroutine returns P**H*VT instead of P**H, for given complex input matrices U and VT. When U and VT are the unitary matrices that reduce a general matrix A to bidiagonal form: A = U*B*VT, as computed by CGEBRD, then
A = (U*Q) * S * (P**H*VT)
is the SVD of A. Optionally, the subroutine may also compute Q**H*C for a given complex input matrix C.
Parameters
inuplo= ‘U’: B is upper bidiagonal; = ‘L’: B is lower bidiagonal.
innThe order of the matrix B. n >= 0.
inncvtThe number of columns of the matrix VT. ncvt >= 0.
innruThe number of rows of the matrix U. nru >= 0.
innccThe number of columns of the matrix C. ncc >= 0.
inoutDSingle precision array, dimension (n). On entry, the n diagonal elements of the bidiagonal matrix B. On exit, if info=0, the singular values of B in decreasing order.
inoutESingle precision array, dimension (n-1). On entry, the N-1 offdiagonal elements of the bidiagonal matrix B. On exit, if info = 0, E is destroyed; if info > 0, D and E will contain the diagonal and superdiagonal elements of a bidiagonal matrix orthogonally equivalent to the one given as input.
inoutVTComplex*16 array, dimension (ldvt, ncvt). On entry, an N-by-NCVT matrix VT. On exit, VT is overwritten by P**H * VT. Not referenced if ncvt = 0.
inldvtThe leading dimension of the array VT. ldvt >= max(1,n) if ncvt > 0; ldvt >= 1 if ncvt = 0.
inoutUComplex*16 array, dimension (ldu, n). On entry, an NRU-by-N matrix U. On exit, U is overwritten by U * Q. Not referenced if nru = 0.
inlduThe leading dimension of the array U. ldu >= max(1,nru).
inoutCComplex*16 array, dimension (ldc, ncc). On entry, an N-by-NCC matrix C. On exit, C is overwritten by Q**H * C. Not referenced if ncc = 0.
inldcThe leading dimension of the array C. ldc >= max(1,n) if ncc > 0; ldc >=1 if ncc = 0.
outrworkSingle precision array, dimension (lrwork). lrwork = 4*n if ncvt = nru = ncc = 0, lrwork = 4*(n-1) otherwise.
outinfo= 0: successful exit
< 0: if info = -i, the i-th argument had an illegal value
> 0: the algorithm did not converge; D and E contain the elements of a bidiagonal matrix which is orthogonally similar to the input matrix B; if info = i, i elements of E have not converged to zero.
void cbdsqr(
const char* uplo,
const INT n,
const INT ncvt,
const INT nru,
const INT ncc,
f32* restrict D,
f32* restrict E,
c64* restrict VT,
const INT ldvt,
c64* restrict U,
const INT ldu,
c64* restrict C,
const INT ldc,
f32* restrict rwork,
INT* info
);
Functions
-
void zbdsqr(const char *uplo, const INT n, const INT ncvt, const INT nru, const INT ncc, f64 *restrict D, f64 *restrict E, c128 *restrict VT, const INT ldvt, c128 *restrict U, const INT ldu, c128 *restrict C, const INT ldc, f64 *restrict rwork, INT *info)#
ZBDSQR computes the singular values and, optionally, the right and/or left singular vectors from the singular value decomposition (SVD) of a real N-by-N (upper or lower) bidiagonal matrix B using the implicit zero-shift QR algorithm.
The SVD of B has the form
B = Q * S * P**H
where S is the diagonal matrix of singular values, Q is an orthogonal matrix of left singular vectors, and P is an orthogonal matrix of right singular vectors. If left singular vectors are requested, this subroutine actually returns U*Q instead of Q, and, if right singular vectors are requested, this subroutine returns P**H*VT instead of P**H, for given complex input matrices U and VT. When U and VT are the unitary matrices that reduce a general matrix A to bidiagonal form: A = U*B*VT, as computed by ZGEBRD, then
A = (U*Q) * S * (P**H*VT)
is the SVD of A. Optionally, the subroutine may also compute Q**H*C for a given complex input matrix C.
Parameters
inuplo= ‘U’: B is upper bidiagonal; = ‘L’: B is lower bidiagonal.
innThe order of the matrix B. n >= 0.
inncvtThe number of columns of the matrix VT. ncvt >= 0.
innruThe number of rows of the matrix U. nru >= 0.
innccThe number of columns of the matrix C. ncc >= 0.
inoutDDouble precision array, dimension (n). On entry, the n diagonal elements of the bidiagonal matrix B. On exit, if info=0, the singular values of B in decreasing order.
inoutEDouble precision array, dimension (n-1). On entry, the N-1 offdiagonal elements of the bidiagonal matrix B. On exit, if info = 0, E is destroyed; if info > 0, D and E will contain the diagonal and superdiagonal elements of a bidiagonal matrix orthogonally equivalent to the one given as input.
inoutVTComplex*16 array, dimension (ldvt, ncvt). On entry, an N-by-NCVT matrix VT. On exit, VT is overwritten by P**H * VT. Not referenced if ncvt = 0.
inldvtThe leading dimension of the array VT. ldvt >= max(1,n) if ncvt > 0; ldvt >= 1 if ncvt = 0.
inoutUComplex*16 array, dimension (ldu, n). On entry, an NRU-by-N matrix U. On exit, U is overwritten by U * Q. Not referenced if nru = 0.
inlduThe leading dimension of the array U. ldu >= max(1,nru).
inoutCComplex*16 array, dimension (ldc, ncc). On entry, an N-by-NCC matrix C. On exit, C is overwritten by Q**H * C. Not referenced if ncc = 0.
inldcThe leading dimension of the array C. ldc >= max(1,n) if ncc > 0; ldc >=1 if ncc = 0.
outrworkDouble precision array, dimension (lrwork). lrwork = 4*n if ncvt = nru = ncc = 0, lrwork = 4*(n-1) otherwise.
outinfo= 0: successful exit
< 0: if info = -i, the i-th argument had an illegal value
> 0: the algorithm did not converge; D and E contain the elements of a bidiagonal matrix which is orthogonally similar to the input matrix B; if info = i, i elements of E have not converged to zero.
void zbdsqr(
const char* uplo,
const INT n,
const INT ncvt,
const INT nru,
const INT ncc,
f64* restrict D,
f64* restrict E,
c128* restrict VT,
const INT ldvt,
c128* restrict U,
const INT ldu,
c128* restrict C,
const INT ldc,
f64* restrict rwork,
INT* info
);