Free cookie consent management tool by TermsFeed Policy Generator

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

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

#2789 added Finbarr O'Sullivan smoothing spline code

File size: 1.1 KB
Line 
1      COMPLEX FUNCTION CDOTU(N,CX,INCX,CY,INCY)
2*     .. Scalar Arguments ..
3      INTEGER INCX,INCY,N
4*     ..
5*     .. Array Arguments ..
6      COMPLEX CX(*),CY(*)
7*     ..
8*
9*  Purpose
10*  =======
11*
12*     CDOTU forms the dot product of two vectors.
13*
14*  Further Details
15*  ===============
16*
17*     jack dongarra, linpack, 3/11/78.
18*     modified 12/3/93, array(1) declarations changed to array(*)
19*
20*     .. Local Scalars ..
21      COMPLEX CTEMP
22      INTEGER I,IX,IY
23*     ..
24      CTEMP = (0.0,0.0)
25      CDOTU = (0.0,0.0)
26      IF (N.LE.0) RETURN
27      IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20
28*
29*        code for unequal increments or equal increments
30*          not equal to 1
31*
32      IX = 1
33      IY = 1
34      IF (INCX.LT.0) IX = (-N+1)*INCX + 1
35      IF (INCY.LT.0) IY = (-N+1)*INCY + 1
36      DO 10 I = 1,N
37          CTEMP = CTEMP + CX(IX)*CY(IY)
38          IX = IX + INCX
39          IY = IY + INCY
40   10 CONTINUE
41      CDOTU = CTEMP
42      RETURN
43*
44*        code for both increments equal to 1
45*
46   20 DO 30 I = 1,N
47          CTEMP = CTEMP + CX(I)*CY(I)
48   30 CONTINUE
49      CDOTU = CTEMP
50      RETURN
51      END
Note: See TracBrowser for help on using the repository browser.