 LAPACK  3.10.1 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.

Download CLACRT + dependencies [TGZ] [ZIP] [TXT]

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 ]```

Definition at line 104 of file clacrt.f.

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