SUBROUTINE ZGGQRF( N, M, P, A, LDA, TAUA, B, LDB, TAUB, WORK, LWORK, * INFO) DOUBLE COMPLEX A(LDA,*), TAUA(*), B(LDB,*), TAUB(*), WORK(*) INTEGER N, M, P, LDA, LDB, LWORK, INFO SUBROUTINE ZGGQRF_64( N, M, P, A, LDA, TAUA, B, LDB, TAUB, WORK, * LWORK, INFO) DOUBLE COMPLEX A(LDA,*), TAUA(*), B(LDB,*), TAUB(*), WORK(*) INTEGER*8 N, M, P, LDA, LDB, LWORK, INFO
SUBROUTINE GGQRF( [N], [M], [P], A, [LDA], TAUA, B, [LDB], TAUB, * [WORK], [LWORK], [INFO]) COMPLEX(8), DIMENSION(:) :: TAUA, TAUB, WORK COMPLEX(8), DIMENSION(:,:) :: A, B INTEGER :: N, M, P, LDA, LDB, LWORK, INFO SUBROUTINE GGQRF_64( [N], [M], [P], A, [LDA], TAUA, B, [LDB], TAUB, * [WORK], [LWORK], [INFO]) COMPLEX(8), DIMENSION(:) :: TAUA, TAUB, WORK COMPLEX(8), DIMENSION(:,:) :: A, B INTEGER(8) :: N, M, P, LDA, LDB, LWORK, INFO
void zggqrf(int n, int m, int p, doublecomplex *a, int lda, doublecomplex *taua, doublecomplex *b, int ldb, doublecomplex *taub, int *info);
void zggqrf_64(long n, long m, long p, doublecomplex *a, long lda, doublecomplex *taua, doublecomplex *b, long ldb, doublecomplex *taub, long *info);
A = Q*R, B = Q*T*Z,
where Q is an N-by-N unitary matrix, Z is a P-by-P unitary matrix, and R and T assume one of the forms:
if N >= M, R = ( R11 ) M , or if N < M, R = ( R11 R12 ) N, ( 0 ) N-M N M-N M
where R11 is upper triangular, and
if N <= P, T = ( 0 T12 ) N, or if N > P, T = ( T11 ) N-P, P-N N ( T21 ) P P
where T12 or T21 is upper triangular.
In particular, if B is square and nonsingular, the GQR factorization of A and B implicitly gives the QR factorization of inv(B)*A:
inv(B)*A = Z'*(inv(T)*R)
where inv(B) denotes the inverse of the matrix B, and Z' denotes the conjugate transpose of matrix Z.
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.