 LAPACK  3.9.0 LAPACK: Linear Algebra PACKage

## ◆ clacrt()

 subroutine clacrt ( integer N, complex, dimension( * ) CX, integer INCX, complex, dimension( * ) CY, integer INCY, complex C, complex S )

CLACRT performs a linear transformation of a pair of complex vectors.

Purpose:
``` CLACRT performs the operation

(  c  s )( x )  ==> ( x )
( -s  c )( y )      ( y )

where c and s are complex and the vectors x and y are complex.```
Parameters
 [in] N ``` N is INTEGER The number of elements in the vectors CX and CY.``` [in,out] CX ``` CX is COMPLEX array, dimension (N) On input, the vector x. On output, CX is overwritten with c*x + s*y.``` [in] INCX ``` INCX is INTEGER The increment between successive values of CX. INCX <> 0.``` [in,out] CY ``` CY is COMPLEX array, dimension (N) On input, the vector y. On output, CY is overwritten with -s*x + c*y.``` [in] INCY ``` INCY is INTEGER The increment between successive values of CY. INCY <> 0.``` [in] C ` C is COMPLEX` [in] S ``` S is COMPLEX C and S define the matrix [ C S ]. [ -S C ]```
Date
December 2016

Definition at line 107 of file clacrt.f.

107 *
108 * -- LAPACK auxiliary routine (version 3.7.0) --
109 * -- LAPACK is a software package provided by Univ. of Tennessee, --
110 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
111 * December 2016
112 *
113 * .. Scalar Arguments ..
114  INTEGER INCX, INCY, N
115  COMPLEX C, S
116 * ..
117 * .. Array Arguments ..
118  COMPLEX CX( * ), CY( * )
119 * ..
120 *
121 * =====================================================================
122 *
123 * .. Local Scalars ..
124  INTEGER I, IX, IY
125  COMPLEX CTEMP
126 * ..
127 * .. Executable Statements ..
128 *
129  IF( n.LE.0 )
130  \$ RETURN
131  IF( incx.EQ.1 .AND. incy.EQ.1 )
132  \$ GO TO 20
133 *
134 * Code for unequal increments or equal increments not equal to 1
135 *
136  ix = 1
137  iy = 1
138  IF( incx.LT.0 )
139  \$ ix = ( -n+1 )*incx + 1
140  IF( incy.LT.0 )
141  \$ iy = ( -n+1 )*incy + 1
142  DO 10 i = 1, n
143  ctemp = c*cx( ix ) + s*cy( iy )
144  cy( iy ) = c*cy( iy ) - s*cx( ix )
145  cx( ix ) = ctemp
146  ix = ix + incx
147  iy = iy + incy
148  10 CONTINUE
149  RETURN
150 *
151 * Code for both increments equal to 1
152 *
153  20 CONTINUE
154  DO 30 i = 1, n
155  ctemp = c*cx( i ) + s*cy( i )
156  cy( i ) = c*cy( i ) - s*cx( i )
157  cx( i ) = ctemp
158  30 CONTINUE
159  RETURN