chiark / gitweb /
call stop_ftol instead of stop_f if we check minf_max elsewhere
authorstevenj <stevenj@alum.mit.edu>
Tue, 11 Nov 2008 22:35:24 +0000 (17:35 -0500)
committerstevenj <stevenj@alum.mit.edu>
Tue, 11 Nov 2008 22:35:24 +0000 (17:35 -0500)
darcs-hash:20081111223524-c8de0-9267e6cc8db7693ebc0060f11c831b66e6c9903c.gz

neldermead/nldrmd.c
neldermead/sbplx.c

index db40d3e67541c27b6c401b444f6ba32f13a130b0..72d0d02457d006b860f9ce92852058c4090e5ec9 100644 (file)
@@ -168,7 +168,7 @@ nlopt_result nldrmd_minimize_(int n, nlopt_func f, void *f_data,
          if (init_diam == 0) /* initialize diam. for psi convergence test */
               for (i = 0; i < n; ++i) init_diam = fabs(xl[i] - xh[i]);
 
-         if (psi <= 0 && nlopt_stop_f(stop, fl, fh)) {
+         if (psi <= 0 && nlopt_stop_ftol(stop, fl, fh)) {
               ret = NLOPT_FTOL_REACHED;
               goto done;
          }
index 1d2048008721aa4dddcf11cdbffa4c6c35f20710..9d896888b28543cba0ced935029cca99da599663 100644 (file)
@@ -182,7 +182,7 @@ nlopt_result sbplx_minimize(int n, nlopt_func f, void *f_data,
          if (ret != NLOPT_XTOL_REACHED) goto done;
 
          /* termination tests: */
-         if (nlopt_stop_f(stop, *minf, fprev)) {
+         if (nlopt_stop_ftol(stop, *minf, fprev)) {
                ret = NLOPT_FTOL_REACHED;
                goto done;
          }