LAPACK 3.3.0

slar2v.f

Go to the documentation of this file.
00001       SUBROUTINE SLAR2V( N, X, Y, Z, INCX, 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, N
00010 *     ..
00011 *     .. Array Arguments ..
00012       REAL               C( * ), S( * ), X( * ), Y( * ), Z( * )
00013 *     ..
00014 *
00015 *  Purpose
00016 *  =======
00017 *
00018 *  SLAR2V applies a vector of real plane rotations from both sides to
00019 *  a sequence of 2-by-2 real symmetric matrices, defined by the elements
00020 *  of the vectors x, y and z. For i = 1,2,...,n
00021 *
00022 *     ( x(i)  z(i) ) := (  c(i)  s(i) ) ( x(i)  z(i) ) ( c(i) -s(i) )
00023 *     ( z(i)  y(i) )    ( -s(i)  c(i) ) ( z(i)  y(i) ) ( s(i)  c(i) )
00024 *
00025 *  Arguments
00026 *  =========
00027 *
00028 *  N       (input) INTEGER
00029 *          The number of plane rotations to be applied.
00030 *
00031 *  X       (input/output) REAL array,
00032 *                         dimension (1+(N-1)*INCX)
00033 *          The vector x.
00034 *
00035 *  Y       (input/output) REAL array,
00036 *                         dimension (1+(N-1)*INCX)
00037 *          The vector y.
00038 *
00039 *  Z       (input/output) REAL array,
00040 *                         dimension (1+(N-1)*INCX)
00041 *          The vector z.
00042 *
00043 *  INCX    (input) INTEGER
00044 *          The increment between elements of X, Y and Z. INCX > 0.
00045 *
00046 *  C       (input) REAL array, dimension (1+(N-1)*INCC)
00047 *          The cosines of the plane rotations.
00048 *
00049 *  S       (input) REAL array, dimension (1+(N-1)*INCC)
00050 *          The sines of the plane rotations.
00051 *
00052 *  INCC    (input) INTEGER
00053 *          The increment between elements of C and S. INCC > 0.
00054 *
00055 *  =====================================================================
00056 *
00057 *     .. Local Scalars ..
00058       INTEGER            I, IC, IX
00059       REAL               CI, SI, T1, T2, T3, T4, T5, T6, XI, YI, ZI
00060 *     ..
00061 *     .. Executable Statements ..
00062 *
00063       IX = 1
00064       IC = 1
00065       DO 10 I = 1, N
00066          XI = X( IX )
00067          YI = Y( IX )
00068          ZI = Z( IX )
00069          CI = C( IC )
00070          SI = S( IC )
00071          T1 = SI*ZI
00072          T2 = CI*ZI
00073          T3 = T2 - SI*XI
00074          T4 = T2 + SI*YI
00075          T5 = CI*XI + T1
00076          T6 = CI*YI - T1
00077          X( IX ) = CI*T5 + SI*T4
00078          Y( IX ) = CI*T6 - SI*T3
00079          Z( IX ) = CI*T4 - SI*T5
00080          IX = IX + INCX
00081          IC = IC + INCC
00082    10 CONTINUE
00083 *
00084 *     End of SLAR2V
00085 *
00086       RETURN
00087       END
 All Files Functions