LAPACK 3.3.0

slartv.f

Go to the documentation of this file.
00001       SUBROUTINE SLARTV( 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( * ), S( * ), X( * ), Y( * )
00013 *     ..
00014 *
00015 *  Purpose
00016 *  =======
00017 *
00018 *  SLARTV applies a vector of real plane rotations to elements of the
00019 *  real vectors x and y. For i = 1,2,...,n
00020 *
00021 *     ( x(i) ) := (  c(i)  s(i) ) ( x(i) )
00022 *     ( y(i) )    ( -s(i)  c(i) ) ( y(i) )
00023 *
00024 *  Arguments
00025 *  =========
00026 *
00027 *  N       (input) INTEGER
00028 *          The number of plane rotations to be applied.
00029 *
00030 *  X       (input/output) REAL array,
00031 *                         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) REAL array,
00038 *                         dimension (1+(N-1)*INCY)
00039 *          The vector y.
00040 *
00041 *  INCY    (input) INTEGER
00042 *          The increment between elements of Y. INCY > 0.
00043 *
00044 *  C       (input) REAL array, dimension (1+(N-1)*INCC)
00045 *          The cosines of the plane rotations.
00046 *
00047 *  S       (input) REAL array, dimension (1+(N-1)*INCC)
00048 *          The sines of the plane rotations.
00049 *
00050 *  INCC    (input) INTEGER
00051 *          The increment between elements of C and S. INCC > 0.
00052 *
00053 *  =====================================================================
00054 *
00055 *     .. Local Scalars ..
00056       INTEGER            I, IC, IX, IY
00057       REAL               XI, YI
00058 *     ..
00059 *     .. Executable Statements ..
00060 *
00061       IX = 1
00062       IY = 1
00063       IC = 1
00064       DO 10 I = 1, N
00065          XI = X( IX )
00066          YI = Y( IY )
00067          X( IX ) = C( IC )*XI + S( IC )*YI
00068          Y( IY ) = C( IC )*YI - S( IC )*XI
00069          IX = IX + INCX
00070          IY = IY + INCY
00071          IC = IC + INCC
00072    10 CONTINUE
00073       RETURN
00074 *
00075 *     End of SLARTV
00076 *
00077       END
 All Files Functions