 LAPACK 3.11.0 LAPACK: Linear Algebra PACKage
Searching...
No Matches

## ◆ ztplqt2()

 subroutine ztplqt2 ( integer M, integer N, integer L, complex*16, dimension( lda, * ) A, integer LDA, complex*16, dimension( ldb, * ) B, integer LDB, complex*16, dimension( ldt, * ) T, integer LDT, integer INFO )

ZTPLQT2 computes a LQ factorization of a real or complex "triangular-pentagonal" matrix, which is composed of a triangular block and a pentagonal block, using the compact WY representation for Q.

Purpose:
``` ZTPLQT2 computes a LQ a factorization of a complex "triangular-pentagonal"
matrix C, which is composed of a triangular block A and pentagonal block B,
using the compact WY representation for Q.```
Parameters
 [in] M ``` M is INTEGER The total number of rows of the matrix B. M >= 0.``` [in] N ``` N is INTEGER The number of columns of the matrix B, and the order of the triangular matrix A. N >= 0.``` [in] L ``` L is INTEGER The number of rows of the lower trapezoidal part of B. MIN(M,N) >= L >= 0. See Further Details.``` [in,out] A ``` A is COMPLEX*16 array, dimension (LDA,M) On entry, the lower triangular M-by-M matrix A. On exit, the elements on and below the diagonal of the array contain the lower triangular matrix L.``` [in] LDA ``` LDA is INTEGER The leading dimension of the array A. LDA >= max(1,M).``` [in,out] B ``` B is COMPLEX*16 array, dimension (LDB,N) On entry, the pentagonal M-by-N matrix B. The first N-L columns are rectangular, and the last L columns are lower trapezoidal. On exit, B contains the pentagonal matrix V. See Further Details.``` [in] LDB ``` LDB is INTEGER The leading dimension of the array B. LDB >= max(1,M).``` [out] T ``` T is COMPLEX*16 array, dimension (LDT,M) The N-by-N upper triangular factor T of the block reflector. See Further Details.``` [in] LDT ``` LDT is INTEGER The leading dimension of the array T. LDT >= max(1,M)``` [out] INFO ``` INFO is INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value```
Further Details:
```  The input matrix C is a M-by-(M+N) matrix

C = [ A ][ B ]

where A is an lower triangular M-by-M matrix, and B is M-by-N pentagonal
matrix consisting of a M-by-(N-L) rectangular matrix B1 left of a M-by-L
upper trapezoidal matrix B2:

B = [ B1 ][ B2 ]
[ B1 ]  <-     M-by-(N-L) rectangular
[ B2 ]  <-     M-by-L lower trapezoidal.

The lower trapezoidal matrix B2 consists of the first L columns of a
N-by-N lower triangular matrix, where 0 <= L <= MIN(M,N).  If L=0,
B is rectangular M-by-N; if M=L=N, B is lower triangular.

The matrix W stores the elementary reflectors H(i) in the i-th row
above the diagonal (of A) in the M-by-(M+N) input matrix C

C = [ A ][ B ]
[ A ]  <- lower triangular M-by-M
[ B ]  <- M-by-N pentagonal

so that W can be represented as

W = [ I ][ V ]
[ I ]  <- identity, M-by-M
[ V ]  <- M-by-N, same form as B.

Thus, all of information needed for W is contained on exit in B, which
we call V above.  Note that V has the same form as B; that is,

W = [ V1 ][ V2 ]
[ V1 ] <-     M-by-(N-L) rectangular
[ V2 ] <-     M-by-L lower trapezoidal.

The rows of V represent the vectors which define the H(i)'s.
The (M+N)-by-(M+N) block reflector H is then given by

H = I - W**T * T * W

where W^H is the conjugate transpose of W and T is the upper triangular
factor of the block reflector.```

Definition at line 176 of file ztplqt2.f.

