LAPACK 3.3.0

clartv.f

Go to the documentation of this file.
00001       SUBROUTINE CLARTV( N, X, INCX, Y, INCY, C, S, INCC )
00002 *
00003 *  -- LAPACK auxiliary routine (version 3.2) --
00004 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
00005 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
00006 *     November 2006
00007 *
00008 *     .. Scalar Arguments ..
00009       INTEGER            INCC, INCX, INCY, N
00010 *     ..
00011 *     .. Array Arguments ..
00012       REAL               C( * )
00013       COMPLEX            S( * ), X( * ), Y( * )
00014 *     ..
00015 *
00016 *  Purpose
00017 *  =======
00018 *
00019 *  CLARTV applies a vector of complex plane rotations with real cosines
00020 *  to elements of the complex vectors x and y. For i = 1,2,...,n
00021 *
00022 *     ( x(i) ) := (        c(i)   s(i) ) ( x(i) )
00023 *     ( y(i) )    ( -conjg(s(i))  c(i) ) ( y(i) )
00024 *
00025 *  Arguments
00026 *  =========
00027 *
00028 *  N       (input) INTEGER
00029 *          The number of plane rotations to be applied.
00030 *
00031 *  X       (input/output) COMPLEX array, dimension (1+(N-1)*INCX)
00032 *          The vector x.
00033 *
00034 *  INCX    (input) INTEGER
00035 *          The increment between elements of X. INCX > 0.
00036 *
00037 *  Y       (input/output) COMPLEX array, dimension (1+(N-1)*INCY)
00038 *          The vector y.
00039 *
00040 *  INCY    (input) INTEGER
00041 *          The increment between elements of Y. INCY > 0.
00042 *
00043 *  C       (input) REAL array, dimension (1+(N-1)*INCC)
00044 *          The cosines of the plane rotations.
00045 *
00046 *  S       (input) COMPLEX array, dimension (1+(N-1)*INCC)
00047 *          The sines of the plane rotations.
00048 *
00049 *  INCC    (input) INTEGER
00050 *          The increment between elements of C and S. INCC > 0.
00051 *
00052 *  =====================================================================
00053 *
00054 *     .. Local Scalars ..
00055       INTEGER            I, IC, IX, IY
00056       COMPLEX            XI, YI
00057 *     ..
00058 *     .. Intrinsic Functions ..
00059       INTRINSIC          CONJG
00060 *     ..
00061 *     .. Executable Statements ..
00062 *
00063       IX = 1
00064       IY = 1
00065       IC = 1
00066       DO 10 I = 1, N
00067          XI = X( IX )
00068          YI = Y( IY )
00069          X( IX ) = C( IC )*XI + S( IC )*YI
00070          Y( IY ) = C( IC )*YI - CONJG( S( IC ) )*XI
00071          IX = IX + INCX
00072          IY = IY + INCY
00073          IC = IC + INCC
00074    10 CONTINUE
00075       RETURN
00076 *
00077 *     End of CLARTV
00078 *
00079       END
 All Files Functions