![]() |
LAPACK
3.4.1
LAPACK: Linear Algebra PACKage
|
00001 *> \brief \b SLAR2V 00002 * 00003 * =========== DOCUMENTATION =========== 00004 * 00005 * Online html documentation available at 00006 * http://www.netlib.org/lapack/explore-html/ 00007 * 00008 *> \htmlonly 00009 *> Download SLAR2V + dependencies 00010 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/slar2v.f"> 00011 *> [TGZ]</a> 00012 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/slar2v.f"> 00013 *> [ZIP]</a> 00014 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/slar2v.f"> 00015 *> [TXT]</a> 00016 *> \endhtmlonly 00017 * 00018 * Definition: 00019 * =========== 00020 * 00021 * SUBROUTINE SLAR2V( N, X, Y, Z, INCX, C, S, INCC ) 00022 * 00023 * .. Scalar Arguments .. 00024 * INTEGER INCC, INCX, N 00025 * .. 00026 * .. Array Arguments .. 00027 * REAL C( * ), S( * ), X( * ), Y( * ), Z( * ) 00028 * .. 00029 * 00030 * 00031 *> \par Purpose: 00032 * ============= 00033 *> 00034 *> \verbatim 00035 *> 00036 *> SLAR2V applies a vector of real plane rotations from both sides to 00037 *> a sequence of 2-by-2 real symmetric matrices, defined by the elements 00038 *> of the vectors x, y and z. For i = 1,2,...,n 00039 *> 00040 *> ( x(i) z(i) ) := ( c(i) s(i) ) ( x(i) z(i) ) ( c(i) -s(i) ) 00041 *> ( z(i) y(i) ) ( -s(i) c(i) ) ( z(i) y(i) ) ( s(i) c(i) ) 00042 *> \endverbatim 00043 * 00044 * Arguments: 00045 * ========== 00046 * 00047 *> \param[in] N 00048 *> \verbatim 00049 *> N is INTEGER 00050 *> The number of plane rotations to be applied. 00051 *> \endverbatim 00052 *> 00053 *> \param[in,out] X 00054 *> \verbatim 00055 *> X is REAL array, 00056 *> dimension (1+(N-1)*INCX) 00057 *> The vector x. 00058 *> \endverbatim 00059 *> 00060 *> \param[in,out] Y 00061 *> \verbatim 00062 *> Y is REAL array, 00063 *> dimension (1+(N-1)*INCX) 00064 *> The vector y. 00065 *> \endverbatim 00066 *> 00067 *> \param[in,out] Z 00068 *> \verbatim 00069 *> Z is REAL array, 00070 *> dimension (1+(N-1)*INCX) 00071 *> The vector z. 00072 *> \endverbatim 00073 *> 00074 *> \param[in] INCX 00075 *> \verbatim 00076 *> INCX is INTEGER 00077 *> The increment between elements of X, Y and Z. INCX > 0. 00078 *> \endverbatim 00079 *> 00080 *> \param[in] C 00081 *> \verbatim 00082 *> C is REAL array, dimension (1+(N-1)*INCC) 00083 *> The cosines of the plane rotations. 00084 *> \endverbatim 00085 *> 00086 *> \param[in] S 00087 *> \verbatim 00088 *> S is REAL array, dimension (1+(N-1)*INCC) 00089 *> The sines of the plane rotations. 00090 *> \endverbatim 00091 *> 00092 *> \param[in] INCC 00093 *> \verbatim 00094 *> INCC is INTEGER 00095 *> The increment between elements of C and S. INCC > 0. 00096 *> \endverbatim 00097 * 00098 * Authors: 00099 * ======== 00100 * 00101 *> \author Univ. of Tennessee 00102 *> \author Univ. of California Berkeley 00103 *> \author Univ. of Colorado Denver 00104 *> \author NAG Ltd. 00105 * 00106 *> \date November 2011 00107 * 00108 *> \ingroup realOTHERauxiliary 00109 * 00110 * ===================================================================== 00111 SUBROUTINE SLAR2V( N, X, Y, Z, INCX, C, S, INCC ) 00112 * 00113 * -- LAPACK auxiliary routine (version 3.4.0) -- 00114 * -- LAPACK is a software package provided by Univ. of Tennessee, -- 00115 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 00116 * November 2011 00117 * 00118 * .. Scalar Arguments .. 00119 INTEGER INCC, INCX, N 00120 * .. 00121 * .. Array Arguments .. 00122 REAL C( * ), S( * ), X( * ), Y( * ), Z( * ) 00123 * .. 00124 * 00125 * ===================================================================== 00126 * 00127 * .. Local Scalars .. 00128 INTEGER I, IC, IX 00129 REAL CI, SI, T1, T2, T3, T4, T5, T6, XI, YI, ZI 00130 * .. 00131 * .. Executable Statements .. 00132 * 00133 IX = 1 00134 IC = 1 00135 DO 10 I = 1, N 00136 XI = X( IX ) 00137 YI = Y( IX ) 00138 ZI = Z( IX ) 00139 CI = C( IC ) 00140 SI = S( IC ) 00141 T1 = SI*ZI 00142 T2 = CI*ZI 00143 T3 = T2 - SI*XI 00144 T4 = T2 + SI*YI 00145 T5 = CI*XI + T1 00146 T6 = CI*YI - T1 00147 X( IX ) = CI*T5 + SI*T4 00148 Y( IX ) = CI*T6 - SI*T3 00149 Z( IX ) = CI*T4 - SI*T5 00150 IX = IX + INCX 00151 IC = IC + INCC 00152 10 CONTINUE 00153 * 00154 * End of SLAR2V 00155 * 00156 RETURN 00157 END