177*
178* -- LAPACK computational routine --
179* -- LAPACK is a software package provided by Univ. of Tennessee, --
180* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
181*
182* .. Scalar Arguments ..
183 INTEGER INFO, LDA, LDB, LDT, N, M, L
184* ..
185* .. Array Arguments ..
186 COMPLEX*16 A( LDA, * ), B( LDB, * ), T( LDT, * )
187* ..
188*
189* =====================================================================
190*
191* .. Parameters ..
192 COMPLEX*16 ONE, ZERO
193 parameter( zero = ( 0.0d+0, 0.0d+0 ),one = ( 1.0d+0, 0.0d+0 ) )
194* ..
195* .. Local Scalars ..
196 INTEGER I, J, P, MP, NP
197 COMPLEX*16 ALPHA
198* ..
199* .. External Subroutines ..
200 EXTERNAL zlarfg, zgemv, zgerc, ztrmv, xerbla
201* ..
202* .. Intrinsic Functions ..
203 INTRINSIC max, min
204* ..
205* .. Executable Statements ..
206*
207* Test the input arguments
208*
209 info = 0
210 IF( m.LT.0 ) THEN
211 info = -1
212 ELSE IF( n.LT.0 ) THEN
213 info = -2
214 ELSE IF( l.LT.0 .OR. l.GT.min(m,n) ) THEN
215 info = -3
216 ELSE IF( lda.LT.max( 1, m ) ) THEN
217 info = -5
218 ELSE IF( ldb.LT.max( 1, m ) ) THEN
219 info = -7
220 ELSE IF( ldt.LT.max( 1, m ) ) THEN
221 info = -9
222 END IF
223 IF( info.NE.0 ) THEN
224 CALL xerbla( 'ZTPLQT2', -info )
225 RETURN
226 END IF
227*
228* Quick return if possible
229*
230 IF( n.EQ.0 .OR. m.EQ.0 ) RETURN
231*
232 DO i = 1, m
233*
234* Generate elementary reflector H(I) to annihilate B(I,:)
235*
236 p = n-l+min( l, i )
237 CALL zlarfg( p+1, a( i, i ), b( i, 1 ), ldb, t( 1, i ) )
238 t(1,i)=conjg(t(1,i))
239 IF( i.LT.m ) THEN
240 DO j = 1, p
241 b( i, j ) = conjg(b(i,j))
242 END DO
243*
244* W(M-I:1) := C(I+1:M,I:N) * C(I,I:N) [use W = T(M,:)]
245*
246 DO j = 1, m-i
247 t( m, j ) = (a( i+j, i ))
248 END DO
249 CALL zgemv( 'N', m-i, p, one, b( i+1, 1 ), ldb,
250 \$ b( i, 1 ), ldb, one, t( m, 1 ), ldt )
251*
252* C(I+1:M,I:N) = C(I+1:M,I:N) + alpha * C(I,I:N)*W(M-1:1)^H
253*
254 alpha = -(t( 1, i ))
255 DO j = 1, m-i
256 a( i+j, i ) = a( i+j, i ) + alpha*(t( m, j ))
257 END DO
258 CALL zgerc( m-i, p, (alpha), t( m, 1 ), ldt,
259 \$ b( i, 1 ), ldb, b( i+1, 1 ), ldb )
260 DO j = 1, p
261 b( i, j ) = conjg(b(i,j))
262 END DO
263 END IF
264 END DO
265*
266 DO i = 2, m
267*
268* T(I,1:I-1) := C(I:I-1,1:N)**H * (alpha * C(I,I:N))
269*
270 alpha = -(t( 1, i ))
271 DO j = 1, i-1
272 t( i, j ) = zero
273 END DO
274 p = min( i-1, l )
275 np = min( n-l+1, n )
276 mp = min( p+1, m )
277 DO j = 1, n-l+p
278 b(i,j)=conjg(b(i,j))
279 END DO
280*
281* Triangular part of B2
282*
283 DO j = 1, p
284 t( i, j ) = (alpha*b( i, n-l+j ))
285 END DO
286 CALL ztrmv( 'L', 'N', 'N', p, b( 1, np ), ldb,
287 \$ t( i, 1 ), ldt )
288*
289* Rectangular part of B2
290*
291 CALL zgemv( 'N', i-1-p, l, alpha, b( mp, np ), ldb,
292 \$ b( i, np ), ldb, zero, t( i,mp ), ldt )
293*
294* B1
295
296*
297 CALL zgemv( 'N', i-1, n-l, alpha, b, ldb, b( i, 1 ), ldb,
298 \$ one, t( i, 1 ), ldt )
299*
300
301*
302* T(1:I-1,I) := T(1:I-1,1:I-1) * T(I,1:I-1)
303*
304 DO j = 1, i-1
305 t(i,j)=conjg(t(i,j))
306 END DO
307 CALL ztrmv( 'L', 'C', 'N', i-1, t, ldt, t( i, 1 ), ldt )
308 DO j = 1, i-1
309 t(i,j)=conjg(t(i,j))
310 END DO
311 DO j = 1, n-l+p
312 b(i,j)=conjg(b(i,j))
313 END DO
314*
315* T(I,I) = tau(I)
316*
317 t( i, i ) = t( 1, i )
318 t( 1, i ) = zero
319 END DO
320 DO i=1,m
321 DO j= i+1,m
322 t(i,j)=(t(j,i))
323 t(j,i)=zero
324 END DO
325 END DO
326
327*
328* End of ZTPLQT2
329*
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:60
subroutine ztrmv(UPLO, TRANS, DIAG, N, A, LDA, X, INCX)
ZTRMV
Definition: ztrmv.f:147
subroutine zgerc(M, N, ALPHA, X, INCX, Y, INCY, A, LDA)
ZGERC
Definition: zgerc.f:130
subroutine zgemv(TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY)
ZGEMV
Definition: zgemv.f:158
subroutine zlarfg(N, ALPHA, X, INCX, TAU)
ZLARFG generates an elementary reflector (Householder matrix).
Definition: zlarfg.f:106
Here is the call graph for this function:
Here is the caller graph for this function: