(S|D|C|Z)GESDD¶
Single, double, single complex, and double complex GESDD.
Description¶
Computes the singular value decomposition (SVD) of a general matrix, and optionally the right/left singular vectors.
The matrix A is decomposed:

The matrix
is an MxN matrix that is zero except on
the diagonal. U is an MxM unitary matrix, and V is an NxN unitary
matrix. The diagonal elements of
are the singular
values, ordered from largest to smallest in magnitude.
Uses the divide-and-conquer algorithm.
LAPACK Interface¶
void sgesdd(const char *JOBZ, const qml_long *M, const qml_long *N, float *A,
const qml_long *LDA, float *S, float *U, const qml_long *LDU,
float *VT, const qml_long *LDVT, float *WORK, const qml_long *LWORK,
qml_long *IWORK, qml_long *INFO);
void dgesdd(const char *JOBZ, const qml_long *M, const qml_long *N, double *A,
const qml_long *LDA, double *S, double *U, const qml_long *LDU,
double *VT, const qml_long *LDVT, double *WORK, const qml_long *LWORK,
qml_long *IWORK, qml_long *INFO);
void cgesdd(const char *JOBZ, const qml_long *M, const qml_long *N,
qml_single_complex *A, const qml_long *LDA, float *S,
qml_single_complex *U, const qml_long *LDU, qml_single_complex *VT,
const qml_long *LDVT, qml_single_complex *WORK, const qml_long *LWORK,
float *RWORK, qml_long *IWORK, qml_long *INFO);
void zgesdd(const char *JOBZ, const qml_long *M, const qml_long *N,
qml_double_complex *A, const qml_long *LDA, double *S,
qml_double_complex *U, const qml_long *LDU, qml_double_complex *VT,
const qml_long *LDVT, qml_double_complex *WORK, const qml_long *LWORK,
double *RWORK, qml_long *IWORK, qml_long *INFO);
Arguments¶
| JOBU | What to compute for U and VT, ‘A’ (all), ‘S’ (singular vectors), ‘O’ (overwrite A), ‘N’ (none) |
| M | Number of rows of A |
| N | Number of columns of A |
| A | Matrix of size M x N, overwritten on exit |
| LDA | Leading dimension of A |
| S | Array of size min(M, N), singular values in decreasing order |
| U | Matrix containing left singular vectors as columns |
| LDU | Leading dimension of U |
| VT | Matrix containing right singular vectors as rows |
| LDVT | Leading dimension of VT |
| WORK | Workspace of size at least LWORK |
| LWORK | Size of workspace (-1 to query) |
| IWORK | Integer workspace of size 8*min(M, N) |
| INFO | 0 on success, <0 for bad arguments, >0 if no convergence |