LAPACK  3.8.0 LAPACK: Linear Algebra PACKage

## ◆ zgerqs()

 subroutine zgerqs ( integer M, integer N, integer NRHS, complex*16, dimension( lda, * ) A, integer LDA, complex*16, dimension( * ) TAU, complex*16, dimension( ldb, * ) B, integer LDB, complex*16, dimension( lwork ) WORK, integer LWORK, integer INFO )

ZGERQS

Purpose:
``` Compute a minimum-norm solution
min || A*X - B ||
using the RQ factorization
A = R*Q
computed by ZGERQF.```
Parameters
 [in] M ``` M is INTEGER The number of rows of the matrix A. M >= 0.``` [in] N ``` N is INTEGER The number of columns of the matrix A. N >= M >= 0.``` [in] NRHS ``` NRHS is INTEGER The number of columns of B. NRHS >= 0.``` [in] A ``` A is COMPLEX*16 array, dimension (LDA,N) Details of the RQ factorization of the original matrix A as returned by ZGERQF.``` [in] LDA ``` LDA is INTEGER The leading dimension of the array A. LDA >= M.``` [in] TAU ``` TAU is COMPLEX*16 array, dimension (M) Details of the orthogonal matrix Q.``` [in,out] B ``` B is COMPLEX*16 array, dimension (LDB,NRHS) On entry, the right hand side vectors for the linear system. On exit, the solution vectors X. Each solution vector is contained in rows 1:N of a column of B.``` [in] LDB ``` LDB is INTEGER The leading dimension of the array B. LDB >= max(1,N).``` [out] WORK ` WORK is COMPLEX*16 array, dimension (LWORK)` [in] LWORK ``` LWORK is INTEGER The length of the array WORK. LWORK must be at least NRHS, and should be at least NRHS*NB, where NB is the block size for this environment.``` [out] INFO ``` INFO is INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value```
Date
December 2016

Definition at line 124 of file zgerqs.f.

124 *
125 * -- LAPACK test routine (version 3.7.0) --
126 * -- LAPACK is a software package provided by Univ. of Tennessee, --
127 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
128 * December 2016
129 *
130 * .. Scalar Arguments ..
131  INTEGER info, lda, ldb, lwork, m, n, nrhs
132 * ..
133 * .. Array Arguments ..
134  COMPLEX*16 a( lda, * ), b( ldb, * ), tau( * ),
135  \$ work( lwork )
136 * ..
137 *
138 * =====================================================================
139 *
140 * .. Parameters ..
141  COMPLEX*16 czero, cone
142  parameter( czero = ( 0.0d+0, 0.0d+0 ),
143  \$ cone = ( 1.0d+0, 0.0d+0 ) )
144 * ..
145 * .. External Subroutines ..
146  EXTERNAL xerbla, zlaset, ztrsm, zunmrq
147 * ..
148 * .. Intrinsic Functions ..
149  INTRINSIC max
150 * ..
151 * .. Executable Statements ..
152 *
153 * Test the input parameters.
154 *
155  info = 0
156  IF( m.LT.0 ) THEN
157  info = -1
158  ELSE IF( n.LT.0 .OR. m.GT.n ) THEN
159  info = -2
160  ELSE IF( nrhs.LT.0 ) THEN
161  info = -3
162  ELSE IF( lda.LT.max( 1, m ) ) THEN
163  info = -5
164  ELSE IF( ldb.LT.max( 1, n ) ) THEN
165  info = -8
166  ELSE IF( lwork.LT.1 .OR. lwork.LT.nrhs .AND. m.GT.0 .AND. n.GT.0 )
167  \$ THEN
168  info = -10
169  END IF
170  IF( info.NE.0 ) THEN
171  CALL xerbla( 'ZGERQS', -info )
172  RETURN
173  END IF
174 *
175 * Quick return if possible
176 *
177  IF( n.EQ.0 .OR. nrhs.EQ.0 .OR. m.EQ.0 )
178  \$ RETURN
179 *
180 * Solve R*X = B(n-m+1:n,:)
181 *
182  CALL ztrsm( 'Left', 'Upper', 'No transpose', 'Non-unit', m, nrhs,
183  \$ cone, a( 1, n-m+1 ), lda, b( n-m+1, 1 ), ldb )
184 *
185 * Set B(1:n-m,:) to zero
186 *
187  CALL zlaset( 'Full', n-m, nrhs, czero, czero, b, ldb )
188 *
189 * B := Q' * B
190 *
191  CALL zunmrq( 'Left', 'Conjugate transpose', n, nrhs, m, a, lda,
192  \$ tau, b, ldb, work, lwork, info )
193 *
194  RETURN
195 *
196 * End of ZGERQS
197 *
subroutine zunmrq(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
ZUNMRQ
Definition: zunmrq.f:169
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
subroutine zlaset(UPLO, M, N, ALPHA, BETA, A, LDA)
ZLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values...
Definition: zlaset.f:108
subroutine ztrsm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
ZTRSM
Definition: ztrsm.f:182
Here is the call graph for this function:
Here is the caller graph for this function: