bdsdc#
Functions
-
void sbdsdc(const char *uplo, const char *compq, const INT n, f32 *restrict D, f32 *restrict E, f32 *restrict U, const INT ldu, f32 *restrict VT, const INT ldvt, f32 *restrict Q, INT *restrict IQ, f32 *restrict work, INT *restrict IWORK, INT *info)#
SBDSDC computes the singular value decomposition (SVD) of a real N-by-N (upper or lower) bidiagonal matrix B: B = U * S * VT, using a divide and conquer method, 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.
SBDSDC can be used to compute all singular values, and optionally, singular vectors or singular vectors in compact form.
The code currently calls SLASDQ if singular values only are desired. However, it can be slightly modified to compute singular values using the divide and conquer method.
Parameters
inuplo= ‘U’: B is upper bidiagonal. = ‘L’: B is lower bidiagonal.
incompqSpecifies whether singular vectors are to be computed as follows: = ‘N’: Compute singular values only; = ‘P’: Compute singular values and compute singular vectors in compact form; = ‘I’: Compute singular values and singular vectors.
innThe order of the matrix B. n >= 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.
inoutEDouble precision array, dimension (n-1). On entry, the elements of E contain the offdiagonal elements of the bidiagonal matrix whose SVD is desired. On exit, E has been destroyed.
outUDouble precision array, dimension (ldu, n). If compq = ‘I’, then: On exit, if info = 0, U contains the left singular vectors of the bidiagonal matrix. For other values of compq, U is not referenced.
inlduThe leading dimension of the array U. ldu >= 1. If singular vectors are desired, then ldu >= max(1, n).
outVTDouble precision array, dimension (ldvt, n). If compq = ‘I’, then: On exit, if info = 0, VT**T contains the right singular vectors of the bidiagonal matrix. For other values of compq, VT is not referenced.
inldvtThe leading dimension of the array VT. ldvt >= 1. If singular vectors are desired, then ldvt >= max(1, n).
outQDouble precision array, dimension (LDQ). If compq = ‘P’, then: On exit, if info = 0, Q and IQ contain the left and right singular vectors in a compact form, requiring O(N log N) space instead of 2*N**2. In particular, Q contains all the double precision data in LDQ >= N*(11 + 2*SMLSIZ + 8*INT(LOG_2(N/(SMLSIZ+1)))) words of memory, where SMLSIZ is returned by ILAENV and is equal to the maximum size of the subproblems at the bottom of the computation tree (usually about 25). For other values of compq, Q is not referenced.
outIQInteger array, dimension (LDIQ). If compq = ‘P’, then: On exit, if info = 0, Q and IQ contain the left and right singular vectors in a compact form, requiring O(N log N) space instead of 2*N**2. In particular, IQ contains all integer data in LDIQ >= N*(3 + 3*INT(LOG_2(N/(SMLSIZ+1)))) words of memory, where SMLSIZ is returned by ILAENV and is equal to the maximum size of the subproblems at the bottom of the computation tree (usually about 25). For other values of compq, IQ is not referenced.
outworkDouble precision array, dimension (max(1, lwork)). If compq = ‘N’ then lwork >= (4 * n). If compq = ‘P’ then lwork >= (6 * n). If compq = ‘I’ then lwork >= (3 * n**2 + 4 * n).
outIWORKInteger array, dimension (8*n).
outinfo= 0: successful exit.
< 0: if info = -i, the i-th argument had an illegal value.
> 0: The algorithm failed to compute a singular value. The update process of divide and conquer failed.
void sbdsdc(
const char* uplo,
const char* compq,
const INT n,
f32* restrict D,
f32* restrict E,
f32* restrict U,
const INT ldu,
f32* restrict VT,
const INT ldvt,
f32* restrict Q,
INT* restrict IQ,
f32* restrict work,
INT* restrict IWORK,
INT* info
);
Functions
-
void dbdsdc(const char *uplo, const char *compq, const INT n, f64 *restrict D, f64 *restrict E, f64 *restrict U, const INT ldu, f64 *restrict VT, const INT ldvt, f64 *restrict Q, INT *restrict IQ, f64 *restrict work, INT *restrict IWORK, INT *info)#
DBDSDC computes the singular value decomposition (SVD) of a real N-by-N (upper or lower) bidiagonal matrix B: B = U * S * VT, using a divide and conquer method, 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.
DBDSDC can be used to compute all singular values, and optionally, singular vectors or singular vectors in compact form.
The code currently calls DLASDQ if singular values only are desired. However, it can be slightly modified to compute singular values using the divide and conquer method.
Parameters
inuplo= ‘U’: B is upper bidiagonal. = ‘L’: B is lower bidiagonal.
incompqSpecifies whether singular vectors are to be computed as follows: = ‘N’: Compute singular values only; = ‘P’: Compute singular values and compute singular vectors in compact form; = ‘I’: Compute singular values and singular vectors.
innThe order of the matrix B. n >= 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.
inoutEDouble precision array, dimension (n-1). On entry, the elements of E contain the offdiagonal elements of the bidiagonal matrix whose SVD is desired. On exit, E has been destroyed.
outUDouble precision array, dimension (ldu, n). If compq = ‘I’, then: On exit, if info = 0, U contains the left singular vectors of the bidiagonal matrix. For other values of compq, U is not referenced.
inlduThe leading dimension of the array U. ldu >= 1. If singular vectors are desired, then ldu >= max(1, n).
outVTDouble precision array, dimension (ldvt, n). If compq = ‘I’, then: On exit, if info = 0, VT**T contains the right singular vectors of the bidiagonal matrix. For other values of compq, VT is not referenced.
inldvtThe leading dimension of the array VT. ldvt >= 1. If singular vectors are desired, then ldvt >= max(1, n).
outQDouble precision array, dimension (LDQ). If compq = ‘P’, then: On exit, if info = 0, Q and IQ contain the left and right singular vectors in a compact form, requiring O(N log N) space instead of 2*N**2. In particular, Q contains all the double precision data in LDQ >= N*(11 + 2*SMLSIZ + 8*INT(LOG_2(N/(SMLSIZ+1)))) words of memory, where SMLSIZ is returned by ILAENV and is equal to the maximum size of the subproblems at the bottom of the computation tree (usually about 25). For other values of compq, Q is not referenced.
outIQInteger array, dimension (LDIQ). If compq = ‘P’, then: On exit, if info = 0, Q and IQ contain the left and right singular vectors in a compact form, requiring O(N log N) space instead of 2*N**2. In particular, IQ contains all integer data in LDIQ >= N*(3 + 3*INT(LOG_2(N/(SMLSIZ+1)))) words of memory, where SMLSIZ is returned by ILAENV and is equal to the maximum size of the subproblems at the bottom of the computation tree (usually about 25). For other values of compq, IQ is not referenced.
outworkDouble precision array, dimension (max(1, lwork)). If compq = ‘N’ then lwork >= (4 * n). If compq = ‘P’ then lwork >= (6 * n). If compq = ‘I’ then lwork >= (3 * n**2 + 4 * n).
outIWORKInteger array, dimension (8*n).
outinfo= 0: successful exit.
< 0: if info = -i, the i-th argument had an illegal value.
> 0: The algorithm failed to compute a singular value. The update process of divide and conquer failed.
void dbdsdc(
const char* uplo,
const char* compq,
const INT n,
f64* restrict D,
f64* restrict E,
f64* restrict U,
const INT ldu,
f64* restrict VT,
const INT ldvt,
f64* restrict Q,
INT* restrict IQ,
f64* restrict work,
INT* restrict IWORK,
INT* info
);