Minor changes to DOGLEG.
authorilb@NIH.GOV <ilb@NIH.GOV@ba61647d-9d00-f842-95cd-605cb4296b96>
Wed, 29 Nov 2017 19:53:43 +0000 (19:53 +0000)
committerilb@NIH.GOV <ilb@NIH.GOV@ba61647d-9d00-f842-95cd-605cb4296b96>
Wed, 29 Nov 2017 19:53:43 +0000 (19:53 +0000)
git-svn-id: https://citdcbmipav.cit.nih.gov/repos-pub/mipav/trunk@15284 ba61647d-9d00-f842-95cd-605cb4296b96

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

index 82fb701..f65d648 100644 (file)
@@ -2556,7 +2556,6 @@ double neweps;
                                if (FCN == dscfun) {\r
                                        DSCFUN(N, X, FVEC, IFLAG);\r
                                }\r
-                               return;\r
                        } // if (NPRINT > 0)\r
                        return;\r
                }\r
@@ -2590,7 +2589,7 @@ double neweps;
                                }\r
                        } // if (NPRINT > 0)\r
                return;\r
-               } // if (IFLAG[0] < 0)\r
+               } // if (IFLAG[0] < 0\r
                FNORM = ENORM(N,FVEC);\r
                \r
                // DETERMINE THE NUMBER OF CALLS TO FCN NEEDED TO COMPUTE\r
@@ -3089,9 +3088,9 @@ double neweps;
                      ratio = SGNORM/DELTA;\r
                      ratio2 = TEMP - (DELTA/QNORM);\r
                      ratio3 = DELTA/QNORM;\r
-                     TEMP = TEMP - (DELTA/QNORM)* ratio*ratio +\r
+                     TEMP = TEMP - ratio3* ratio*ratio +\r
                          Math.sqrt(ratio2*ratio2+(ONE- ratio3*ratio3)* (ONE- ratio*ratio));\r
-                     ALPHA = ((DELTA/QNORM)* (ONE- ratio*ratio))/TEMP;\r
+                     ALPHA = (ratio3 * (ONE- ratio*ratio))/TEMP;\r
                  } // if  (SGNORM < DELTA)\r
              } // if (GNORM != ZERO)\r
        \r