COMPLEX*16 or DOUBLE COMPLEX routines for (complex) unitary matrix
zunbdb
USAGE:
theta, phi, taup1, taup2, tauq1, tauq2, info, x11, x12, x21, x22 = NumRu::Lapack.zunbdb( trans, signs, m, x11, x12, x21, x22, [:lwork => lwork, :usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNBDB( TRANS, SIGNS, M, P, Q, X11, LDX11, X12, LDX12, X21, LDX21, X22, LDX22, THETA, PHI, TAUP1, TAUP2, TAUQ1, TAUQ2, WORK, LWORK, INFO )
* Purpose
* =======
*
* ZUNBDB simultaneously bidiagonalizes the blocks of an M-by-M
* partitioned unitary matrix X:
*
* [ B11 | B12 0 0 ]
* [ X11 | X12 ] [ P1 | ] [ 0 | 0 -I 0 ] [ Q1 | ]**H
* X = [-----------] = [---------] [----------------] [---------] .
* [ X21 | X22 ] [ | P2 ] [ B21 | B22 0 0 ] [ | Q2 ]
* [ 0 | 0 0 I ]
*
* X11 is P-by-Q. Q must be no larger than P, M-P, or M-Q. (If this is
* not the case, then X must be transposed and/or permuted. This can be
* done in constant time using the TRANS and SIGNS options. See ZUNCSD
* for details.)
*
* The unitary matrices P1, P2, Q1, and Q2 are P-by-P, (M-P)-by-
* (M-P), Q-by-Q, and (M-Q)-by-(M-Q), respectively. They are
* represented implicitly by Householder vectors.
*
* B11, B12, B21, and B22 are Q-by-Q bidiagonal matrices represented
* implicitly by angles THETA, PHI.
*
* Arguments
* =========
*
* TRANS (input) CHARACTER
* = 'T': X, U1, U2, V1T, and V2T are stored in row-major
* order;
* otherwise: X, U1, U2, V1T, and V2T are stored in column-
* major order.
*
* SIGNS (input) CHARACTER
* = 'O': The lower-left block is made nonpositive (the
* "other" convention);
* otherwise: The upper-right block is made nonpositive (the
* "default" convention).
*
* M (input) INTEGER
* The number of rows and columns in X.
*
* P (input) INTEGER
* The number of rows in X11 and X12. 0 <= P <= M.
*
* Q (input) INTEGER
* The number of columns in X11 and X21. 0 <= Q <=
* MIN(P,M-P,M-Q).
*
* X11 (input/output) COMPLEX*16 array, dimension (LDX11,Q)
* On entry, the top-left block of the unitary matrix to be
* reduced. On exit, the form depends on TRANS:
* If TRANS = 'N', then
* the columns of tril(X11) specify reflectors for P1,
* the rows of triu(X11,1) specify reflectors for Q1;
* else TRANS = 'T', and
* the rows of triu(X11) specify reflectors for P1,
* the columns of tril(X11,-1) specify reflectors for Q1.
*
* LDX11 (input) INTEGER
* The leading dimension of X11. If TRANS = 'N', then LDX11 >=
* P; else LDX11 >= Q.
*
* X12 (input/output) COMPLEX*16 array, dimension (LDX12,M-Q)
* On entry, the top-right block of the unitary matrix to
* be reduced. On exit, the form depends on TRANS:
* If TRANS = 'N', then
* the rows of triu(X12) specify the first P reflectors for
* Q2;
* else TRANS = 'T', and
* the columns of tril(X12) specify the first P reflectors
* for Q2.
*
* LDX12 (input) INTEGER
* The leading dimension of X12. If TRANS = 'N', then LDX12 >=
* P; else LDX11 >= M-Q.
*
* X21 (input/output) COMPLEX*16 array, dimension (LDX21,Q)
* On entry, the bottom-left block of the unitary matrix to
* be reduced. On exit, the form depends on TRANS:
* If TRANS = 'N', then
* the columns of tril(X21) specify reflectors for P2;
* else TRANS = 'T', and
* the rows of triu(X21) specify reflectors for P2.
*
* LDX21 (input) INTEGER
* The leading dimension of X21. If TRANS = 'N', then LDX21 >=
* M-P; else LDX21 >= Q.
*
* X22 (input/output) COMPLEX*16 array, dimension (LDX22,M-Q)
* On entry, the bottom-right block of the unitary matrix to
* be reduced. On exit, the form depends on TRANS:
* If TRANS = 'N', then
* the rows of triu(X22(Q+1:M-P,P+1:M-Q)) specify the last
* M-P-Q reflectors for Q2,
* else TRANS = 'T', and
* the columns of tril(X22(P+1:M-Q,Q+1:M-P)) specify the last
* M-P-Q reflectors for P2.
*
* LDX22 (input) INTEGER
* The leading dimension of X22. If TRANS = 'N', then LDX22 >=
* M-P; else LDX22 >= M-Q.
*
* THETA (output) DOUBLE PRECISION array, dimension (Q)
* The entries of the bidiagonal blocks B11, B12, B21, B22 can
* be computed from the angles THETA and PHI. See Further
* Details.
*
* PHI (output) DOUBLE PRECISION array, dimension (Q-1)
* The entries of the bidiagonal blocks B11, B12, B21, B22 can
* be computed from the angles THETA and PHI. See Further
* Details.
*
* TAUP1 (output) COMPLEX*16 array, dimension (P)
* The scalar factors of the elementary reflectors that define
* P1.
*
* TAUP2 (output) COMPLEX*16 array, dimension (M-P)
* The scalar factors of the elementary reflectors that define
* P2.
*
* TAUQ1 (output) COMPLEX*16 array, dimension (Q)
* The scalar factors of the elementary reflectors that define
* Q1.
*
* TAUQ2 (output) COMPLEX*16 array, dimension (M-Q)
* The scalar factors of the elementary reflectors that define
* Q2.
*
* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
*
* LWORK (input) INTEGER
* The dimension of the array WORK. LWORK >= M-Q.
*
* 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.
*
* INFO (output) INTEGER
* = 0: successful exit.
* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
*
* The bidiagonal blocks B11, B12, B21, and B22 are represented
* implicitly by angles THETA(1), ..., THETA(Q) and PHI(1), ...,
* PHI(Q-1). B11 and B21 are upper bidiagonal, while B21 and B22 are
* lower bidiagonal. Every entry in each bidiagonal band is a product
* of a sine or cosine of a THETA with a sine or cosine of a PHI. See
* [1] or ZUNCSD for details.
*
* P1, P2, Q1, and Q2 are represented as products of elementary
* reflectors. See ZUNCSD for details on generating P1, P2, Q1, and Q2
* using ZUNGQR and ZUNGLQ.
*
* Reference
* =========
*
* [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
* Algorithms, 50(1):33-65, 2009.
*
* ====================================================================
*
go to the page top
zuncsd
USAGE:
theta, u1, u2, v1t, v2t, info = NumRu::Lapack.zuncsd( jobu1, jobu2, jobv1t, jobv2t, trans, signs, m, x11, x12, x21, x22, lwork, lrwork, [:usage => usage, :help => help])
FORTRAN MANUAL
RECURSIVE SUBROUTINE ZUNCSD( JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS, SIGNS, M, P, Q, X11, LDX11, X12, LDX12, X21, LDX21, X22, LDX22, THETA, U1, LDU1, U2, LDU2, V1T, LDV1T, V2T, LDV2T, WORK, LWORK, RWORK, LRWORK, IWORK, INFO )
* Purpose
* =======
*
* ZUNCSD computes the CS decomposition of an M-by-M partitioned
* unitary matrix X:
*
* [ I 0 0 | 0 0 0 ]
* [ 0 C 0 | 0 -S 0 ]
* [ X11 | X12 ] [ U1 | ] [ 0 0 0 | 0 0 -I ] [ V1 | ]**H
* X = [-----------] = [---------] [---------------------] [---------] .
* [ X21 | X22 ] [ | U2 ] [ 0 0 0 | I 0 0 ] [ | V2 ]
* [ 0 S 0 | 0 C 0 ]
* [ 0 0 I | 0 0 0 ]
*
* X11 is P-by-Q. The unitary matrices U1, U2, V1, and V2 are P-by-P,
* (M-P)-by-(M-P), Q-by-Q, and (M-Q)-by-(M-Q), respectively. C and S are
* R-by-R nonnegative diagonal matrices satisfying C^2 + S^2 = I, in
* which R = MIN(P,M-P,Q,M-Q).
*
* Arguments
* =========
*
* JOBU1 (input) CHARACTER
* = 'Y': U1 is computed;
* otherwise: U1 is not computed.
*
* JOBU2 (input) CHARACTER
* = 'Y': U2 is computed;
* otherwise: U2 is not computed.
*
* JOBV1T (input) CHARACTER
* = 'Y': V1T is computed;
* otherwise: V1T is not computed.
*
* JOBV2T (input) CHARACTER
* = 'Y': V2T is computed;
* otherwise: V2T is not computed.
*
* TRANS (input) CHARACTER
* = 'T': X, U1, U2, V1T, and V2T are stored in row-major
* order;
* otherwise: X, U1, U2, V1T, and V2T are stored in column-
* major order.
*
* SIGNS (input) CHARACTER
* = 'O': The lower-left block is made nonpositive (the
* "other" convention);
* otherwise: The upper-right block is made nonpositive (the
* "default" convention).
*
* M (input) INTEGER
* The number of rows and columns in X.
*
* P (input) INTEGER
* The number of rows in X11 and X12. 0 <= P <= M.
*
* Q (input) INTEGER
* The number of columns in X11 and X21. 0 <= Q <= M.
*
* X (input/workspace) COMPLEX*16 array, dimension (LDX,M)
* On entry, the unitary matrix whose CSD is desired.
*
* LDX (input) INTEGER
* The leading dimension of X. LDX >= MAX(1,M).
*
* THETA (output) DOUBLE PRECISION array, dimension (R), in which R =
* MIN(P,M-P,Q,M-Q).
* C = DIAG( COS(THETA(1)), ... , COS(THETA(R)) ) and
* S = DIAG( SIN(THETA(1)), ... , SIN(THETA(R)) ).
*
* U1 (output) COMPLEX*16 array, dimension (P)
* If JOBU1 = 'Y', U1 contains the P-by-P unitary matrix U1.
*
* LDU1 (input) INTEGER
* The leading dimension of U1. If JOBU1 = 'Y', LDU1 >=
* MAX(1,P).
*
* U2 (output) COMPLEX*16 array, dimension (M-P)
* If JOBU2 = 'Y', U2 contains the (M-P)-by-(M-P) unitary
* matrix U2.
*
* LDU2 (input) INTEGER
* The leading dimension of U2. If JOBU2 = 'Y', LDU2 >=
* MAX(1,M-P).
*
* V1T (output) COMPLEX*16 array, dimension (Q)
* If JOBV1T = 'Y', V1T contains the Q-by-Q matrix unitary
* matrix V1**H.
*
* LDV1T (input) INTEGER
* The leading dimension of V1T. If JOBV1T = 'Y', LDV1T >=
* MAX(1,Q).
*
* V2T (output) COMPLEX*16 array, dimension (M-Q)
* If JOBV2T = 'Y', V2T contains the (M-Q)-by-(M-Q) unitary
* matrix V2**H.
*
* LDV2T (input) INTEGER
* The leading dimension of V2T. If JOBV2T = 'Y', LDV2T >=
* MAX(1,M-Q).
*
* WORK (workspace) COMPLEX*16 array, dimension (MAX(1,LWORK))
* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
*
* LWORK (input) INTEGER
* The dimension of the array WORK.
*
* 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.
*
* RWORK (workspace) DOUBLE PRECISION array, dimension MAX(1,LRWORK)
* On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
* If INFO > 0 on exit, RWORK(2:R) contains the values PHI(1),
* ..., PHI(R-1) that, together with THETA(1), ..., THETA(R),
* define the matrix in intermediate bidiagonal-block form
* remaining after nonconvergence. INFO specifies the number
* of nonzero PHI's.
*
* LRWORK (input) INTEGER
* The dimension of the array RWORK.
*
* If LRWORK = -1, then a workspace query is assumed; the routine
* only calculates the optimal size of the RWORK array, returns
* this value as the first entry of the work array, and no error
* message related to LRWORK is issued by XERBLA.
*
* IWORK (workspace) INTEGER array, dimension (M-Q)
*
* INFO (output) INTEGER
* = 0: successful exit.
* < 0: if INFO = -i, the i-th argument had an illegal value.
* > 0: ZBBCSD did not converge. See the description of RWORK
* above for details.
*
* Reference
* =========
*
* [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
* Algorithms, 50(1):33-65, 2009.
*
* ===================================================================
*
go to the page top
zung2l
USAGE:
info, a = NumRu::Lapack.zung2l( m, a, tau, [:usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNG2L( M, N, K, A, LDA, TAU, WORK, INFO )
* Purpose
* =======
*
* ZUNG2L generates an m by n complex matrix Q with orthonormal columns,
* which is defined as the last n columns of a product of k elementary
* reflectors of order m
*
* Q = H(k) . . . H(2) H(1)
*
* as returned by ZGEQLF.
*
* Arguments
* =========
*
* M (input) INTEGER
* The number of rows of the matrix Q. M >= 0.
*
* N (input) INTEGER
* The number of columns of the matrix Q. M >= N >= 0.
*
* K (input) INTEGER
* The number of elementary reflectors whose product defines the
* matrix Q. N >= K >= 0.
*
* A (input/output) COMPLEX*16 array, dimension (LDA,N)
* On entry, the (n-k+i)-th column must contain the vector which
* defines the elementary reflector H(i), for i = 1,2,...,k, as
* returned by ZGEQLF in the last k columns of its array
* argument A.
* On exit, the m-by-n matrix Q.
*
* LDA (input) INTEGER
* The first dimension of the array A. LDA >= max(1,M).
*
* TAU (input) COMPLEX*16 array, dimension (K)
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i), as returned by ZGEQLF.
*
* WORK (workspace) COMPLEX*16 array, dimension (N)
*
* INFO (output) INTEGER
* = 0: successful exit
* < 0: if INFO = -i, the i-th argument has an illegal value
*
* =====================================================================
*
go to the page top
zung2r
USAGE:
info, a = NumRu::Lapack.zung2r( m, a, tau, [:usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNG2R( M, N, K, A, LDA, TAU, WORK, INFO )
* Purpose
* =======
*
* ZUNG2R generates an m by n complex matrix Q with orthonormal columns,
* which is defined as the first n columns of a product of k elementary
* reflectors of order m
*
* Q = H(1) H(2) . . . H(k)
*
* as returned by ZGEQRF.
*
* Arguments
* =========
*
* M (input) INTEGER
* The number of rows of the matrix Q. M >= 0.
*
* N (input) INTEGER
* The number of columns of the matrix Q. M >= N >= 0.
*
* K (input) INTEGER
* The number of elementary reflectors whose product defines the
* matrix Q. N >= K >= 0.
*
* A (input/output) COMPLEX*16 array, dimension (LDA,N)
* On entry, the i-th column must contain the vector which
* defines the elementary reflector H(i), for i = 1,2,...,k, as
* returned by ZGEQRF in the first k columns of its array
* argument A.
* On exit, the m by n matrix Q.
*
* LDA (input) INTEGER
* The first dimension of the array A. LDA >= max(1,M).
*
* TAU (input) COMPLEX*16 array, dimension (K)
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i), as returned by ZGEQRF.
*
* WORK (workspace) COMPLEX*16 array, dimension (N)
*
* INFO (output) INTEGER
* = 0: successful exit
* < 0: if INFO = -i, the i-th argument has an illegal value
*
* =====================================================================
*
go to the page top
zungbr
USAGE:
work, info, a = NumRu::Lapack.zungbr( vect, m, k, a, tau, [:lwork => lwork, :usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNGBR( VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
* Purpose
* =======
*
* ZUNGBR generates one of the complex unitary matrices Q or P**H
* determined by ZGEBRD when reducing a complex matrix A to bidiagonal
* form: A = Q * B * P**H. Q and P**H are defined as products of
* elementary reflectors H(i) or G(i) respectively.
*
* If VECT = 'Q', A is assumed to have been an M-by-K matrix, and Q
* is of order M:
* if m >= k, Q = H(1) H(2) . . . H(k) and ZUNGBR returns the first n
* columns of Q, where m >= n >= k;
* if m < k, Q = H(1) H(2) . . . H(m-1) and ZUNGBR returns Q as an
* M-by-M matrix.
*
* If VECT = 'P', A is assumed to have been a K-by-N matrix, and P**H
* is of order N:
* if k < n, P**H = G(k) . . . G(2) G(1) and ZUNGBR returns the first m
* rows of P**H, where n >= m >= k;
* if k >= n, P**H = G(n-1) . . . G(2) G(1) and ZUNGBR returns P**H as
* an N-by-N matrix.
*
* Arguments
* =========
*
* VECT (input) CHARACTER*1
* Specifies whether the matrix Q or the matrix P**H is
* required, as defined in the transformation applied by ZGEBRD:
* = 'Q': generate Q;
* = 'P': generate P**H.
*
* M (input) INTEGER
* The number of rows of the matrix Q or P**H to be returned.
* M >= 0.
*
* N (input) INTEGER
* The number of columns of the matrix Q or P**H to be returned.
* N >= 0.
* If VECT = 'Q', M >= N >= min(M,K);
* if VECT = 'P', N >= M >= min(N,K).
*
* K (input) INTEGER
* If VECT = 'Q', the number of columns in the original M-by-K
* matrix reduced by ZGEBRD.
* If VECT = 'P', the number of rows in the original K-by-N
* matrix reduced by ZGEBRD.
* K >= 0.
*
* A (input/output) COMPLEX*16 array, dimension (LDA,N)
* On entry, the vectors which define the elementary reflectors,
* as returned by ZGEBRD.
* On exit, the M-by-N matrix Q or P**H.
*
* LDA (input) INTEGER
* The leading dimension of the array A. LDA >= M.
*
* TAU (input) COMPLEX*16 array, dimension
* (min(M,K)) if VECT = 'Q'
* (min(N,K)) if VECT = 'P'
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i) or G(i), which determines Q or P**H, as
* returned by ZGEBRD in its array argument TAUQ or TAUP.
*
* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
*
* LWORK (input) INTEGER
* The dimension of the array WORK. LWORK >= max(1,min(M,N)).
* For optimum performance LWORK >= min(M,N)*NB, where NB
* is the optimal blocksize.
*
* 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.
*
* INFO (output) INTEGER
* = 0: successful exit
* < 0: if INFO = -i, the i-th argument had an illegal value
*
* =====================================================================
*
go to the page top
zunghr
USAGE:
work, info, a = NumRu::Lapack.zunghr( ilo, ihi, a, tau, [:lwork => lwork, :usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
* Purpose
* =======
*
* ZUNGHR generates a complex unitary matrix Q which is defined as the
* product of IHI-ILO elementary reflectors of order N, as returned by
* ZGEHRD:
*
* Q = H(ilo) H(ilo+1) . . . H(ihi-1).
*
* Arguments
* =========
*
* N (input) INTEGER
* The order of the matrix Q. N >= 0.
*
* ILO (input) INTEGER
* IHI (input) INTEGER
* ILO and IHI must have the same values as in the previous call
* of ZGEHRD. Q is equal to the unit matrix except in the
* submatrix Q(ilo+1:ihi,ilo+1:ihi).
* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
*
* A (input/output) COMPLEX*16 array, dimension (LDA,N)
* On entry, the vectors which define the elementary reflectors,
* as returned by ZGEHRD.
* On exit, the N-by-N unitary matrix Q.
*
* LDA (input) INTEGER
* The leading dimension of the array A. LDA >= max(1,N).
*
* TAU (input) COMPLEX*16 array, dimension (N-1)
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i), as returned by ZGEHRD.
*
* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
*
* LWORK (input) INTEGER
* The dimension of the array WORK. LWORK >= IHI-ILO.
* For optimum performance LWORK >= (IHI-ILO)*NB, where NB is
* the optimal blocksize.
*
* 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.
*
* INFO (output) INTEGER
* = 0: successful exit
* < 0: if INFO = -i, the i-th argument had an illegal value
*
* =====================================================================
*
go to the page top
zungl2
USAGE:
info, a = NumRu::Lapack.zungl2( a, tau, [:usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNGL2( M, N, K, A, LDA, TAU, WORK, INFO )
* Purpose
* =======
*
* ZUNGL2 generates an m-by-n complex matrix Q with orthonormal rows,
* which is defined as the first m rows of a product of k elementary
* reflectors of order n
*
* Q = H(k)' . . . H(2)' H(1)'
*
* as returned by ZGELQF.
*
* Arguments
* =========
*
* M (input) INTEGER
* The number of rows of the matrix Q. M >= 0.
*
* N (input) INTEGER
* The number of columns of the matrix Q. N >= M.
*
* K (input) INTEGER
* The number of elementary reflectors whose product defines the
* matrix Q. M >= K >= 0.
*
* A (input/output) COMPLEX*16 array, dimension (LDA,N)
* On entry, the i-th row must contain the vector which defines
* the elementary reflector H(i), for i = 1,2,...,k, as returned
* by ZGELQF in the first k rows of its array argument A.
* On exit, the m by n matrix Q.
*
* LDA (input) INTEGER
* The first dimension of the array A. LDA >= max(1,M).
*
* TAU (input) COMPLEX*16 array, dimension (K)
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i), as returned by ZGELQF.
*
* WORK (workspace) COMPLEX*16 array, dimension (M)
*
* INFO (output) INTEGER
* = 0: successful exit
* < 0: if INFO = -i, the i-th argument has an illegal value
*
* =====================================================================
*
go to the page top
zunglq
USAGE:
work, info, a = NumRu::Lapack.zunglq( m, a, tau, [:lwork => lwork, :usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
* Purpose
* =======
*
* ZUNGLQ generates an M-by-N complex matrix Q with orthonormal rows,
* which is defined as the first M rows of a product of K elementary
* reflectors of order N
*
* Q = H(k)' . . . H(2)' H(1)'
*
* as returned by ZGELQF.
*
* Arguments
* =========
*
* M (input) INTEGER
* The number of rows of the matrix Q. M >= 0.
*
* N (input) INTEGER
* The number of columns of the matrix Q. N >= M.
*
* K (input) INTEGER
* The number of elementary reflectors whose product defines the
* matrix Q. M >= K >= 0.
*
* A (input/output) COMPLEX*16 array, dimension (LDA,N)
* On entry, the i-th row must contain the vector which defines
* the elementary reflector H(i), for i = 1,2,...,k, as returned
* by ZGELQF in the first k rows of its array argument A.
* On exit, the M-by-N matrix Q.
*
* LDA (input) INTEGER
* The first dimension of the array A. LDA >= max(1,M).
*
* TAU (input) COMPLEX*16 array, dimension (K)
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i), as returned by ZGELQF.
*
* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
*
* LWORK (input) INTEGER
* The dimension of the array WORK. LWORK >= max(1,M).
* For optimum performance LWORK >= M*NB, where NB is
* the optimal blocksize.
*
* 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.
*
* INFO (output) INTEGER
* = 0: successful exit;
* < 0: if INFO = -i, the i-th argument has an illegal value
*
* =====================================================================
*
go to the page top
zungql
USAGE:
work, info, a = NumRu::Lapack.zungql( m, a, tau, [:lwork => lwork, :usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
* Purpose
* =======
*
* ZUNGQL generates an M-by-N complex matrix Q with orthonormal columns,
* which is defined as the last N columns of a product of K elementary
* reflectors of order M
*
* Q = H(k) . . . H(2) H(1)
*
* as returned by ZGEQLF.
*
* Arguments
* =========
*
* M (input) INTEGER
* The number of rows of the matrix Q. M >= 0.
*
* N (input) INTEGER
* The number of columns of the matrix Q. M >= N >= 0.
*
* K (input) INTEGER
* The number of elementary reflectors whose product defines the
* matrix Q. N >= K >= 0.
*
* A (input/output) COMPLEX*16 array, dimension (LDA,N)
* On entry, the (n-k+i)-th column must contain the vector which
* defines the elementary reflector H(i), for i = 1,2,...,k, as
* returned by ZGEQLF in the last k columns of its array
* argument A.
* On exit, the M-by-N matrix Q.
*
* LDA (input) INTEGER
* The first dimension of the array A. LDA >= max(1,M).
*
* TAU (input) COMPLEX*16 array, dimension (K)
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i), as returned by ZGEQLF.
*
* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
*
* LWORK (input) INTEGER
* The dimension of the array WORK. LWORK >= max(1,N).
* For optimum performance LWORK >= N*NB, where NB is the
* optimal blocksize.
*
* 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.
*
* INFO (output) INTEGER
* = 0: successful exit
* < 0: if INFO = -i, the i-th argument has an illegal value
*
* =====================================================================
*
go to the page top
zungqr
USAGE:
work, info, a = NumRu::Lapack.zungqr( m, a, tau, [:lwork => lwork, :usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
* Purpose
* =======
*
* ZUNGQR generates an M-by-N complex matrix Q with orthonormal columns,
* which is defined as the first N columns of a product of K elementary
* reflectors of order M
*
* Q = H(1) H(2) . . . H(k)
*
* as returned by ZGEQRF.
*
* Arguments
* =========
*
* M (input) INTEGER
* The number of rows of the matrix Q. M >= 0.
*
* N (input) INTEGER
* The number of columns of the matrix Q. M >= N >= 0.
*
* K (input) INTEGER
* The number of elementary reflectors whose product defines the
* matrix Q. N >= K >= 0.
*
* A (input/output) COMPLEX*16 array, dimension (LDA,N)
* On entry, the i-th column must contain the vector which
* defines the elementary reflector H(i), for i = 1,2,...,k, as
* returned by ZGEQRF in the first k columns of its array
* argument A.
* On exit, the M-by-N matrix Q.
*
* LDA (input) INTEGER
* The first dimension of the array A. LDA >= max(1,M).
*
* TAU (input) COMPLEX*16 array, dimension (K)
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i), as returned by ZGEQRF.
*
* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
*
* LWORK (input) INTEGER
* The dimension of the array WORK. LWORK >= max(1,N).
* For optimum performance LWORK >= N*NB, where NB is the
* optimal blocksize.
*
* 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.
*
* INFO (output) INTEGER
* = 0: successful exit
* < 0: if INFO = -i, the i-th argument has an illegal value
*
* =====================================================================
*
go to the page top
zungr2
USAGE:
info, a = NumRu::Lapack.zungr2( a, tau, [:usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNGR2( M, N, K, A, LDA, TAU, WORK, INFO )
* Purpose
* =======
*
* ZUNGR2 generates an m by n complex matrix Q with orthonormal rows,
* which is defined as the last m rows of a product of k elementary
* reflectors of order n
*
* Q = H(1)' H(2)' . . . H(k)'
*
* as returned by ZGERQF.
*
* Arguments
* =========
*
* M (input) INTEGER
* The number of rows of the matrix Q. M >= 0.
*
* N (input) INTEGER
* The number of columns of the matrix Q. N >= M.
*
* K (input) INTEGER
* The number of elementary reflectors whose product defines the
* matrix Q. M >= K >= 0.
*
* A (input/output) COMPLEX*16 array, dimension (LDA,N)
* On entry, the (m-k+i)-th row must contain the vector which
* defines the elementary reflector H(i), for i = 1,2,...,k, as
* returned by ZGERQF in the last k rows of its array argument
* A.
* On exit, the m-by-n matrix Q.
*
* LDA (input) INTEGER
* The first dimension of the array A. LDA >= max(1,M).
*
* TAU (input) COMPLEX*16 array, dimension (K)
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i), as returned by ZGERQF.
*
* WORK (workspace) COMPLEX*16 array, dimension (M)
*
* INFO (output) INTEGER
* = 0: successful exit
* < 0: if INFO = -i, the i-th argument has an illegal value
*
* =====================================================================
*
go to the page top
zungrq
USAGE:
work, info, a = NumRu::Lapack.zungrq( m, a, tau, [:lwork => lwork, :usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
* Purpose
* =======
*
* ZUNGRQ generates an M-by-N complex matrix Q with orthonormal rows,
* which is defined as the last M rows of a product of K elementary
* reflectors of order N
*
* Q = H(1)' H(2)' . . . H(k)'
*
* as returned by ZGERQF.
*
* Arguments
* =========
*
* M (input) INTEGER
* The number of rows of the matrix Q. M >= 0.
*
* N (input) INTEGER
* The number of columns of the matrix Q. N >= M.
*
* K (input) INTEGER
* The number of elementary reflectors whose product defines the
* matrix Q. M >= K >= 0.
*
* A (input/output) COMPLEX*16 array, dimension (LDA,N)
* On entry, the (m-k+i)-th row must contain the vector which
* defines the elementary reflector H(i), for i = 1,2,...,k, as
* returned by ZGERQF in the last k rows of its array argument
* A.
* On exit, the M-by-N matrix Q.
*
* LDA (input) INTEGER
* The first dimension of the array A. LDA >= max(1,M).
*
* TAU (input) COMPLEX*16 array, dimension (K)
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i), as returned by ZGERQF.
*
* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
*
* LWORK (input) INTEGER
* The dimension of the array WORK. LWORK >= max(1,M).
* For optimum performance LWORK >= M*NB, where NB is the
* optimal blocksize.
*
* 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.
*
* INFO (output) INTEGER
* = 0: successful exit
* < 0: if INFO = -i, the i-th argument has an illegal value
*
* =====================================================================
*
go to the page top
zungtr
USAGE:
work, info, a = NumRu::Lapack.zungtr( uplo, a, tau, [:lwork => lwork, :usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
* Purpose
* =======
*
* ZUNGTR generates a complex unitary matrix Q which is defined as the
* product of n-1 elementary reflectors of order N, as returned by
* ZHETRD:
*
* if UPLO = 'U', Q = H(n-1) . . . H(2) H(1),
*
* if UPLO = 'L', Q = H(1) H(2) . . . H(n-1).
*
* Arguments
* =========
*
* UPLO (input) CHARACTER*1
* = 'U': Upper triangle of A contains elementary reflectors
* from ZHETRD;
* = 'L': Lower triangle of A contains elementary reflectors
* from ZHETRD.
*
* N (input) INTEGER
* The order of the matrix Q. N >= 0.
*
* A (input/output) COMPLEX*16 array, dimension (LDA,N)
* On entry, the vectors which define the elementary reflectors,
* as returned by ZHETRD.
* On exit, the N-by-N unitary matrix Q.
*
* LDA (input) INTEGER
* The leading dimension of the array A. LDA >= N.
*
* TAU (input) COMPLEX*16 array, dimension (N-1)
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i), as returned by ZHETRD.
*
* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
*
* LWORK (input) INTEGER
* The dimension of the array WORK. LWORK >= N-1.
* For optimum performance LWORK >= (N-1)*NB, where NB is
* the optimal blocksize.
*
* 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.
*
* INFO (output) INTEGER
* = 0: successful exit
* < 0: if INFO = -i, the i-th argument had an illegal value
*
* =====================================================================
*
go to the page top
zunm2l
USAGE:
info, c = NumRu::Lapack.zunm2l( side, trans, m, a, tau, c, [:usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNM2L( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, INFO )
* Purpose
* =======
*
* ZUNM2L overwrites the general complex m-by-n matrix C with
*
* Q * C if SIDE = 'L' and TRANS = 'N', or
*
* Q'* C if SIDE = 'L' and TRANS = 'C', or
*
* C * Q if SIDE = 'R' and TRANS = 'N', or
*
* C * Q' if SIDE = 'R' and TRANS = 'C',
*
* where Q is a complex unitary matrix defined as the product of k
* elementary reflectors
*
* Q = H(k) . . . H(2) H(1)
*
* as returned by ZGEQLF. Q is of order m if SIDE = 'L' and of order n
* if SIDE = 'R'.
*
* Arguments
* =========
*
* SIDE (input) CHARACTER*1
* = 'L': apply Q or Q' from the Left
* = 'R': apply Q or Q' from the Right
*
* TRANS (input) CHARACTER*1
* = 'N': apply Q (No transpose)
* = 'C': apply Q' (Conjugate transpose)
*
* M (input) INTEGER
* The number of rows of the matrix C. M >= 0.
*
* N (input) INTEGER
* The number of columns of the matrix C. N >= 0.
*
* K (input) INTEGER
* The number of elementary reflectors whose product defines
* the matrix Q.
* If SIDE = 'L', M >= K >= 0;
* if SIDE = 'R', N >= K >= 0.
*
* A (input) COMPLEX*16 array, dimension (LDA,K)
* The i-th column must contain the vector which defines the
* elementary reflector H(i), for i = 1,2,...,k, as returned by
* ZGEQLF in the last k columns of its array argument A.
* A is modified by the routine but restored on exit.
*
* LDA (input) INTEGER
* The leading dimension of the array A.
* If SIDE = 'L', LDA >= max(1,M);
* if SIDE = 'R', LDA >= max(1,N).
*
* TAU (input) COMPLEX*16 array, dimension (K)
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i), as returned by ZGEQLF.
*
* C (input/output) COMPLEX*16 array, dimension (LDC,N)
* On entry, the m-by-n matrix C.
* On exit, C is overwritten by Q*C or Q'*C or C*Q' or C*Q.
*
* LDC (input) INTEGER
* The leading dimension of the array C. LDC >= max(1,M).
*
* WORK (workspace) COMPLEX*16 array, dimension
* (N) if SIDE = 'L',
* (M) if SIDE = 'R'
*
* INFO (output) INTEGER
* = 0: successful exit
* < 0: if INFO = -i, the i-th argument had an illegal value
*
* =====================================================================
*
go to the page top
zunm2r
USAGE:
info, c = NumRu::Lapack.zunm2r( side, trans, m, a, tau, c, [:usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, INFO )
* Purpose
* =======
*
* ZUNM2R overwrites the general complex m-by-n matrix C with
*
* Q * C if SIDE = 'L' and TRANS = 'N', or
*
* Q'* C if SIDE = 'L' and TRANS = 'C', or
*
* C * Q if SIDE = 'R' and TRANS = 'N', or
*
* C * Q' if SIDE = 'R' and TRANS = 'C',
*
* where Q is a complex unitary matrix defined as the product of k
* elementary reflectors
*
* Q = H(1) H(2) . . . H(k)
*
* as returned by ZGEQRF. Q is of order m if SIDE = 'L' and of order n
* if SIDE = 'R'.
*
* Arguments
* =========
*
* SIDE (input) CHARACTER*1
* = 'L': apply Q or Q' from the Left
* = 'R': apply Q or Q' from the Right
*
* TRANS (input) CHARACTER*1
* = 'N': apply Q (No transpose)
* = 'C': apply Q' (Conjugate transpose)
*
* M (input) INTEGER
* The number of rows of the matrix C. M >= 0.
*
* N (input) INTEGER
* The number of columns of the matrix C. N >= 0.
*
* K (input) INTEGER
* The number of elementary reflectors whose product defines
* the matrix Q.
* If SIDE = 'L', M >= K >= 0;
* if SIDE = 'R', N >= K >= 0.
*
* A (input) COMPLEX*16 array, dimension (LDA,K)
* The i-th column must contain the vector which defines the
* elementary reflector H(i), for i = 1,2,...,k, as returned by
* ZGEQRF in the first k columns of its array argument A.
* A is modified by the routine but restored on exit.
*
* LDA (input) INTEGER
* The leading dimension of the array A.
* If SIDE = 'L', LDA >= max(1,M);
* if SIDE = 'R', LDA >= max(1,N).
*
* TAU (input) COMPLEX*16 array, dimension (K)
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i), as returned by ZGEQRF.
*
* C (input/output) COMPLEX*16 array, dimension (LDC,N)
* On entry, the m-by-n matrix C.
* On exit, C is overwritten by Q*C or Q'*C or C*Q' or C*Q.
*
* LDC (input) INTEGER
* The leading dimension of the array C. LDC >= max(1,M).
*
* WORK (workspace) COMPLEX*16 array, dimension
* (N) if SIDE = 'L',
* (M) if SIDE = 'R'
*
* INFO (output) INTEGER
* = 0: successful exit
* < 0: if INFO = -i, the i-th argument had an illegal value
*
* =====================================================================
*
go to the page top
zunmbr
USAGE:
work, info, c = NumRu::Lapack.zunmbr( vect, side, trans, m, k, a, tau, c, [:lwork => lwork, :usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNMBR( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO )
* Purpose
* =======
*
* If VECT = 'Q', ZUNMBR overwrites the general complex M-by-N matrix C
* with
* SIDE = 'L' SIDE = 'R'
* TRANS = 'N': Q * C C * Q
* TRANS = 'C': Q**H * C C * Q**H
*
* If VECT = 'P', ZUNMBR overwrites the general complex M-by-N matrix C
* with
* SIDE = 'L' SIDE = 'R'
* TRANS = 'N': P * C C * P
* TRANS = 'C': P**H * C C * P**H
*
* Here Q and P**H are the unitary matrices determined by ZGEBRD when
* reducing a complex matrix A to bidiagonal form: A = Q * B * P**H. Q
* and P**H are defined as products of elementary reflectors H(i) and
* G(i) respectively.
*
* Let nq = m if SIDE = 'L' and nq = n if SIDE = 'R'. Thus nq is the
* order of the unitary matrix Q or P**H that is applied.
*
* If VECT = 'Q', A is assumed to have been an NQ-by-K matrix:
* if nq >= k, Q = H(1) H(2) . . . H(k);
* if nq < k, Q = H(1) H(2) . . . H(nq-1).
*
* If VECT = 'P', A is assumed to have been a K-by-NQ matrix:
* if k < nq, P = G(1) G(2) . . . G(k);
* if k >= nq, P = G(1) G(2) . . . G(nq-1).
*
* Arguments
* =========
*
* VECT (input) CHARACTER*1
* = 'Q': apply Q or Q**H;
* = 'P': apply P or P**H.
*
* SIDE (input) CHARACTER*1
* = 'L': apply Q, Q**H, P or P**H from the Left;
* = 'R': apply Q, Q**H, P or P**H from the Right.
*
* TRANS (input) CHARACTER*1
* = 'N': No transpose, apply Q or P;
* = 'C': Conjugate transpose, apply Q**H or P**H.
*
* M (input) INTEGER
* The number of rows of the matrix C. M >= 0.
*
* N (input) INTEGER
* The number of columns of the matrix C. N >= 0.
*
* K (input) INTEGER
* If VECT = 'Q', the number of columns in the original
* matrix reduced by ZGEBRD.
* If VECT = 'P', the number of rows in the original
* matrix reduced by ZGEBRD.
* K >= 0.
*
* A (input) COMPLEX*16 array, dimension
* (LDA,min(nq,K)) if VECT = 'Q'
* (LDA,nq) if VECT = 'P'
* The vectors which define the elementary reflectors H(i) and
* G(i), whose products determine the matrices Q and P, as
* returned by ZGEBRD.
*
* LDA (input) INTEGER
* The leading dimension of the array A.
* If VECT = 'Q', LDA >= max(1,nq);
* if VECT = 'P', LDA >= max(1,min(nq,K)).
*
* TAU (input) COMPLEX*16 array, dimension (min(nq,K))
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i) or G(i) which determines Q or P, as returned
* by ZGEBRD in the array argument TAUQ or TAUP.
*
* C (input/output) COMPLEX*16 array, dimension (LDC,N)
* On entry, the M-by-N matrix C.
* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q
* or P*C or P**H*C or C*P or C*P**H.
*
* LDC (input) INTEGER
* The leading dimension of the array C. LDC >= max(1,M).
*
* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
*
* LWORK (input) INTEGER
* The dimension of the array WORK.
* If SIDE = 'L', LWORK >= max(1,N);
* if SIDE = 'R', LWORK >= max(1,M);
* if N = 0 or M = 0, LWORK >= 1.
* For optimum performance LWORK >= max(1,N*NB) if SIDE = 'L',
* and LWORK >= max(1,M*NB) if SIDE = 'R', where NB is the
* optimal blocksize. (NB = 0 if M = 0 or N = 0.)
*
* 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.
*
* INFO (output) INTEGER
* = 0: successful exit
* < 0: if INFO = -i, the i-th argument had an illegal value
*
* =====================================================================
*
* .. Local Scalars ..
LOGICAL APPLYQ, LEFT, LQUERY, NOTRAN
CHARACTER TRANST
INTEGER I1, I2, IINFO, LWKOPT, MI, NB, NI, NQ, NW
* ..
* .. External Functions ..
LOGICAL LSAME
INTEGER ILAENV
EXTERNAL LSAME, ILAENV
* ..
* .. External Subroutines ..
EXTERNAL XERBLA, ZUNMLQ, ZUNMQR
* ..
* .. Intrinsic Functions ..
INTRINSIC MAX, MIN
* ..
go to the page top
zunmhr
USAGE:
work, info, c = NumRu::Lapack.zunmhr( side, trans, ilo, ihi, a, tau, c, [:lwork => lwork, :usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNMHR( SIDE, TRANS, M, N, ILO, IHI, A, LDA, TAU, C, LDC, WORK, LWORK, INFO )
* Purpose
* =======
*
* ZUNMHR overwrites the general complex M-by-N matrix C with
*
* SIDE = 'L' SIDE = 'R'
* TRANS = 'N': Q * C C * Q
* TRANS = 'C': Q**H * C C * Q**H
*
* where Q is a complex unitary matrix of order nq, with nq = m if
* SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
* IHI-ILO elementary reflectors, as returned by ZGEHRD:
*
* Q = H(ilo) H(ilo+1) . . . H(ihi-1).
*
* Arguments
* =========
*
* SIDE (input) CHARACTER*1
* = 'L': apply Q or Q**H from the Left;
* = 'R': apply Q or Q**H from the Right.
*
* TRANS (input) CHARACTER*1
* = 'N': apply Q (No transpose)
* = 'C': apply Q**H (Conjugate transpose)
*
* M (input) INTEGER
* The number of rows of the matrix C. M >= 0.
*
* N (input) INTEGER
* The number of columns of the matrix C. N >= 0.
*
* ILO (input) INTEGER
* IHI (input) INTEGER
* ILO and IHI must have the same values as in the previous call
* of ZGEHRD. Q is equal to the unit matrix except in the
* submatrix Q(ilo+1:ihi,ilo+1:ihi).
* If SIDE = 'L', then 1 <= ILO <= IHI <= M, if M > 0, and
* ILO = 1 and IHI = 0, if M = 0;
* if SIDE = 'R', then 1 <= ILO <= IHI <= N, if N > 0, and
* ILO = 1 and IHI = 0, if N = 0.
*
* A (input) COMPLEX*16 array, dimension
* (LDA,M) if SIDE = 'L'
* (LDA,N) if SIDE = 'R'
* The vectors which define the elementary reflectors, as
* returned by ZGEHRD.
*
* LDA (input) INTEGER
* The leading dimension of the array A.
* LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
*
* TAU (input) COMPLEX*16 array, dimension
* (M-1) if SIDE = 'L'
* (N-1) if SIDE = 'R'
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i), as returned by ZGEHRD.
*
* C (input/output) COMPLEX*16 array, dimension (LDC,N)
* On entry, the M-by-N matrix C.
* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
*
* LDC (input) INTEGER
* The leading dimension of the array C. LDC >= max(1,M).
*
* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
*
* LWORK (input) INTEGER
* The dimension of the array WORK.
* If SIDE = 'L', LWORK >= max(1,N);
* if SIDE = 'R', LWORK >= max(1,M).
* For optimum performance LWORK >= N*NB if SIDE = 'L', and
* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
* blocksize.
*
* 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.
*
* INFO (output) INTEGER
* = 0: successful exit
* < 0: if INFO = -i, the i-th argument had an illegal value
*
* =====================================================================
*
* .. Local Scalars ..
LOGICAL LEFT, LQUERY
INTEGER I1, I2, IINFO, LWKOPT, MI, NB, NH, NI, NQ, NW
* ..
* .. External Functions ..
LOGICAL LSAME
INTEGER ILAENV
EXTERNAL LSAME, ILAENV
* ..
* .. External Subroutines ..
EXTERNAL XERBLA, ZUNMQR
* ..
* .. Intrinsic Functions ..
INTRINSIC MAX, MIN
* ..
go to the page top
zunml2
USAGE:
info, c = NumRu::Lapack.zunml2( side, trans, a, tau, c, [:usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, INFO )
* Purpose
* =======
*
* ZUNML2 overwrites the general complex m-by-n matrix C with
*
* Q * C if SIDE = 'L' and TRANS = 'N', or
*
* Q'* C if SIDE = 'L' and TRANS = 'C', or
*
* C * Q if SIDE = 'R' and TRANS = 'N', or
*
* C * Q' if SIDE = 'R' and TRANS = 'C',
*
* where Q is a complex unitary matrix defined as the product of k
* elementary reflectors
*
* Q = H(k)' . . . H(2)' H(1)'
*
* as returned by ZGELQF. Q is of order m if SIDE = 'L' and of order n
* if SIDE = 'R'.
*
* Arguments
* =========
*
* SIDE (input) CHARACTER*1
* = 'L': apply Q or Q' from the Left
* = 'R': apply Q or Q' from the Right
*
* TRANS (input) CHARACTER*1
* = 'N': apply Q (No transpose)
* = 'C': apply Q' (Conjugate transpose)
*
* M (input) INTEGER
* The number of rows of the matrix C. M >= 0.
*
* N (input) INTEGER
* The number of columns of the matrix C. N >= 0.
*
* K (input) INTEGER
* The number of elementary reflectors whose product defines
* the matrix Q.
* If SIDE = 'L', M >= K >= 0;
* if SIDE = 'R', N >= K >= 0.
*
* A (input) COMPLEX*16 array, dimension
* (LDA,M) if SIDE = 'L',
* (LDA,N) if SIDE = 'R'
* The i-th row must contain the vector which defines the
* elementary reflector H(i), for i = 1,2,...,k, as returned by
* ZGELQF in the first k rows of its array argument A.
* A is modified by the routine but restored on exit.
*
* LDA (input) INTEGER
* The leading dimension of the array A. LDA >= max(1,K).
*
* TAU (input) COMPLEX*16 array, dimension (K)
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i), as returned by ZGELQF.
*
* C (input/output) COMPLEX*16 array, dimension (LDC,N)
* On entry, the m-by-n matrix C.
* On exit, C is overwritten by Q*C or Q'*C or C*Q' or C*Q.
*
* LDC (input) INTEGER
* The leading dimension of the array C. LDC >= max(1,M).
*
* WORK (workspace) COMPLEX*16 array, dimension
* (N) if SIDE = 'L',
* (M) if SIDE = 'R'
*
* INFO (output) INTEGER
* = 0: successful exit
* < 0: if INFO = -i, the i-th argument had an illegal value
*
* =====================================================================
*
go to the page top
zunmlq
USAGE:
work, info, c = NumRu::Lapack.zunmlq( side, trans, a, tau, c, [:lwork => lwork, :usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNMLQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO )
* Purpose
* =======
*
* ZUNMLQ overwrites the general complex M-by-N matrix C with
*
* SIDE = 'L' SIDE = 'R'
* TRANS = 'N': Q * C C * Q
* TRANS = 'C': Q**H * C C * Q**H
*
* where Q is a complex unitary matrix defined as the product of k
* elementary reflectors
*
* Q = H(k)' . . . H(2)' H(1)'
*
* as returned by ZGELQF. Q is of order M if SIDE = 'L' and of order N
* if SIDE = 'R'.
*
* Arguments
* =========
*
* SIDE (input) CHARACTER*1
* = 'L': apply Q or Q**H from the Left;
* = 'R': apply Q or Q**H from the Right.
*
* TRANS (input) CHARACTER*1
* = 'N': No transpose, apply Q;
* = 'C': Conjugate transpose, apply Q**H.
*
* M (input) INTEGER
* The number of rows of the matrix C. M >= 0.
*
* N (input) INTEGER
* The number of columns of the matrix C. N >= 0.
*
* K (input) INTEGER
* The number of elementary reflectors whose product defines
* the matrix Q.
* If SIDE = 'L', M >= K >= 0;
* if SIDE = 'R', N >= K >= 0.
*
* A (input) COMPLEX*16 array, dimension
* (LDA,M) if SIDE = 'L',
* (LDA,N) if SIDE = 'R'
* The i-th row must contain the vector which defines the
* elementary reflector H(i), for i = 1,2,...,k, as returned by
* ZGELQF in the first k rows of its array argument A.
* A is modified by the routine but restored on exit.
*
* LDA (input) INTEGER
* The leading dimension of the array A. LDA >= max(1,K).
*
* TAU (input) COMPLEX*16 array, dimension (K)
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i), as returned by ZGELQF.
*
* C (input/output) COMPLEX*16 array, dimension (LDC,N)
* On entry, the M-by-N matrix C.
* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
*
* LDC (input) INTEGER
* The leading dimension of the array C. LDC >= max(1,M).
*
* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
*
* LWORK (input) INTEGER
* The dimension of the array WORK.
* If SIDE = 'L', LWORK >= max(1,N);
* if SIDE = 'R', LWORK >= max(1,M).
* For optimum performance LWORK >= N*NB if SIDE 'L', and
* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
* blocksize.
*
* 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.
*
* INFO (output) INTEGER
* = 0: successful exit
* < 0: if INFO = -i, the i-th argument had an illegal value
*
* =====================================================================
*
go to the page top
zunmql
USAGE:
work, info, c = NumRu::Lapack.zunmql( side, trans, m, a, tau, c, [:lwork => lwork, :usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNMQL( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO )
* Purpose
* =======
*
* ZUNMQL overwrites the general complex M-by-N matrix C with
*
* SIDE = 'L' SIDE = 'R'
* TRANS = 'N': Q * C C * Q
* TRANS = 'C': Q**H * C C * Q**H
*
* where Q is a complex unitary matrix defined as the product of k
* elementary reflectors
*
* Q = H(k) . . . H(2) H(1)
*
* as returned by ZGEQLF. Q is of order M if SIDE = 'L' and of order N
* if SIDE = 'R'.
*
* Arguments
* =========
*
* SIDE (input) CHARACTER*1
* = 'L': apply Q or Q**H from the Left;
* = 'R': apply Q or Q**H from the Right.
*
* TRANS (input) CHARACTER*1
* = 'N': No transpose, apply Q;
* = 'C': Transpose, apply Q**H.
*
* M (input) INTEGER
* The number of rows of the matrix C. M >= 0.
*
* N (input) INTEGER
* The number of columns of the matrix C. N >= 0.
*
* K (input) INTEGER
* The number of elementary reflectors whose product defines
* the matrix Q.
* If SIDE = 'L', M >= K >= 0;
* if SIDE = 'R', N >= K >= 0.
*
* A (input) COMPLEX*16 array, dimension (LDA,K)
* The i-th column must contain the vector which defines the
* elementary reflector H(i), for i = 1,2,...,k, as returned by
* ZGEQLF in the last k columns of its array argument A.
* A is modified by the routine but restored on exit.
*
* LDA (input) INTEGER
* The leading dimension of the array A.
* If SIDE = 'L', LDA >= max(1,M);
* if SIDE = 'R', LDA >= max(1,N).
*
* TAU (input) COMPLEX*16 array, dimension (K)
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i), as returned by ZGEQLF.
*
* C (input/output) COMPLEX*16 array, dimension (LDC,N)
* On entry, the M-by-N matrix C.
* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
*
* LDC (input) INTEGER
* The leading dimension of the array C. LDC >= max(1,M).
*
* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
*
* LWORK (input) INTEGER
* The dimension of the array WORK.
* If SIDE = 'L', LWORK >= max(1,N);
* if SIDE = 'R', LWORK >= max(1,M).
* For optimum performance LWORK >= N*NB if SIDE = 'L', and
* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
* blocksize.
*
* 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.
*
* INFO (output) INTEGER
* = 0: successful exit
* < 0: if INFO = -i, the i-th argument had an illegal value
*
* =====================================================================
*
go to the page top
zunmqr
USAGE:
work, info, c = NumRu::Lapack.zunmqr( side, trans, m, a, tau, c, [:lwork => lwork, :usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO )
* Purpose
* =======
*
* ZUNMQR overwrites the general complex M-by-N matrix C with
*
* SIDE = 'L' SIDE = 'R'
* TRANS = 'N': Q * C C * Q
* TRANS = 'C': Q**H * C C * Q**H
*
* where Q is a complex unitary matrix defined as the product of k
* elementary reflectors
*
* Q = H(1) H(2) . . . H(k)
*
* as returned by ZGEQRF. Q is of order M if SIDE = 'L' and of order N
* if SIDE = 'R'.
*
* Arguments
* =========
*
* SIDE (input) CHARACTER*1
* = 'L': apply Q or Q**H from the Left;
* = 'R': apply Q or Q**H from the Right.
*
* TRANS (input) CHARACTER*1
* = 'N': No transpose, apply Q;
* = 'C': Conjugate transpose, apply Q**H.
*
* M (input) INTEGER
* The number of rows of the matrix C. M >= 0.
*
* N (input) INTEGER
* The number of columns of the matrix C. N >= 0.
*
* K (input) INTEGER
* The number of elementary reflectors whose product defines
* the matrix Q.
* If SIDE = 'L', M >= K >= 0;
* if SIDE = 'R', N >= K >= 0.
*
* A (input) COMPLEX*16 array, dimension (LDA,K)
* The i-th column must contain the vector which defines the
* elementary reflector H(i), for i = 1,2,...,k, as returned by
* ZGEQRF in the first k columns of its array argument A.
* A is modified by the routine but restored on exit.
*
* LDA (input) INTEGER
* The leading dimension of the array A.
* If SIDE = 'L', LDA >= max(1,M);
* if SIDE = 'R', LDA >= max(1,N).
*
* TAU (input) COMPLEX*16 array, dimension (K)
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i), as returned by ZGEQRF.
*
* C (input/output) COMPLEX*16 array, dimension (LDC,N)
* On entry, the M-by-N matrix C.
* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
*
* LDC (input) INTEGER
* The leading dimension of the array C. LDC >= max(1,M).
*
* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
*
* LWORK (input) INTEGER
* The dimension of the array WORK.
* If SIDE = 'L', LWORK >= max(1,N);
* if SIDE = 'R', LWORK >= max(1,M).
* For optimum performance LWORK >= N*NB if SIDE = 'L', and
* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
* blocksize.
*
* 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.
*
* INFO (output) INTEGER
* = 0: successful exit
* < 0: if INFO = -i, the i-th argument had an illegal value
*
* =====================================================================
*
go to the page top
zunmr2
USAGE:
info, c = NumRu::Lapack.zunmr2( side, trans, a, tau, c, [:usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNMR2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, INFO )
* Purpose
* =======
*
* ZUNMR2 overwrites the general complex m-by-n matrix C with
*
* Q * C if SIDE = 'L' and TRANS = 'N', or
*
* Q'* C if SIDE = 'L' and TRANS = 'C', or
*
* C * Q if SIDE = 'R' and TRANS = 'N', or
*
* C * Q' if SIDE = 'R' and TRANS = 'C',
*
* where Q is a complex unitary matrix defined as the product of k
* elementary reflectors
*
* Q = H(1)' H(2)' . . . H(k)'
*
* as returned by ZGERQF. Q is of order m if SIDE = 'L' and of order n
* if SIDE = 'R'.
*
* Arguments
* =========
*
* SIDE (input) CHARACTER*1
* = 'L': apply Q or Q' from the Left
* = 'R': apply Q or Q' from the Right
*
* TRANS (input) CHARACTER*1
* = 'N': apply Q (No transpose)
* = 'C': apply Q' (Conjugate transpose)
*
* M (input) INTEGER
* The number of rows of the matrix C. M >= 0.
*
* N (input) INTEGER
* The number of columns of the matrix C. N >= 0.
*
* K (input) INTEGER
* The number of elementary reflectors whose product defines
* the matrix Q.
* If SIDE = 'L', M >= K >= 0;
* if SIDE = 'R', N >= K >= 0.
*
* A (input) COMPLEX*16 array, dimension
* (LDA,M) if SIDE = 'L',
* (LDA,N) if SIDE = 'R'
* The i-th row must contain the vector which defines the
* elementary reflector H(i), for i = 1,2,...,k, as returned by
* ZGERQF in the last k rows of its array argument A.
* A is modified by the routine but restored on exit.
*
* LDA (input) INTEGER
* The leading dimension of the array A. LDA >= max(1,K).
*
* TAU (input) COMPLEX*16 array, dimension (K)
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i), as returned by ZGERQF.
*
* C (input/output) COMPLEX*16 array, dimension (LDC,N)
* On entry, the m-by-n matrix C.
* On exit, C is overwritten by Q*C or Q'*C or C*Q' or C*Q.
*
* LDC (input) INTEGER
* The leading dimension of the array C. LDC >= max(1,M).
*
* WORK (workspace) COMPLEX*16 array, dimension
* (N) if SIDE = 'L',
* (M) if SIDE = 'R'
*
* INFO (output) INTEGER
* = 0: successful exit
* < 0: if INFO = -i, the i-th argument had an illegal value
*
* =====================================================================
*
go to the page top
zunmr3
USAGE:
info, c = NumRu::Lapack.zunmr3( side, trans, l, a, tau, c, [:usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNMR3( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC, WORK, INFO )
* Purpose
* =======
*
* ZUNMR3 overwrites the general complex m by n matrix C with
*
* Q * C if SIDE = 'L' and TRANS = 'N', or
*
* Q'* C if SIDE = 'L' and TRANS = 'C', or
*
* C * Q if SIDE = 'R' and TRANS = 'N', or
*
* C * Q' if SIDE = 'R' and TRANS = 'C',
*
* where Q is a complex unitary matrix defined as the product of k
* elementary reflectors
*
* Q = H(1) H(2) . . . H(k)
*
* as returned by ZTZRZF. Q is of order m if SIDE = 'L' and of order n
* if SIDE = 'R'.
*
* Arguments
* =========
*
* SIDE (input) CHARACTER*1
* = 'L': apply Q or Q' from the Left
* = 'R': apply Q or Q' from the Right
*
* TRANS (input) CHARACTER*1
* = 'N': apply Q (No transpose)
* = 'C': apply Q' (Conjugate transpose)
*
* M (input) INTEGER
* The number of rows of the matrix C. M >= 0.
*
* N (input) INTEGER
* The number of columns of the matrix C. N >= 0.
*
* K (input) INTEGER
* The number of elementary reflectors whose product defines
* the matrix Q.
* If SIDE = 'L', M >= K >= 0;
* if SIDE = 'R', N >= K >= 0.
*
* L (input) INTEGER
* The number of columns of the matrix A containing
* the meaningful part of the Householder reflectors.
* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
*
* A (input) COMPLEX*16 array, dimension
* (LDA,M) if SIDE = 'L',
* (LDA,N) if SIDE = 'R'
* The i-th row must contain the vector which defines the
* elementary reflector H(i), for i = 1,2,...,k, as returned by
* ZTZRZF in the last k rows of its array argument A.
* A is modified by the routine but restored on exit.
*
* LDA (input) INTEGER
* The leading dimension of the array A. LDA >= max(1,K).
*
* TAU (input) COMPLEX*16 array, dimension (K)
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i), as returned by ZTZRZF.
*
* C (input/output) COMPLEX*16 array, dimension (LDC,N)
* On entry, the m-by-n matrix C.
* On exit, C is overwritten by Q*C or Q'*C or C*Q' or C*Q.
*
* LDC (input) INTEGER
* The leading dimension of the array C. LDC >= max(1,M).
*
* WORK (workspace) COMPLEX*16 array, dimension
* (N) if SIDE = 'L',
* (M) if SIDE = 'R'
*
* INFO (output) INTEGER
* = 0: successful exit
* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
*
* Based on contributions by
* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
*
* =====================================================================
*
* .. Local Scalars ..
LOGICAL LEFT, NOTRAN
INTEGER I, I1, I2, I3, IC, JA, JC, MI, NI, NQ
COMPLEX*16 TAUI
* ..
* .. External Functions ..
LOGICAL LSAME
EXTERNAL LSAME
* ..
* .. External Subroutines ..
EXTERNAL XERBLA, ZLARZ
* ..
* .. Intrinsic Functions ..
INTRINSIC DCONJG, MAX
* ..
go to the page top
zunmrq
USAGE:
work, info, c = NumRu::Lapack.zunmrq( side, trans, a, tau, c, [:lwork => lwork, :usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNMRQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO )
* Purpose
* =======
*
* ZUNMRQ overwrites the general complex M-by-N matrix C with
*
* SIDE = 'L' SIDE = 'R'
* TRANS = 'N': Q * C C * Q
* TRANS = 'C': Q**H * C C * Q**H
*
* where Q is a complex unitary matrix defined as the product of k
* elementary reflectors
*
* Q = H(1)' H(2)' . . . H(k)'
*
* as returned by ZGERQF. Q is of order M if SIDE = 'L' and of order N
* if SIDE = 'R'.
*
* Arguments
* =========
*
* SIDE (input) CHARACTER*1
* = 'L': apply Q or Q**H from the Left;
* = 'R': apply Q or Q**H from the Right.
*
* TRANS (input) CHARACTER*1
* = 'N': No transpose, apply Q;
* = 'C': Transpose, apply Q**H.
*
* M (input) INTEGER
* The number of rows of the matrix C. M >= 0.
*
* N (input) INTEGER
* The number of columns of the matrix C. N >= 0.
*
* K (input) INTEGER
* The number of elementary reflectors whose product defines
* the matrix Q.
* If SIDE = 'L', M >= K >= 0;
* if SIDE = 'R', N >= K >= 0.
*
* A (input) COMPLEX*16 array, dimension
* (LDA,M) if SIDE = 'L',
* (LDA,N) if SIDE = 'R'
* The i-th row must contain the vector which defines the
* elementary reflector H(i), for i = 1,2,...,k, as returned by
* ZGERQF in the last k rows of its array argument A.
* A is modified by the routine but restored on exit.
*
* LDA (input) INTEGER
* The leading dimension of the array A. LDA >= max(1,K).
*
* TAU (input) COMPLEX*16 array, dimension (K)
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i), as returned by ZGERQF.
*
* C (input/output) COMPLEX*16 array, dimension (LDC,N)
* On entry, the M-by-N matrix C.
* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
*
* LDC (input) INTEGER
* The leading dimension of the array C. LDC >= max(1,M).
*
* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
*
* LWORK (input) INTEGER
* The dimension of the array WORK.
* If SIDE = 'L', LWORK >= max(1,N);
* if SIDE = 'R', LWORK >= max(1,M).
* For optimum performance LWORK >= N*NB if SIDE = 'L', and
* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
* blocksize.
*
* 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.
*
* INFO (output) INTEGER
* = 0: successful exit
* < 0: if INFO = -i, the i-th argument had an illegal value
*
* =====================================================================
*
go to the page top
zunmrz
USAGE:
work, info, c = NumRu::Lapack.zunmrz( side, trans, l, a, tau, c, [:lwork => lwork, :usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNMRZ( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC, WORK, LWORK, INFO )
* Purpose
* =======
*
* ZUNMRZ overwrites the general complex M-by-N matrix C with
*
* SIDE = 'L' SIDE = 'R'
* TRANS = 'N': Q * C C * Q
* TRANS = 'C': Q**H * C C * Q**H
*
* where Q is a complex unitary matrix defined as the product of k
* elementary reflectors
*
* Q = H(1) H(2) . . . H(k)
*
* as returned by ZTZRZF. Q is of order M if SIDE = 'L' and of order N
* if SIDE = 'R'.
*
* Arguments
* =========
*
* SIDE (input) CHARACTER*1
* = 'L': apply Q or Q**H from the Left;
* = 'R': apply Q or Q**H from the Right.
*
* TRANS (input) CHARACTER*1
* = 'N': No transpose, apply Q;
* = 'C': Conjugate transpose, apply Q**H.
*
* M (input) INTEGER
* The number of rows of the matrix C. M >= 0.
*
* N (input) INTEGER
* The number of columns of the matrix C. N >= 0.
*
* K (input) INTEGER
* The number of elementary reflectors whose product defines
* the matrix Q.
* If SIDE = 'L', M >= K >= 0;
* if SIDE = 'R', N >= K >= 0.
*
* L (input) INTEGER
* The number of columns of the matrix A containing
* the meaningful part of the Householder reflectors.
* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
*
* A (input) COMPLEX*16 array, dimension
* (LDA,M) if SIDE = 'L',
* (LDA,N) if SIDE = 'R'
* The i-th row must contain the vector which defines the
* elementary reflector H(i), for i = 1,2,...,k, as returned by
* ZTZRZF in the last k rows of its array argument A.
* A is modified by the routine but restored on exit.
*
* LDA (input) INTEGER
* The leading dimension of the array A. LDA >= max(1,K).
*
* TAU (input) COMPLEX*16 array, dimension (K)
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i), as returned by ZTZRZF.
*
* C (input/output) COMPLEX*16 array, dimension (LDC,N)
* On entry, the M-by-N matrix C.
* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
*
* LDC (input) INTEGER
* The leading dimension of the array C. LDC >= max(1,M).
*
* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
*
* LWORK (input) INTEGER
* The dimension of the array WORK.
* If SIDE = 'L', LWORK >= max(1,N);
* if SIDE = 'R', LWORK >= max(1,M).
* For optimum performance LWORK >= N*NB if SIDE = 'L', and
* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
* blocksize.
*
* 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.
*
* INFO (output) INTEGER
* = 0: successful exit
* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
*
* Based on contributions by
* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
*
* =====================================================================
*
go to the page top
zunmtr
USAGE:
work, info, c = NumRu::Lapack.zunmtr( side, uplo, trans, a, tau, c, [:lwork => lwork, :usage => usage, :help => help])
FORTRAN MANUAL
SUBROUTINE ZUNMTR( SIDE, UPLO, TRANS, M, N, A, LDA, TAU, C, LDC, WORK, LWORK, INFO )
* Purpose
* =======
*
* ZUNMTR overwrites the general complex M-by-N matrix C with
*
* SIDE = 'L' SIDE = 'R'
* TRANS = 'N': Q * C C * Q
* TRANS = 'C': Q**H * C C * Q**H
*
* where Q is a complex unitary matrix of order nq, with nq = m if
* SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
* nq-1 elementary reflectors, as returned by ZHETRD:
*
* if UPLO = 'U', Q = H(nq-1) . . . H(2) H(1);
*
* if UPLO = 'L', Q = H(1) H(2) . . . H(nq-1).
*
* Arguments
* =========
*
* SIDE (input) CHARACTER*1
* = 'L': apply Q or Q**H from the Left;
* = 'R': apply Q or Q**H from the Right.
*
* UPLO (input) CHARACTER*1
* = 'U': Upper triangle of A contains elementary reflectors
* from ZHETRD;
* = 'L': Lower triangle of A contains elementary reflectors
* from ZHETRD.
*
* TRANS (input) CHARACTER*1
* = 'N': No transpose, apply Q;
* = 'C': Conjugate transpose, apply Q**H.
*
* M (input) INTEGER
* The number of rows of the matrix C. M >= 0.
*
* N (input) INTEGER
* The number of columns of the matrix C. N >= 0.
*
* A (input) COMPLEX*16 array, dimension
* (LDA,M) if SIDE = 'L'
* (LDA,N) if SIDE = 'R'
* The vectors which define the elementary reflectors, as
* returned by ZHETRD.
*
* LDA (input) INTEGER
* The leading dimension of the array A.
* LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
*
* TAU (input) COMPLEX*16 array, dimension
* (M-1) if SIDE = 'L'
* (N-1) if SIDE = 'R'
* TAU(i) must contain the scalar factor of the elementary
* reflector H(i), as returned by ZHETRD.
*
* C (input/output) COMPLEX*16 array, dimension (LDC,N)
* On entry, the M-by-N matrix C.
* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
*
* LDC (input) INTEGER
* The leading dimension of the array C. LDC >= max(1,M).
*
* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
*
* LWORK (input) INTEGER
* The dimension of the array WORK.
* If SIDE = 'L', LWORK >= max(1,N);
* if SIDE = 'R', LWORK >= max(1,M).
* For optimum performance LWORK >= N*NB if SIDE = 'L', and
* LWORK >=M*NB if SIDE = 'R', where NB is the optimal
* blocksize.
*
* 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.
*
* INFO (output) INTEGER
* = 0: successful exit
* < 0: if INFO = -i, the i-th argument had an illegal value
*
* =====================================================================
*
* .. Local Scalars ..
LOGICAL LEFT, LQUERY, UPPER
INTEGER I1, I2, IINFO, LWKOPT, MI, NB, NI, NQ, NW
* ..
* .. External Functions ..
LOGICAL LSAME
INTEGER ILAENV
EXTERNAL LSAME, ILAENV
* ..
* .. External Subroutines ..
EXTERNAL XERBLA, ZUNMQL, ZUNMQR
* ..
* .. Intrinsic Functions ..
INTRINSIC MAX
* ..
go to the page top
back to matrix types
back to data types