Connected K setting in WQUAD call in DSCTEST.
authorilb@NIH.GOV <ilb@NIH.GOV@ba61647d-9d00-f842-95cd-605cb4296b96>
Tue, 28 Nov 2017 19:56:28 +0000 (19:56 +0000)
committerilb@NIH.GOV <ilb@NIH.GOV@ba61647d-9d00-f842-95cd-605cb4296b96>
Tue, 28 Nov 2017 19:56:28 +0000 (19:56 +0000)
git-svn-id: https://citdcbmipav.cit.nih.gov/repos-pub/mipav/trunk@15280 ba61647d-9d00-f842-95cd-605cb4296b96

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

index 78089b7..901aaa0 100644 (file)
@@ -2290,13 +2290,13 @@ double neweps;
            \r
            ERRMAX = 0.0;\r
            ERRMIN = 99.0;\r
-           for (K = 0; K < M - 1; K++) {\r
-               if (ALFA0[K] <= 0.0) {\r
+           for (K = 1; K <= M - 1; K++) {\r
+               if (ALFA0[K-1] <= 0.0) {\r
                        continue;\r
                }\r
                DIST = 2.0;\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
+                   D = scm.zabs(W0[K-1][0]-W1[I-1][0], W0[K-1][1]-W1[I-1][1]);\r
                    if (D >= DIST) {\r
                        continue;\r
                    }\r
@@ -2307,12 +2307,12 @@ double neweps;
                    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
+               wout = WQUAD(WA,0.0,KWA,1,W0[K-1],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
                ZTEST[0] = ZC[0] + cr[0];\r
                ZTEST[1] = ZC[1] + ci[0];\r
-               D1 = scm.zabs(Z0[K][0]-ZTEST[0],Z0[K][1]-ZTEST[1]);\r
+               D1 = scm.zabs(Z0[K-1][0]-ZTEST[0],Z0[K-1][1]-ZTEST[1]);\r
                if (D1 > ERRMAX) {\r
                    ERRMAX = D1;\r
                    KMAX = K;\r
@@ -2323,7 +2323,7 @@ double neweps;
                    KMIN = K;\r
                } // if (D1 < ERRMIN)\r
 \r
-           } // for (K = 0; K < M - 1; K++)\r
+           } // for (K = 1; K <= M - 1; K++)\r
            System.out.println("ACCURACY TEST: ");\r
            System.out.println("MAXIMUM ERROR = " + ERRMAX + " ACHIEVED AT KMAX = " + KMAX);\r
            System.out.println("MINIMUM ERROR = " + ERRMIN + " ACHIEVED AT KMIN = " + KMIN);\r