|
◆ WZggsvd32()
Function WZggsvd32 |
( |
Jobu As |
String, |
|
|
Jobv As |
String, |
|
|
Jobq As |
String, |
|
|
M As |
Long, |
|
|
N As |
Long, |
|
|
P As |
Long, |
|
|
A As |
Variant, |
|
|
B As |
Variant |
|
) |
| |
Generalized singular value decomposition (GSVD) of complex matrices (complex numbers in pairs of cells)
- Purpose
- WZggsvd3 computes the generalized singular value decomposition (GSVD) of an M x N complex matrix A and P x N complex matrix B:
U^H*A*Q = D1*(0 R), V^H*B*Q = D2*(0 R)
where, U, V and Q are unitary matrices.
Let K+L = the effective numerical rank of the matrix (A^H, B^H)^H, then R is a K+L x K+L nonsingular upper triangular matrix, D1 and D2 are M x K+L and P x K+L "diagonal" matrices and of the following structures, respectively:
If M-K-L >= 0, K L
D1 = K (I 0)
L (0 C)
M-K-L (0 0)
K L
D2 = L (0 S)
P-L (0 0)
N-K-L K L
(0 R) = K ( 0 R11 R12)
L ( 0 0 R22)
where
C = diag(Alpha(K), ... , Alpha(K+L-1)),
S = diag(Beta(K)), ... , Beta(K+L-1)),
C^2 + S^2 = I.
R is stored in A(0 to K+L-1, N-K-L to N-1) on exit.
If M-K-L < 0, K M-K K+L-M
D1 = K (I 0 0)
M-K (0 C 0)
K M-K K+L-M
D2 = M-K (0 S 0)
K+L-M (0 0 I)
P-L (0 0 0)
N-K-L K M-K K+L-M
(0 R) = K ( 0 R11 R12 R13)
M-K ( 0 0 R22 R23)
K+L-M ( 0 0 0 R33)
where
C = diag(Alpha(K), ... , Alpha(M-1)),
S = diag(Beta(K), ... , Beta(M-1)),
C^2 + S^2 = I.
(R11 R12 R13) is stored in A(0 to M-1, N-K-L to N-1), and R33 is stored
( 0 R22 R23)
in B(M-K to L-1, N+M-K-L to N-1) on exit.
The routine computes C, S, R, and optionally the unitary transformation matrices U, V and Q.
Alpha() and Beta() contain the generalized singular value pairs of A and B.
Alpha(0 to K-1) = 1,
Beta(0 to K-1) = 0,
and if M-K-L >= 0,
Alpha(K to K+L-1) = C,
Beta(K to K+L-1) = S,
or if M-K-L < 0,
Alpha(K to M-1)= C, Alpha(M to K+L-1) = 0,
Beta(K to M-1) = S, Beta(M to K+L-1) = 1,
and
Alpha(K+L to N-1) = 0,
Beta(K+L to N-1) = 0.
In particular, if B is an N x N nonsingular matrix, then the GSVD of A and B implicitly gives the SVD of A*inv(B). A*inv(B) = U*(D1*inv(D2))*V^H
If (A^H, B^H)^H has orthonormal columns, then the GSVD of A and B is also equal to the CS decomposition of A and B. Furthermore, the GSVD can be used to derive the solution of the eigenvalue problem: In some literature, the GSVD of A and B is presented in the form U^H*A*X = (0 D1), V^H*B*X = (0 D2)
where U and V are unitary and X is nonsingular, D1 and D2 are "diagonal". The former GSVD form can be converted to the latter form by taking the nonsingular matrix X as
To represent complex numbers, a real part and an imaginary part are stored in a pair of adjacent cells (a real part in a left cell, and an imaginary part in a right cell). The computed results are stored in the same way.
- Returns
- N+1×2(K+L)+2 (Jobu = "N", Jobv = "N", Jobq = "N")
| Column 1 | Column 2 | Columns 3 to 2(K+L)+2 |
Rows 1 to N | Alpha(j) (j = 1 to N) | Beta(j) (j = 1 to N) | K+L x K+L upper triangular matrix R |
Row N+1 | Return code | Dimension of the subblocks K | Dimension of the subblocks L (Column 3) |
max(M,N)+1×2(K+L)+2M+2 (Jobu = "U", Jobv = "N", Jobq = "N")
| Column 1 | Column 2 | Columns 3 to 2(K+L)+2 | Columns 2(K+L)+3 to 2(K+L)+2M+2 |
Rows 1 to max(M, N) | Alpha(j) (j = 1 to N) | Beta(j) (j = 1 to N) | K+L x K+L upper triangular matrix R | M x M unitary matrix U |
Row max(M, N) + 1 | Return code | Dimension of the subblocks K | Dimension of the subblocks L (Column 3) | 0 |
max(N,P)+1×2(K+L)+2P+2 (Jobu = "N", Jobv = "V", Jobq = "N")
| Column 1 | Column 2 | Columns 3 to 2(K+L)+2 | Columns 2(K+L)+3 to 2(K+L)+2P+2 |
Rows 1 to max(N, P) | Alpha(j) (j = 1 to N) | Beta(j) (j = 1 to N) | K+L x K+L upper triangular matrix R | P x P unitary matrix V |
Row max(N, P) + 1 | Return code | Dimension of the subblocks K | Dimension of the subblocks L (Column 3) | 0 |
N+1×2(K+L)+2N+2 (Jobu = "N", Jobv = "N", Jobq = "Q")
| Column 1 | Column 2 | Columns 3 to 2(K+L)+2 | Columns 2(K+L)+3 to 2(K+L)+2N+2 |
Rows 1 to N | Alpha(j) (j = 1 to N) | Beta(j) (j = 1 to N) | K+L x K+L upper triangular matrix R | N x N unitary matrix Q |
Row N+1 | Return code | Dimension of the subblocks K | Dimension of the subblocks L (Column 3) | 0 |
max(M,N,P)+1×2(K+L)+2M+2P+2 (Jobu = "U", Jobv = "V", Jobq = "N")
| Column 1 | Column 2 | Columns 3 to 2(K+L)+2 | Columns 2(K+L)+3 to 2(K+L)+2M+2 | Columns 2(K+L)+2M+3 to 2(K+L)+2M+2P+2 |
Rows 1 to max(M, N, P) | Alpha(j) (j = 1 to N) | Beta(j) (j = 1 to N) | K+L x K+L upper triangular matrix R | M x M unitary matrix U | P x P unitary matrix V |
Row max(M, N, P) + 1 | Return code | Dimension of the subblocks K | Dimension of the subblocks L (Column 3) | 0 | 0 |
max(M,N)+1×2(K+L)+2M+2N+2 (Jobu = "U", Jobv = "N", Jobq = "Q")
| Column 1 | Column 2 | Columns 3 to 2(K+L)+2 | Columns 2(K+L)+3 to 2(K+L)+2M+2 | Columns 2(K+L)+2M+3 to 2(K+L)+2M+2N+2 |
Rows 1 to max(M, N) | Alpha(j) (j = 1 to N) | Beta(j) (j = 1 to N) | K+L x K+L upper triangular matrix R | M x M unitary matrix U | N x N unitary matrix Q |
Row max(M, N) + 1 | Return code | Dimension of the subblocks K | Dimension of the subblocks L (Column 3) | 0 | 0 |
max(N,P)+1×2(K+L)+2N+2P+2 (Jobu = "N", Jobv = "V", Jobq = "N")
| Column 1 | Column 2 | Columns 3 to 2(K+L)+2 | Columns 2(K+L)+3 to 2(K+L)+2P+2 | Columns 2(K+L)+2P+3 to 2(K+L)+2N+2P+2 |
Rows 1 to max(N, P) | Alpha(j) (j = 1 to N) | Beta(j) (j = 1 to N) | K+L x K+L upper triangular matrix R | P x P unitary matrix V | N x N unitary matrix Q |
Row max(N, P) + 1 | Return code | Dimension of the subblocks K | Dimension of the subblocks L (Column 3) | 0 | 0 |
max(M,N,P)+1×2(K+L)+2M+2N+2P+2 (Jobu = "U", Jobv = "V", Jobq = "Q")
| Column 1 | Column 2 | Columns 3 to 2(K+L)+2 | Columns 2(K+L)+3 to 2(K+L)+2M+2 | Columns 2(K+L)+2M+3 to 2(K+L)+2M+2P+2 | Columns 2(K+L)+2M+2P+3 to 2(K+L)+2M+2N+2P+2 |
Rows 1 to max(M, N, P) | Alpha(j) (j = 1 to N) | Beta(j) (j = 1 to N) | K+L x K+L upper triangular matrix R | M x M unitary matrix U | P x P unitary matrix V | N x N unitary matrix Q |
Row max(M, N, P) + 1 | Return code | Dimension of the subblocks K | Dimension of the subblocks L (Column 3) | 0 | 0 | 0 |
Return code.
= 0: Successful exit.
= 1: The Jacobi-type procedure failed to converge.
- Parameters
-
[in] | Jobu | = 'U': Unitary matrix U is computed.
= 'N': U is not computed. |
[in] | Jobv | = 'V': Unitary matrix V is computed.
= 'N': V is not computed. |
[in] | Jobq | = "Q": Unitary matrix Q is computed.
= 'N': Q is not computed. |
[in] | M | Number of rows of the matrix A. (M >= 1) |
[in] | N | Number of columns of the matrices A and B. (N >= 1) |
[in] | P | Number of rows of the matrix B. (P >= 1) |
[in] | A | (M x 2N) M x N complex matrix A. |
[in] | B | (P x 2N) P x N complex matrix B. |
- Reference
- LAPACK
- Example
- Compute generalized singular value decomposition (GSVD) of matrix A and B, where
( 0.20-0.11i -0.93-0.32i 0.81+0.37i )
A = ( -0.80-0.92i -0.29+0.86i 0.64+0.51i )
( 0.71+0.59i -0.15+0.19i 0.20+0.94i )
( 0.57-0.91i -0.28-0.45i 0.25+0.91i )
B = ( 0.83+0.46i 0.63-0.19i -0.69+0.09i )
( 0.24-1.33i -0.56-0.67i 0.90+1.25i )
|