1 *> \brief \b CLAR2V applies a vector of plane rotations with real cosines and complex sines from both sides to a sequence of 2-by-2 symmetric/Hermitian matrices.
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download CLAR2V + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/clar2v.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/clar2v.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/clar2v.f">
21 * SUBROUTINE CLAR2V( N, X, Y, Z, INCX, C, S, INCC )
23 * .. Scalar Arguments ..
24 * INTEGER INCC, INCX, N
26 * .. Array Arguments ..
28 * COMPLEX S( * ), X( * ), Y( * ), Z( * )
37 *> CLAR2V applies a vector of complex plane rotations with real cosines
38 *> from both sides to a sequence of 2-by-2 complex Hermitian matrices,
39 *> defined by the elements of the vectors x, y and z. For i = 1,2,...,n
42 *> ( conjg(z(i)) y(i) )
44 *> ( c(i) conjg(s(i)) ) ( x(i) z(i) ) ( c(i) -conjg(s(i)) )
45 *> ( -s(i) c(i) ) ( conjg(z(i)) y(i) ) ( s(i) c(i) )
54 *> The number of plane rotations to be applied.
59 *> X is COMPLEX array, dimension (1+(N-1)*INCX)
60 *> The vector x; the elements of x are assumed to be real.
65 *> Y is COMPLEX array, dimension (1+(N-1)*INCX)
66 *> The vector y; the elements of y are assumed to be real.
71 *> Z is COMPLEX array, dimension (1+(N-1)*INCX)
78 *> The increment between elements of X, Y and Z. INCX > 0.
83 *> C is REAL array, dimension (1+(N-1)*INCC)
84 *> The cosines of the plane rotations.
89 *> S is COMPLEX array, dimension (1+(N-1)*INCC)
90 *> The sines of the plane rotations.
96 *> The increment between elements of C and S. INCC > 0.
102 *> \author Univ. of Tennessee
103 *> \author Univ. of California Berkeley
104 *> \author Univ. of Colorado Denver
107 *> \date September 2012
109 *> \ingroup complexOTHERauxiliary
111 * =====================================================================
112 SUBROUTINE CLAR2V( N, X, Y, Z, INCX, C, S, INCC )
114 * -- LAPACK auxiliary routine (version 3.4.2) --
115 * -- LAPACK is a software package provided by Univ. of Tennessee, --
116 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
119 * .. Scalar Arguments ..
120 INTEGER INCC, INCX, N
122 * .. Array Arguments ..
124 COMPLEX S( * ), X( * ), Y( * ), Z( * )
127 * =====================================================================
129 * .. Local Scalars ..
131 REAL CI, SII, SIR, T1I, T1R, T5, T6, XI, YI, ZII,
133 COMPLEX SI, T2, T3, T4, ZI
135 * .. Intrinsic Functions ..
136 INTRINSIC AIMAG, CMPLX, CONJG, REAL
138 * .. Executable Statements ..
152 T1R = SIR*ZIR - SII*ZII
153 T1I = SIR*ZII + SII*ZIR
155 T3 = T2 - CONJG( SI )*XI
156 T4 = CONJG( T2 ) + SI*YI
159 X( IX ) = CI*T5 + ( SIR*REAL( T4 )+SII*AIMAG( T4 ) )
160 Y( IX ) = CI*T6 - ( SIR*REAL( T3 )-SII*AIMAG( T3 ) )
161 Z( IX ) = CI*T3 + CONJG( SI )*CMPLX( T6, T1I )