From: stevenj Date: Tue, 11 Nov 2008 22:35:24 +0000 (-0500) Subject: call stop_ftol instead of stop_f if we check minf_max elsewhere X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=7fb453001d1612d0dab3145c15af90ed7587ef77;p=nlopt.git call stop_ftol instead of stop_f if we check minf_max elsewhere darcs-hash:20081111223524-c8de0-9267e6cc8db7693ebc0060f11c831b66e6c9903c.gz --- diff --git a/neldermead/nldrmd.c b/neldermead/nldrmd.c index db40d3e..72d0d02 100644 --- a/neldermead/nldrmd.c +++ b/neldermead/nldrmd.c @@ -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; } diff --git a/neldermead/sbplx.c b/neldermead/sbplx.c index 1d20480..9d89688 100644 --- a/neldermead/sbplx.c +++ b/neldermead/sbplx.c @@ -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; }