LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ clarfy()

subroutine clarfy ( character  uplo,
integer  n,
complex, dimension( * )  v,
integer  incv,
complex  tau,
complex, dimension( ldc, * )  c,
integer  ldc,
complex, dimension( * )  work 
)

CLARFY

Purpose:
 CLARFY applies an elementary reflector, or Householder matrix, H,
 to an n x n Hermitian matrix C, from both the left and the right.

 H is represented in the form

    H = I - tau * v * v'

 where  tau  is a scalar and  v  is a vector.

 If  tau  is  zero, then  H  is taken to be the unit matrix.
Parameters
[in]UPLO
          UPLO is CHARACTER*1
          Specifies whether the upper or lower triangular part of the
          Hermitian matrix C is stored.
          = 'U':  Upper triangle
          = 'L':  Lower triangle
[in]N
          N is INTEGER
          The number of rows and columns of the matrix C.  N >= 0.
[in]V
          V is COMPLEX array, dimension
                  (1 + (N-1)*abs(INCV))
          The vector v as described above.
[in]INCV
          INCV is INTEGER
          The increment between successive elements of v.  INCV must
          not be zero.
[in]TAU
          TAU is COMPLEX
          The value tau as described above.
[in,out]C
          C is COMPLEX array, dimension (LDC, N)
          On entry, the matrix C.
          On exit, C is overwritten by H * C * H'.
[in]LDC
          LDC is INTEGER
          The leading dimension of the array C.  LDC >= max( 1, N ).
[out]WORK
          WORK is COMPLEX array, dimension (N)
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 107 of file clarfy.f.

108*
109* -- LAPACK test routine --
110* -- LAPACK is a software package provided by Univ. of Tennessee, --
111* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
112*
113* .. Scalar Arguments ..
114 CHARACTER UPLO
115 INTEGER INCV, LDC, N
116 COMPLEX TAU
117* ..
118* .. Array Arguments ..
119 COMPLEX C( LDC, * ), V( * ), WORK( * )
120* ..
121*
122* =====================================================================
123*
124* .. Parameters ..
125 COMPLEX ONE, ZERO, HALF
126 parameter( one = ( 1.0e+0, 0.0e+0 ),
127 $ zero = ( 0.0e+0, 0.0e+0 ),
128 $ half = ( 0.5e+0, 0.0e+0 ) )
129* ..
130* .. Local Scalars ..
131 COMPLEX ALPHA
132* ..
133* .. External Subroutines ..
134 EXTERNAL caxpy, chemv, cher2
135* ..
136* .. External Functions ..
137 COMPLEX CDOTC
138 EXTERNAL cdotc
139* ..
140* .. Executable Statements ..
141*
142 IF( tau.EQ.zero )
143 $ RETURN
144*
145* Form w:= C * v
146*
147 CALL chemv( uplo, n, one, c, ldc, v, incv, zero, work, 1 )
148*
149 alpha = -half*tau*cdotc( n, work, 1, v, incv )
150 CALL caxpy( n, alpha, v, incv, work, 1 )
151*
152* C := C - v * w' - w * v'
153*
154 CALL cher2( uplo, n, -tau, v, incv, work, 1, c, ldc )
155*
156 RETURN
157*
158* End of CLARFY
159*
subroutine caxpy(n, ca, cx, incx, cy, incy)
CAXPY
Definition caxpy.f:88
complex function cdotc(n, cx, incx, cy, incy)
CDOTC
Definition cdotc.f:83
subroutine chemv(uplo, n, alpha, a, lda, x, incx, beta, y, incy)
CHEMV
Definition chemv.f:154
subroutine cher2(uplo, n, alpha, x, incx, y, incy, a, lda)
CHER2
Definition cher2.f:150
Here is the call graph for this function:
Here is the caller graph for this function: