Go to the source code of this file.
Complex-valued matrices | |
void | LaSVD_IP (LaGenMatComplex &A, LaVectorDouble &Sigma, LaGenMatComplex &U, LaGenMatComplex &VT) |
void | LaSVD_IP (LaGenMatComplex &A, LaVectorDouble &Sigma) |
Real-valued matrices | |
void | LaSVD_IP (LaGenMatDouble &A, LaVectorDouble &Sigma, LaGenMatDouble &U, LaGenMatDouble &VT) |
void | LaSVD_IP (LaGenMatDouble &A, LaVectorDouble &Sigma) |
void LaSVD_IP | ( | LaGenMatComplex & | A, | |
LaVectorDouble & | Sigma, | |||
LaGenMatComplex & | U, | |||
LaGenMatComplex & | VT | |||
) |
Compute the Singular Value Decomposition.
Compute the singular value decomposition (SVD) of a complex M-by-N matrix A, also computing the left and right singular vectors, by using a divide-and-conquer method.
In lapack this is zgesdd. zgesdd computes the singular value decomposition (SVD) of a complex M-by-N matrix A, optionally computing the left and/or right singular vectors, by using divide-and-conquer method. The SVD is written
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 (conjugate-transpose), not V.
A | The M-by-N input matrix to be decomposed. It will be destroyed during the computation. | |
Sigma | A real-valued vector of length min(M,N) that will return the singular values. WATCH OUT: The length has to be exactly min(M,N) or else an exception will be thrown. | |
U | The M-by-M matrix of the left singular vectors. | |
VT | The N-by-N matrix of the right singular vectors. |
void LaSVD_IP | ( | LaGenMatComplex & | A, | |
LaVectorDouble & | Sigma | |||
) |
Compute the Singular Values.
Compute the singular values of a singular value decomposition (SVD) of a complex M-by-N matrix A.
In lapack this is zgesdd. zgesdd computes the singular value decomposition (SVD) of a complex M-by-N matrix A, optionally computing the left and/or right singular vectors, by using divide-and-conquer method. The SVD is written
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.
A | The M-by-N input matrix to be decomposed. It will be destroyed during the computation. | |
Sigma | A real-valued vector of length min(M,N) that will return the singular values. WATCH OUT: The length has to be exactly min(M,N) or else an exception will be thrown. |
void LaSVD_IP | ( | LaGenMatDouble & | A, | |
LaVectorDouble & | Sigma, | |||
LaGenMatDouble & | U, | |||
LaGenMatDouble & | VT | |||
) |
Compute the Singular Value Decomposition.
Compute the singular value decomposition (SVD) of a complex M-by-N matrix A, also computing the left and right singular vectors, by using a divide-and-conquer method.
In lapack this is dgesdd. dgesdd computes the singular value decomposition (SVD) of a real M-by-N matrix A, optionally computing the left and/or right singular vectors, by using divide-and-conquer method. The SVD is written
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 orthogonal matrix, and V is an N-by-N orthogonal 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**T (transposed), not V.
Now watch out: This routine has several modes of operation, depending on the size of the input matrices U
and VT
. This is:
U
is M-by-M and VT
is N-by-N (the normal mode), then all left and right singular vectors are calculated and are returned in U
and VT
.
U
is M-by-min(M,N) and VT
is min(M,N)-by-N, then the first min(M,N) left and right singular vectors are calculated, respectively, and are returned in U
and VT
. FIXME: needs verification.
U
is of size 0, and VT
is N-by-N, then the first N left singular vectors are calculated and returned in the first columns of A
, and all right singular vectors are calculated and returned in VT
. In this mode, U
is unused. FIXME: needs verification.
U
is M-by-M, and VT
is of size 0, then all left singular vectors are calculated and returned in U
, and the first M right singular vectors are calculated and returned in the first M rows of A
. In this mode, VT
is unused. FIXME: needs verification.In any other combination of matrix sizes, an exception is thrown.
A | The M-by-N input matrix to be decomposed. It will be destroyed during the computation. | |
Sigma | A real-valued vector of length min(M,N) that will return the singular values. WATCH OUT: The length has to be exactly min(M,N) or else an exception will be thrown. | |
U | In the normal mode of calculation, the M-by-M matrix of the left singular vectors. In other modes this might be unused. | |
VT | In the normal mode of calculation, the N-by-N matrix of the right singular vectors. In other modes this might be unused. |
void LaSVD_IP | ( | LaGenMatDouble & | A, | |
LaVectorDouble & | Sigma | |||
) |
Compute the Singular Values.
Compute the singular values of a singular value decomposition (SVD) of a complex M-by-N matrix A.
In lapack this is dgesdd. dgesdd computes the singular value decomposition (SVD) of a real M-by-N matrix A, optionally computing the left and/or right singular vectors, by using divide-and-conquer method. The SVD is written
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 orthogonal matrix, and V is an N-by-N orthogonal matrix. The diagonal elements of SIGMA are the singular values of A; they are real and non- negative, and are returned in descending order.
A | The M-by-N input matrix to be decomposed. It will be destroyed during the computation. | |
Sigma | A real-valued vector of length min(M,N) that will return the singular values. WATCH OUT: The length has to be exactly min(M,N) or else an exception will be thrown. |