dlar2v.c
Go to the documentation of this file.
00001 /* dlar2v.f -- translated by f2c (version 20061008).
00002    You must link the resulting object file with libf2c:
00003         on Microsoft Windows system, link with libf2c.lib;
00004         on Linux or Unix systems, link with .../path/to/libf2c.a -lm
00005         or, if you install libf2c.a in a standard place, with -lf2c -lm
00006         -- in that order, at the end of the command line, as in
00007                 cc *.o -lf2c -lm
00008         Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
00009 
00010                 http://www.netlib.org/f2c/libf2c.zip
00011 */
00012 
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015 
00016 /* Subroutine */ int dlar2v_(integer *n, doublereal *x, doublereal *y, 
00017         doublereal *z__, integer *incx, doublereal *c__, doublereal *s, 
00018         integer *incc)
00019 {
00020     /* System generated locals */
00021     integer i__1;
00022 
00023     /* Local variables */
00024     integer i__;
00025     doublereal t1, t2, t3, t4, t5, t6;
00026     integer ic;
00027     doublereal ci, si;
00028     integer ix;
00029     doublereal xi, yi, zi;
00030 
00031 
00032 /*  -- LAPACK auxiliary routine (version 3.2) -- */
00033 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00034 /*     November 2006 */
00035 
00036 /*     .. Scalar Arguments .. */
00037 /*     .. */
00038 /*     .. Array Arguments .. */
00039 /*     .. */
00040 
00041 /*  Purpose */
00042 /*  ======= */
00043 
00044 /*  DLAR2V applies a vector of real plane rotations from both sides to */
00045 /*  a sequence of 2-by-2 real symmetric matrices, defined by the elements */
00046 /*  of the vectors x, y and z. For i = 1,2,...,n */
00047 
00048 /*     ( x(i)  z(i) ) := (  c(i)  s(i) ) ( x(i)  z(i) ) ( c(i) -s(i) ) */
00049 /*     ( z(i)  y(i) )    ( -s(i)  c(i) ) ( z(i)  y(i) ) ( s(i)  c(i) ) */
00050 
00051 /*  Arguments */
00052 /*  ========= */
00053 
00054 /*  N       (input) INTEGER */
00055 /*          The number of plane rotations to be applied. */
00056 
00057 /*  X       (input/output) DOUBLE PRECISION array, */
00058 /*                         dimension (1+(N-1)*INCX) */
00059 /*          The vector x. */
00060 
00061 /*  Y       (input/output) DOUBLE PRECISION array, */
00062 /*                         dimension (1+(N-1)*INCX) */
00063 /*          The vector y. */
00064 
00065 /*  Z       (input/output) DOUBLE PRECISION array, */
00066 /*                         dimension (1+(N-1)*INCX) */
00067 /*          The vector z. */
00068 
00069 /*  INCX    (input) INTEGER */
00070 /*          The increment between elements of X, Y and Z. INCX > 0. */
00071 
00072 /*  C       (input) DOUBLE PRECISION array, dimension (1+(N-1)*INCC) */
00073 /*          The cosines of the plane rotations. */
00074 
00075 /*  S       (input) DOUBLE PRECISION array, dimension (1+(N-1)*INCC) */
00076 /*          The sines of the plane rotations. */
00077 
00078 /*  INCC    (input) INTEGER */
00079 /*          The increment between elements of C and S. INCC > 0. */
00080 
00081 /*  ===================================================================== */
00082 
00083 /*     .. Local Scalars .. */
00084 /*     .. */
00085 /*     .. Executable Statements .. */
00086 
00087     /* Parameter adjustments */
00088     --s;
00089     --c__;
00090     --z__;
00091     --y;
00092     --x;
00093 
00094     /* Function Body */
00095     ix = 1;
00096     ic = 1;
00097     i__1 = *n;
00098     for (i__ = 1; i__ <= i__1; ++i__) {
00099         xi = x[ix];
00100         yi = y[ix];
00101         zi = z__[ix];
00102         ci = c__[ic];
00103         si = s[ic];
00104         t1 = si * zi;
00105         t2 = ci * zi;
00106         t3 = t2 - si * xi;
00107         t4 = t2 + si * yi;
00108         t5 = ci * xi + t1;
00109         t6 = ci * yi - t1;
00110         x[ix] = ci * t5 + si * t4;
00111         y[ix] = ci * t6 - si * t3;
00112         z__[ix] = ci * t4 - si * t5;
00113         ix += *incx;
00114         ic += *incc;
00115 /* L10: */
00116     }
00117 
00118 /*     End of DLAR2V */
00119 
00120     return 0;
00121 } /* dlar2v_ */


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:55:46