LAPACK++
2022.07.00
LAPACK C++ API
|
Functions | |
int64_t | lapack::gesdd (lapack::Job jobz, int64_t m, int64_t n, double *A, int64_t lda, double *S, double *U, int64_t ldu, double *VT, int64_t ldvt) |
int64_t | lapack::gesdd (lapack::Job jobz, int64_t m, int64_t n, float *A, int64_t lda, float *S, float *U, int64_t ldu, float *VT, int64_t ldvt) |
int64_t | lapack::gesdd (lapack::Job jobz, int64_t m, int64_t n, std::complex< double > *A, int64_t lda, double *S, std::complex< double > *U, int64_t ldu, std::complex< double > *VT, int64_t ldvt) |
Computes the singular value decomposition (SVD) of a m-by-n matrix A, optionally computing the left and/or right singular vectors, by using divide-and-conquer method. More... | |
int64_t | lapack::gesdd (lapack::Job jobz, int64_t m, int64_t n, std::complex< float > *A, int64_t lda, float *S, std::complex< float > *U, int64_t ldu, std::complex< float > *VT, int64_t ldvt) |
int64_t | lapack::gesvd (lapack::Job jobu, lapack::Job jobvt, int64_t m, int64_t n, double *A, int64_t lda, double *S, double *U, int64_t ldu, double *VT, int64_t ldvt) |
int64_t | lapack::gesvd (lapack::Job jobu, lapack::Job jobvt, int64_t m, int64_t n, float *A, int64_t lda, float *S, float *U, int64_t ldu, float *VT, int64_t ldvt) |
int64_t | lapack::gesvd (lapack::Job jobu, lapack::Job jobvt, int64_t m, int64_t n, std::complex< double > *A, int64_t lda, double *S, std::complex< double > *U, int64_t ldu, std::complex< double > *VT, int64_t ldvt) |
Computes the singular value decomposition (SVD) of a m-by-n matrix A, optionally computing the left and/or right singular vectors. More... | |
int64_t | lapack::gesvd (lapack::Job jobu, lapack::Job jobvt, int64_t m, int64_t n, std::complex< float > *A, int64_t lda, float *S, std::complex< float > *U, int64_t ldu, std::complex< float > *VT, int64_t ldvt) |
int64_t | lapack::gesvdx (lapack::Job jobu, lapack::Job jobvt, lapack::Range range, int64_t m, int64_t n, double *A, int64_t lda, double vl, double vu, int64_t il, int64_t iu, int64_t *ns, double *S, double *U, int64_t ldu, double *VT, int64_t ldvt) |
int64_t | lapack::gesvdx (lapack::Job jobu, lapack::Job jobvt, lapack::Range range, int64_t m, int64_t n, float *A, int64_t lda, float vl, float vu, int64_t il, int64_t iu, int64_t *ns, float *S, float *U, int64_t ldu, float *VT, int64_t ldvt) |
int64_t | lapack::gesvdx (lapack::Job jobu, lapack::Job jobvt, lapack::Range range, int64_t m, int64_t n, std::complex< double > *A, int64_t lda, double vl, double vu, int64_t il, int64_t iu, int64_t *nfound, double *S, std::complex< double > *U, int64_t ldu, std::complex< double > *VT, int64_t ldvt) |
Computes the singular value decomposition (SVD) of a m-by-n matrix A, optionally computing the left and/or right singular vectors. More... | |
int64_t | lapack::gesvdx (lapack::Job jobu, lapack::Job jobvt, lapack::Range range, int64_t m, int64_t n, std::complex< float > *A, int64_t lda, float vl, float vu, int64_t il, int64_t iu, int64_t *ns, float *S, std::complex< float > *U, int64_t ldu, std::complex< float > *VT, int64_t ldvt) |
int64_t lapack::gesdd | ( | lapack::Job | jobz, |
int64_t | m, | ||
int64_t | n, | ||
std::complex< double > * | A, | ||
int64_t | lda, | ||
double * | S, | ||
std::complex< double > * | U, | ||
int64_t | ldu, | ||
std::complex< double > * | VT, | ||
int64_t | ldvt | ||
) |
Computes the singular value decomposition (SVD) of a m-by-n matrix A, optionally computing the left and/or right singular vectors, by using divide-and-conquer method.
The SVD is written
\[ A = U \Sigma V^H \]
where \(\Sigma\) is an m-by-n matrix which is zero except for its min(m,n) diagonal elements, U is an m-by-m unitary matrix, and V is an n-by-n unitary matrix. The diagonal elements of \(\Sigma\) are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
Note that the routine returns VT \(= V^H\), not V.
The divide and conquer algorithm makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on those binary machines without guard digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could conceivably fail on hexadecimal or decimal machines without guard digits, but we know of none.
Overloaded versions are available for float
, double
, std::complex<float>
, and std::complex<double>
.
[in] | jobz | Specifies options for computing all or part of the matrix U:
|
[in] | m | The number of rows of the input matrix A. m >= 0. |
[in] | n | The number of columns of the input matrix A. n >= 0. |
[in,out] | A | The m-by-n matrix A, stored in an lda-by-n array. On entry, the m-by-n matrix A. On exit:
|
[in] | lda | The leading dimension of the array A. lda >= max(1,m). |
[out] | S | The vector S of length min(m,n). The singular values of A, sorted so that S(i) >= S(i+1). |
[out] | U | The m-by-ucol matrix U, stored in an ldu-by-ucol array.
|
[in] | ldu | The leading dimension of the array U. ldu >= 1; if jobz = SomeVec or AllVec or (jobz = OverwriteVec and m < n), ldu >= m. |
[out] | VT | The vrow-by-n matrix VT, stored in an ldvt-by-n array.
|
[in] | ldvt | The leading dimension of the array VT. ldvt >= 1;
|
lapack::bdsdc
did not converge. int64_t lapack::gesvd | ( | lapack::Job | jobu, |
lapack::Job | jobvt, | ||
int64_t | m, | ||
int64_t | n, | ||
std::complex< double > * | A, | ||
int64_t | lda, | ||
double * | S, | ||
std::complex< double > * | U, | ||
int64_t | ldu, | ||
std::complex< double > * | VT, | ||
int64_t | ldvt | ||
) |
Computes the singular value decomposition (SVD) of a m-by-n matrix A, optionally computing the left and/or right singular vectors.
The SVD is written
\[ A = U \Sigma V^H \]
where \(\Sigma\) is an m-by-n matrix which is zero except for its min(m,n) diagonal elements, U is an m-by-m unitary matrix, and V is an n-by-n unitary matrix. The diagonal elements of \(\Sigma\) are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
Note that the routine returns VT \(= V^H\), not V.
Overloaded versions are available for float
, double
, std::complex<float>
, and std::complex<double>
.
[in] | jobu | Specifies options for computing all or part of the matrix U:
|
[in] | jobvt | Specifies options for computing all or part of the matrix \(V^H\):
|
[in] | m | The number of rows of the input matrix A. m >= 0. |
[in] | n | The number of columns of the input matrix A. n >= 0. |
[in,out] | A | The m-by-n matrix A, stored in an lda-by-n array. On entry, the m-by-n matrix A. On exit:
|
[in] | lda | The leading dimension of the array A. lda >= max(1,m). |
[out] | S | The vector S of length min(m,n). The singular values of A, sorted so that S(i) >= S(i+1). |
[out] | U | The m-by-ucol matrix U, stored in an ldu-by-ucol array.
|
[in] | ldu | The leading dimension of the array U. ldu >= 1; if jobu = SomeVec or AllVec, ldu >= m. |
[out] | VT | The vrow-by-n matrix VT, stored in an ldvt-by-n array.
|
[in] | ldvt | The leading dimension of the array VT. ldvt >= 1;
|
lapack::bdsqr
did not converge; return value specifies how many superdiagonals of the intermediate bidiagonal form B did not converge to zero. int64_t lapack::gesvdx | ( | lapack::Job | jobu, |
lapack::Job | jobvt, | ||
lapack::Range | range, | ||
int64_t | m, | ||
int64_t | n, | ||
std::complex< double > * | A, | ||
int64_t | lda, | ||
double | vl, | ||
double | vu, | ||
int64_t | il, | ||
int64_t | iu, | ||
int64_t * | nfound, | ||
double * | S, | ||
std::complex< double > * | U, | ||
int64_t | ldu, | ||
std::complex< double > * | VT, | ||
int64_t | ldvt | ||
) |
Computes the singular value decomposition (SVD) of a m-by-n matrix A, optionally computing the left and/or right singular vectors.
The SVD is written
\[ A = U \Sigma V^H, \]
where \(\Sigma\) is an m-by-n matrix which is zero except for its min(m,n) diagonal elements, U is an m-by-m unitary matrix, and V is an n-by-n unitary matrix. The diagonal elements of SIGMA are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A.
gesvdx
uses an eigenvalue problem for obtaining the SVD, which allows for the computation of a subset of singular values and vectors. See lapack::bdsvdx
for details.
Note that the routine returns VT = \(V^H\), not V.
Overloaded versions are available for float
, double
, std::complex<float>
, and std::complex<double>
.
[in] | jobu | Specifies options for computing all or part of the matrix U:
|
[in] | jobvt | Specifies options for computing all or part of the matrix \(V^H\):
|
[in] | range |
|
[in] | m | The number of rows of the input matrix A. m >= 0. |
[in] | n | The number of columns of the input matrix A. n >= 0. |
[in,out] | A | The m-by-n matrix A, stored in an lda-by-n array. On entry, the m-by-n matrix A. On exit, the contents of A are destroyed. |
[in] | lda | The leading dimension of the array A. lda >= max(1,m). |
[in] | vl | If range=Value, the lower bound of the interval to be searched for singular values. vu > vl. Not referenced if range = All or Index. |
[in] | vu | If range=Value, the upper bound of the interval to be searched for singular values. vu > vl. Not referenced if range = All or Index. |
[in] | il | If range=Index, the index of the smallest singular value to be returned. 1 <= il <= iu <= min(m,n), if min(m,n) > 0. Not referenced if range = All or Value. |
[in] | iu | If range=Index, the index of the largest singular value to be returned. 1 <= il <= iu <= min(m,n), if min(m,n) > 0. Not referenced if range = All or Value. |
[out] | nfound | The total number of singular values found, 0 <= nfound <= min(m,n).
|
[out] | S | The vector S of length min(m,n). The singular values of A, sorted so that S(i) >= S(i+1). |
[out] | U | The m-by-nfound matrix U, stored in an ldu-by-ucol array.
|
[in] | ldu | The leading dimension of the array U. ldu >= 1; if jobu = Vec, ldu >= m. |
[out] | VT | The nfound-by-n matrix VT, stored in an ldvt-by-n array.
|
[in] | ldvt | The leading dimension of the array VT. ldvt >= 1; if jobvt = Vec, ldvt >= nfound. |
lapack::bdsvdx
/lapack::stevx
. lapack::bdsvdx