You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

clartv.f 3.9 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. *> \brief \b CLARTV applies a vector of plane rotations with real cosines and complex sines to the elements of a pair of vectors.
  2. *
  3. * =========== DOCUMENTATION ===========
  4. *
  5. * Online html documentation available at
  6. * http://www.netlib.org/lapack/explore-html/
  7. *
  8. *> \htmlonly
  9. *> Download CLARTV + dependencies
  10. *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/clartv.f">
  11. *> [TGZ]</a>
  12. *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/clartv.f">
  13. *> [ZIP]</a>
  14. *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/clartv.f">
  15. *> [TXT]</a>
  16. *> \endhtmlonly
  17. *
  18. * Definition:
  19. * ===========
  20. *
  21. * SUBROUTINE CLARTV( N, X, INCX, Y, INCY, C, S, INCC )
  22. *
  23. * .. Scalar Arguments ..
  24. * INTEGER INCC, INCX, INCY, N
  25. * ..
  26. * .. Array Arguments ..
  27. * REAL C( * )
  28. * COMPLEX S( * ), X( * ), Y( * )
  29. * ..
  30. *
  31. *
  32. *> \par Purpose:
  33. * =============
  34. *>
  35. *> \verbatim
  36. *>
  37. *> CLARTV applies a vector of complex plane rotations with real cosines
  38. *> to elements of the complex vectors x and y. For i = 1,2,...,n
  39. *>
  40. *> ( x(i) ) := ( c(i) s(i) ) ( x(i) )
  41. *> ( y(i) ) ( -conjg(s(i)) c(i) ) ( y(i) )
  42. *> \endverbatim
  43. *
  44. * Arguments:
  45. * ==========
  46. *
  47. *> \param[in] N
  48. *> \verbatim
  49. *> N is INTEGER
  50. *> The number of plane rotations to be applied.
  51. *> \endverbatim
  52. *>
  53. *> \param[in,out] X
  54. *> \verbatim
  55. *> X is COMPLEX array, dimension (1+(N-1)*INCX)
  56. *> The vector x.
  57. *> \endverbatim
  58. *>
  59. *> \param[in] INCX
  60. *> \verbatim
  61. *> INCX is INTEGER
  62. *> The increment between elements of X. INCX > 0.
  63. *> \endverbatim
  64. *>
  65. *> \param[in,out] Y
  66. *> \verbatim
  67. *> Y is COMPLEX array, dimension (1+(N-1)*INCY)
  68. *> The vector y.
  69. *> \endverbatim
  70. *>
  71. *> \param[in] INCY
  72. *> \verbatim
  73. *> INCY is INTEGER
  74. *> The increment between elements of Y. INCY > 0.
  75. *> \endverbatim
  76. *>
  77. *> \param[in] C
  78. *> \verbatim
  79. *> C is REAL array, dimension (1+(N-1)*INCC)
  80. *> The cosines of the plane rotations.
  81. *> \endverbatim
  82. *>
  83. *> \param[in] S
  84. *> \verbatim
  85. *> S is COMPLEX array, dimension (1+(N-1)*INCC)
  86. *> The sines of the plane rotations.
  87. *> \endverbatim
  88. *>
  89. *> \param[in] INCC
  90. *> \verbatim
  91. *> INCC is INTEGER
  92. *> The increment between elements of C and S. INCC > 0.
  93. *> \endverbatim
  94. *
  95. * Authors:
  96. * ========
  97. *
  98. *> \author Univ. of Tennessee
  99. *> \author Univ. of California Berkeley
  100. *> \author Univ. of Colorado Denver
  101. *> \author NAG Ltd.
  102. *
  103. *> \date December 2016
  104. *
  105. *> \ingroup complexOTHERauxiliary
  106. *
  107. * =====================================================================
  108. SUBROUTINE CLARTV( N, X, INCX, Y, INCY, C, S, INCC )
  109. *
  110. * -- LAPACK auxiliary routine (version 3.7.0) --
  111. * -- LAPACK is a software package provided by Univ. of Tennessee, --
  112. * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
  113. * December 2016
  114. *
  115. * .. Scalar Arguments ..
  116. INTEGER INCC, INCX, INCY, N
  117. * ..
  118. * .. Array Arguments ..
  119. REAL C( * )
  120. COMPLEX S( * ), X( * ), Y( * )
  121. * ..
  122. *
  123. * =====================================================================
  124. *
  125. * .. Local Scalars ..
  126. INTEGER I, IC, IX, IY
  127. COMPLEX XI, YI
  128. * ..
  129. * .. Intrinsic Functions ..
  130. INTRINSIC CONJG
  131. * ..
  132. * .. Executable Statements ..
  133. *
  134. IX = 1
  135. IY = 1
  136. IC = 1
  137. DO 10 I = 1, N
  138. XI = X( IX )
  139. YI = Y( IY )
  140. X( IX ) = C( IC )*XI + S( IC )*YI
  141. Y( IY ) = C( IC )*YI - CONJG( S( IC ) )*XI
  142. IX = IX + INCX
  143. IY = IY + INCY
  144. IC = IC + INCC
  145. 10 CONTINUE
  146. RETURN
  147. *
  148. * End of CLARTV
  149. *
  150. END