version 1.7, 2010/12/21 13:53:45
|
version 1.8, 2011/07/22 07:38:14
|
Line 2
|
Line 2
|
$ TOLA, TOLB, K, L, U, LDU, V, LDV, Q, LDQ, |
$ TOLA, TOLB, K, L, U, LDU, V, LDV, Q, LDQ, |
$ IWORK, RWORK, TAU, WORK, INFO ) |
$ IWORK, RWORK, TAU, WORK, INFO ) |
* |
* |
* -- LAPACK routine (version 3.2) -- |
* -- LAPACK routine (version 3.3.1) -- |
* -- LAPACK is a software package provided by Univ. of Tennessee, -- |
* -- LAPACK is a software package provided by Univ. of Tennessee, -- |
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- |
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- |
* November 2006 |
* -- April 2011 -- |
* |
* |
* .. Scalar Arguments .. |
* .. Scalar Arguments .. |
CHARACTER JOBQ, JOBU, JOBV |
CHARACTER JOBQ, JOBU, JOBV |
Line 24
|
Line 24
|
* |
* |
* ZGGSVP computes unitary matrices U, V and Q such that |
* ZGGSVP computes unitary matrices U, V and Q such that |
* |
* |
* N-K-L K L |
* N-K-L K L |
* U'*A*Q = K ( 0 A12 A13 ) if M-K-L >= 0; |
* U**H*A*Q = K ( 0 A12 A13 ) if M-K-L >= 0; |
* L ( 0 0 A23 ) |
* L ( 0 0 A23 ) |
* M-K-L ( 0 0 0 ) |
* M-K-L ( 0 0 0 ) |
* |
* |
* N-K-L K L |
* N-K-L K L |
* = K ( 0 A12 A13 ) if M-K-L < 0; |
* = K ( 0 A12 A13 ) if M-K-L < 0; |
* M-K ( 0 0 A23 ) |
* M-K ( 0 0 A23 ) |
* |
* |
* N-K-L K L |
* N-K-L K L |
* V'*B*Q = L ( 0 0 B13 ) |
* V**H*B*Q = L ( 0 0 B13 ) |
* P-L ( 0 0 0 ) |
* P-L ( 0 0 0 ) |
* |
* |
* where the K-by-K matrix A12 and L-by-L matrix B13 are nonsingular |
* where the K-by-K matrix A12 and L-by-L matrix B13 are nonsingular |
* upper triangular; A23 is L-by-L upper triangular if M-K-L >= 0, |
* upper triangular; A23 is L-by-L upper triangular if M-K-L >= 0, |
* otherwise A23 is (M-K)-by-L upper trapezoidal. K+L = the effective |
* otherwise A23 is (M-K)-by-L upper trapezoidal. K+L = the effective |
* numerical rank of the (M+P)-by-N matrix (A',B')'. Z' denotes the |
* numerical rank of the (M+P)-by-N matrix (A**H,B**H)**H. |
* conjugate transpose of Z. |
|
* |
* |
* This decomposition is the preprocessing step for computing the |
* This decomposition is the preprocessing step for computing the |
* Generalized Singular Value Decomposition (GSVD), see subroutine |
* Generalized Singular Value Decomposition (GSVD), see subroutine |
Line 101
|
Line 100
|
* L (output) INTEGER |
* L (output) INTEGER |
* On exit, K and L specify the dimension of the subblocks |
* On exit, K and L specify the dimension of the subblocks |
* described in Purpose section. |
* described in Purpose section. |
* K + L = effective numerical rank of (A',B')'. |
* K + L = effective numerical rank of (A**H,B**H)**H. |
* |
* |
* U (output) COMPLEX*16 array, dimension (LDU,M) |
* U (output) COMPLEX*16 array, dimension (LDU,M) |
* If JOBU = 'U', U contains the unitary matrix U. |
* If JOBU = 'U', U contains the unitary matrix U. |
Line 268
|
Line 267
|
* |
* |
CALL ZGERQ2( L, N, B, LDB, TAU, WORK, INFO ) |
CALL ZGERQ2( L, N, B, LDB, TAU, WORK, INFO ) |
* |
* |
* Update A := A*Z' |
* Update A := A*Z**H |
* |
* |
CALL ZUNMR2( 'Right', 'Conjugate transpose', M, N, L, B, LDB, |
CALL ZUNMR2( 'Right', 'Conjugate transpose', M, N, L, B, LDB, |
$ TAU, A, LDA, WORK, INFO ) |
$ TAU, A, LDA, WORK, INFO ) |
IF( WANTQ ) THEN |
IF( WANTQ ) THEN |
* |
* |
* Update Q := Q*Z' |
* Update Q := Q*Z**H |
* |
* |
CALL ZUNMR2( 'Right', 'Conjugate transpose', N, N, L, B, |
CALL ZUNMR2( 'Right', 'Conjugate transpose', N, N, L, B, |
$ LDB, TAU, Q, LDQ, WORK, INFO ) |
$ LDB, TAU, Q, LDQ, WORK, INFO ) |
Line 296
|
Line 295
|
* |
* |
* then the following does the complete QR decomposition of A11: |
* then the following does the complete QR decomposition of A11: |
* |
* |
* A11 = U*( 0 T12 )*P1' |
* A11 = U*( 0 T12 )*P1**H |
* ( 0 0 ) |
* ( 0 0 ) |
* |
* |
DO 70 I = 1, N - L |
DO 70 I = 1, N - L |
Line 312
|
Line 311
|
$ K = K + 1 |
$ K = K + 1 |
80 CONTINUE |
80 CONTINUE |
* |
* |
* Update A12 := U'*A12, where A12 = A( 1:M, N-L+1:N ) |
* Update A12 := U**H*A12, where A12 = A( 1:M, N-L+1:N ) |
* |
* |
CALL ZUNM2R( 'Left', 'Conjugate transpose', M, L, MIN( M, N-L ), |
CALL ZUNM2R( 'Left', 'Conjugate transpose', M, L, MIN( M, N-L ), |
$ A, LDA, TAU, A( 1, N-L+1 ), LDA, WORK, INFO ) |
$ A, LDA, TAU, A( 1, N-L+1 ), LDA, WORK, INFO ) |
Line 354
|
Line 353
|
* |
* |
IF( WANTQ ) THEN |
IF( WANTQ ) THEN |
* |
* |
* Update Q( 1:N,1:N-L ) = Q( 1:N,1:N-L )*Z1' |
* Update Q( 1:N,1:N-L ) = Q( 1:N,1:N-L )*Z1**H |
* |
* |
CALL ZUNMR2( 'Right', 'Conjugate transpose', N, N-L, K, A, |
CALL ZUNMR2( 'Right', 'Conjugate transpose', N, N-L, K, A, |
$ LDA, TAU, Q, LDQ, WORK, INFO ) |
$ LDA, TAU, Q, LDQ, WORK, INFO ) |