LAPACK 3.12.1
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
dlatzm.f
Go to the documentation of this file.
1*> \brief \b DLATZM
2*
3* =========== DOCUMENTATION ===========
4*
5* Online html documentation available at
6* http://www.netlib.org/lapack/explore-html/
7*
8*> Download DLATZM + dependencies
9*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlatzm.f">
10*> [TGZ]</a>
11*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlatzm.f">
12*> [ZIP]</a>
13*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlatzm.f">
14*> [TXT]</a>
15*
16* Definition:
17* ===========
18*
19* SUBROUTINE DLATZM( SIDE, M, N, V, INCV, TAU, C1, C2, LDC, WORK )
20*
21* .. Scalar Arguments ..
22* CHARACTER SIDE
23* INTEGER INCV, LDC, M, N
24* DOUBLE PRECISION TAU
25* ..
26* .. Array Arguments ..
27* DOUBLE PRECISION 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 DORMRZ.
37*>
38*> DLATZM applies a Householder matrix generated by DTZRQF to a matrix.
39*>
40*> Let P = I - tau*u*u**T, 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 DOUBLE PRECISION 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 DOUBLE PRECISION
97*> The value tau in the representation of P.
98*> \endverbatim
99*>
100*> \param[in,out] C1
101*> \verbatim
102*> C1 is DOUBLE PRECISION 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 DOUBLE PRECISION 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. LDC >= (1,M).
128*> \endverbatim
129*>
130*> \param[out] WORK
131*> \verbatim
132*> WORK is DOUBLE PRECISION array, dimension
133*> (N) if SIDE = 'L'
134*> (M) if SIDE = 'R'
135*> \endverbatim
136*
137* Authors:
138* ========
139*
140*> \author Univ. of Tennessee
141*> \author Univ. of California Berkeley
142*> \author Univ. of Colorado Denver
143*> \author NAG Ltd.
144*
145*> \ingroup doubleOTHERcomputational
146*
147* =====================================================================
148 SUBROUTINE dlatzm( SIDE, M, N, V, INCV, TAU, C1, C2, LDC,
149 $ WORK )
150*
151* -- LAPACK computational routine --
152* -- LAPACK is a software package provided by Univ. of Tennessee, --
153* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
154*
155* .. Scalar Arguments ..
156 CHARACTER SIDE
157 INTEGER INCV, LDC, M, N
158 DOUBLE PRECISION TAU
159* ..
160* .. Array Arguments ..
161 DOUBLE PRECISION C1( LDC, * ), C2( LDC, * ), V( * ), WORK( * )
162* ..
163*
164* =====================================================================
165*
166* .. Parameters ..
167 DOUBLE PRECISION ONE, ZERO
168 parameter( one = 1.0d+0, zero = 0.0d+0 )
169* ..
170* .. External Subroutines ..
171 EXTERNAL daxpy, dcopy, dgemv, dger
172* ..
173* .. External Functions ..
174 LOGICAL LSAME
175 EXTERNAL lsame
176* ..
177* .. Intrinsic Functions ..
178 INTRINSIC min
179* ..
180* .. Executable Statements ..
181*
182 IF( ( min( m, n ).EQ.0 ) .OR. ( tau.EQ.zero ) )
183 $ RETURN
184*
185 IF( lsame( side, 'L' ) ) THEN
186*
187* w := (C1 + v**T * C2)**T
188*
189 CALL dcopy( n, c1, ldc, work, 1 )
190 CALL dgemv( 'Transpose', m-1, n, one, c2, ldc, v, incv, one,
191 $ work, 1 )
192*
193* [ C1 ] := [ C1 ] - tau* [ 1 ] * w**T
194* [ C2 ] [ C2 ] [ v ]
195*
196 CALL daxpy( n, -tau, work, 1, c1, ldc )
197 CALL dger( m-1, n, -tau, v, incv, work, 1, c2, ldc )
198*
199 ELSE IF( lsame( side, 'R' ) ) THEN
200*
201* w := C1 + C2 * v
202*
203 CALL dcopy( m, c1, 1, work, 1 )
204 CALL dgemv( 'No transpose', m, n-1, one, c2, ldc, v, incv,
205 $ one, work, 1 )
206*
207* [ C1, C2 ] := [ C1, C2 ] - tau* w * [ 1 , v**T]
208*
209 CALL daxpy( m, -tau, work, 1, c1, 1 )
210 CALL dger( m, n-1, -tau, work, 1, v, incv, c2, ldc )
211 END IF
212*
213 RETURN
214*
215* End of DLATZM
216*
217 END
subroutine dlatzm(side, m, n, v, incv, tau, c1, c2, ldc, work)
DLATZM
Definition dlatzm.f:150
subroutine daxpy(n, da, dx, incx, dy, incy)
DAXPY
Definition daxpy.f:89
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
Definition dcopy.f:82
subroutine dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
DGEMV
Definition dgemv.f:158
subroutine dger(m, n, alpha, x, incx, y, incy, a, lda)
DGER
Definition dger.f:130