Free cookie consent management tool by TermsFeed Policy Generator

source: branches/2789_MathNetNumerics-Exploration/HeuristicLab.Algorithms.DataAnalysis.Experimental/sbart/csscal.f @ 17185

Last change on this file since 17185 was 15457, checked in by gkronber, 7 years ago

#2789 added Finbarr O'Sullivan smoothing spline code

File size: 938 bytes
Line 
1      SUBROUTINE CSSCAL(N,SA,CX,INCX)
2*     .. Scalar Arguments ..
3      REAL SA
4      INTEGER INCX,N
5*     ..
6*     .. Array Arguments ..
7      COMPLEX CX(*)
8*     ..
9*
10*  Purpose
11*  =======
12*
13*     scales a complex vector by a real constant.
14*     jack dongarra, linpack, 3/11/78.
15*     modified 3/93 to return if incx .le. 0.
16*     modified 12/3/93, array(1) declarations changed to array(*)
17*
18*
19*     .. Local Scalars ..
20      INTEGER I,NINCX
21*     ..
22*     .. Intrinsic Functions ..
23      INTRINSIC AIMAG,CMPLX,REAL
24*     ..
25      IF (N.LE.0 .OR. INCX.LE.0) RETURN
26      IF (INCX.EQ.1) GO TO 20
27*
28*        code for increment not equal to 1
29*
30      NINCX = N*INCX
31      DO 10 I = 1,NINCX,INCX
32          CX(I) = CMPLX(SA*REAL(CX(I)),SA*AIMAG(CX(I)))
33   10 CONTINUE
34      RETURN
35*
36*        code for increment equal to 1
37*
38   20 DO 30 I = 1,N
39          CX(I) = CMPLX(SA*REAL(CX(I)),SA*AIMAG(CX(I)))
40   30 CONTINUE
41      RETURN
42      END
Note: See TracBrowser for help on using the repository browser.