Free cookie consent management tool by TermsFeed Policy Generator

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

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

#2789 added Finbarr O'Sullivan smoothing spline code

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