LAPACK 3.12.1
LAPACK: Linear Algebra PACKage
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
zlatzm.f
Go to the documentation of this file.
1*> \brief \b ZLATZM
2*
3* =========== DOCUMENTATION ===========
4*
5* Online html documentation available at
6* http://www.netlib.org/lapack/explore-html/
7*
8*> Download ZLATZM + dependencies
9*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlatzm.f">
10*> [TGZ]</a>
11*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlatzm.f">
12*> [ZIP]</a>
13*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlatzm.f">
14*> [TXT]</a>
15*
16* Definition:
17* ===========
18*
19* SUBROUTINE ZLATZM( SIDE, M, N, V, INCV, TAU, C1, C2, LDC, WORK )
20*
21* .. Scalar Arguments ..
22* CHARACTER SIDE
23* INTEGER INCV, LDC, M, N
24* COMPLEX*16 TAU
25* ..
26* .. Array Arguments ..
27* COMPLEX*16 C1( LDC, * ), C2( LDC, * ), V( * ), WORK( * )
28* ..
29*
30*
31*> \par Purpose:
32* =============
33*>
34*> \verbatim
35*>
36*> This routine is deprecated and has been replaced by routine ZUNMRZ.
37*>
38*> ZLATZM applies a Householder matrix generated by ZTZRQF to a matrix.
39*>
40*> Let P = I - tau*u*u**H, u = ( 1 ),
41*> ( v )
42*> where v is an (m-1) vector if SIDE = 'L', or a (n-1) vector if
43*> SIDE = 'R'.
44*>
45*> If SIDE equals 'L', let
46*> C = [ C1 ] 1
47*> [ C2 ] m-1
48*> n
49*> Then C is overwritten by P*C.
50*>
51*> If SIDE equals 'R', let
52*> C = [ C1, C2 ] m
53*> 1 n-1
54*> Then C is overwritten by C*P.
55*> \endverbatim
56*
57* Arguments:
58* ==========
59*
60*> \param[in] SIDE
61*> \verbatim
62*> SIDE is CHARACTER*1
63*> = 'L': form P * C
64*> = 'R': form C * P
65*> \endverbatim
66*>
67*> \param[in] M
68*> \verbatim
69*> M is INTEGER
70*> The number of rows of the matrix C.
71*> \endverbatim
72*>
73*> \param[in] N
74*> \verbatim
75*> N is INTEGER
76*> The number of columns of the matrix C.
77*> \endverbatim
78*>
79*> \param[in] V
80*> \verbatim
81*> V is COMPLEX*16 array, dimension
82*> (1 + (M-1)*abs(INCV)) if SIDE = 'L'
83*> (1 + (N-1)*abs(INCV)) if SIDE = 'R'
84*> The vector v in the representation of P. V is not used
85*> if TAU = 0.
86*> \endverbatim
87*>
88*> \param[in] INCV
89*> \verbatim
90*> INCV is INTEGER
91*> The increment between elements of v. INCV <> 0
92*> \endverbatim
93*>
94*> \param[in] TAU
95*> \verbatim
96*> TAU is COMPLEX*16
97*> The value tau in the representation of P.
98*> \endverbatim
99*>
100*> \param[in,out] C1
101*> \verbatim
102*> C1 is COMPLEX*16 array, dimension
103*> (LDC,N) if SIDE = 'L'
104*> (M,1) if SIDE = 'R'
105*> On entry, the n-vector C1 if SIDE = 'L', or the m-vector C1
106*> if SIDE = 'R'.
107*>
108*> On exit, the first row of P*C if SIDE = 'L', or the first
109*> column of C*P if SIDE = 'R'.
110*> \endverbatim
111*>
112*> \param[in,out] C2
113*> \verbatim
114*> C2 is COMPLEX*16 array, dimension
115*> (LDC, N) if SIDE = 'L'
116*> (LDC, N-1) if SIDE = 'R'
117*> On entry, the (m - 1) x n matrix C2 if SIDE = 'L', or the
118*> m x (n - 1) matrix C2 if SIDE = 'R'.
119*>
120*> On exit, rows 2:m of P*C if SIDE = 'L', or columns 2:m of C*P
121*> if SIDE = 'R'.
122*> \endverbatim
123*>
124*> \param[in] LDC
125*> \verbatim
126*> LDC is INTEGER
127*> The leading dimension of the arrays C1 and C2.
128*> LDC >= max(1,M).
129*> \endverbatim
130*>
131*> \param[out] WORK
132*> \verbatim
133*> WORK is COMPLEX*16 array, dimension
134*> (N) if SIDE = 'L'
135*> (M) if SIDE = 'R'
136*> \endverbatim
137*
138* Authors:
139* ========
140*
141*> \author Univ. of Tennessee
142*> \author Univ. of California Berkeley
143*> \author Univ. of Colorado Denver
144*> \author NAG Ltd.
145*
146*> \ingroup latzm
147*
148* =====================================================================
149 SUBROUTINE zlatzm( SIDE, M, N, V, INCV, TAU, C1, C2, LDC,
150 $ WORK )
151*
152* -- LAPACK computational routine --
153* -- LAPACK is a software package provided by Univ. of Tennessee, --
154* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
155*
156* .. Scalar Arguments ..
157 CHARACTER SIDE
158 INTEGER INCV, LDC, M, N
159 COMPLEX*16 TAU
160* ..
161* .. Array Arguments ..
162 COMPLEX*16 C1( LDC, * ), C2( LDC, * ), V( * ), WORK( * )
163* ..
164*
165* =====================================================================
166*
167* .. Parameters ..
168 COMPLEX*16 ONE, ZERO
169 parameter( one = ( 1.0d+0, 0.0d+0 ),
170 $ zero = ( 0.0d+0, 0.0d+0 ) )
171* ..
172* .. External Subroutines ..
173 EXTERNAL zaxpy, zcopy, zgemv, zgerc, zgeru, zlacgv
174* ..
175* .. External Functions ..
176 LOGICAL LSAME
177 EXTERNAL lsame
178* ..
179* .. Intrinsic Functions ..
180 INTRINSIC min
181* ..
182* .. Executable Statements ..
183*
184 IF( ( min( m, n ).EQ.0 ) .OR. ( tau.EQ.zero ) )
185 $ RETURN
186*
187 IF( lsame( side, 'L' ) ) THEN
188*
189* w := ( C1 + v**H * C2 )**H
190*
191 CALL zcopy( n, c1, ldc, work, 1 )
192 CALL zlacgv( n, work, 1 )
193 CALL zgemv( 'Conjugate transpose', m-1, n, one, c2, ldc, v,
194 $ incv, one, work, 1 )
195*
196* [ C1 ] := [ C1 ] - tau* [ 1 ] * w**H
197* [ C2 ] [ C2 ] [ v ]
198*
199 CALL zlacgv( n, work, 1 )
200 CALL zaxpy( n, -tau, work, 1, c1, ldc )
201 CALL zgeru( m-1, n, -tau, v, incv, work, 1, c2, ldc )
202*
203 ELSE IF( lsame( side, 'R' ) ) THEN
204*
205* w := C1 + C2 * v
206*
207 CALL zcopy( m, c1, 1, work, 1 )
208 CALL zgemv( 'No transpose', m, n-1, one, c2, ldc, v, incv,
209 $ one, work, 1 )
210*
211* [ C1, C2 ] := [ C1, C2 ] - tau* w * [ 1 , v**H]
212*
213 CALL zaxpy( m, -tau, work, 1, c1, 1 )
214 CALL zgerc( m, n-1, -tau, work, 1, v, incv, c2, ldc )
215 END IF
216*
217 RETURN
218*
219* End of ZLATZM
220*
221 END
subroutine zaxpy(n, za, zx, incx, zy, incy)
ZAXPY
Definition zaxpy.f:88
subroutine zcopy(n, zx, incx, zy, incy)
ZCOPY
Definition zcopy.f:81
subroutine zgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
ZGEMV
Definition zgemv.f:160
subroutine zgeru(m, n, alpha, x, incx, y, incy, a, lda)
ZGERU
Definition zgeru.f:130
subroutine zgerc(m, n, alpha, x, incx, y, incy, a, lda)
ZGERC
Definition zgerc.f:130
subroutine zlacgv(n, x, incx)
ZLACGV conjugates a complex vector.
Definition zlacgv.f:72
subroutine zlatzm(side, m, n, v, incv, tau, c1, c2, ldc, work)
ZLATZM
Definition zlatzm.f:151