Corrected setting of KWA in DSCTEST.
authorilb@NIH.GOV <ilb@NIH.GOV@ba61647d-9d00-f842-95cd-605cb4296b96>
Tue, 28 Nov 2017 19:45:53 +0000 (19:45 +0000)
committerilb@NIH.GOV <ilb@NIH.GOV@ba61647d-9d00-f842-95cd-605cb4296b96>
Tue, 28 Nov 2017 19:45:53 +0000 (19:45 +0000)
git-svn-id: https://citdcbmipav.cit.nih.gov/repos-pub/mipav/trunk@15279 ba61647d-9d00-f842-95cd-605cb4296b96

mipav/src/gov/nih/mipav/model/algorithms/DoublyConnectedSC.java

index 73f68ba..78089b7 100644 (file)
@@ -960,7 +960,7 @@ double neweps;
                   WMIDB[1] = expb * Math.sin(arg);\r
                }\r
                \r
-               //   COMPOUND GAUSS-JACOBI PROCESS ACCORDING TO ONE-QUATER RULE:\r
+               //   COMPOUND GAUSS-JACOBI PROCESS ACCORDING TO ONE-QUARTER RULE:\r
         WQA1 = WQUAD1(WA,PHIA,KWA,ICA,WMIDA,PHMIDA,RADIUS,M,N,U,W0,W1,\r
            ALFA0,ALFA1,NPTQ,QWORK,LINEARC);\r
         WQA2 = WQUAD1(WMID,PHMID,0,2,WMIDA,PHMIDA,RADIUS,M,N,U,W0,W1,ALFA0,\r
@@ -2287,7 +2287,7 @@ double neweps;
        \r
            // .. Common blocks ..\r
            // COMMON /PARAM4/UARY,VARY,DLAM,IU\r
-       \r
+           \r
            ERRMAX = 0.0;\r
            ERRMIN = 99.0;\r
            for (K = 0; K < M - 1; K++) {\r
@@ -2295,18 +2295,18 @@ double neweps;
                        continue;\r
                }\r
                DIST = 2.0;\r
-               for (I = 0; I < N; I++) {\r
-                   D = scm.zabs(W0[K][0]-W1[I][0], W0[K][1]-W1[I][1]);\r
+               for (I = 1; I <= N; I++) {\r
+                   D = scm.zabs(W0[K][0]-W1[I-1][0], W0[K][1]-W1[I-1][1]);\r
                    if (D >= DIST) {\r
                        continue;\r
                    }\r
                    DIST = D;\r
-                   WA[0] = W1[I][0];\r
-                   WA[1] = W1[I][1];\r
+                   WA[0] = W1[I-1][0];\r
+                   WA[1] = W1[I-1][1];\r
                    KWA = I;\r
-                   ZC[0] = Z1[I][0];\r
-                   ZC[1] = Z1[I][1];\r
-               } // for (I = 0; I < N; I++)\r
+                   ZC[0] = Z1[I-1][0];\r
+                   ZC[1] = Z1[I-1][1];\r
+               } // for (I = 1; I <= N; I++)\r
                wout = WQUAD(WA,0.0,KWA,1,W0[K],0.0,K,0,0.0,M,N,U,\r
                                 W0,W1,ALFA0,ALFA1,NPTQ,QWORK,0,1);\r
                scm.zmlt(C[0], C[1], wout[0], wout[1], cr, ci);\r