提交 a062f036 编写于 作者: S stevenj

bug fix to convergence test (only relevant to sbplx); thanks to Douglas Bates

Ignore-this: d163aaae150e0a9c8ae268109abdf48

darcs-hash:20111208020030-c8de0-0b3b621b4fbefb980ec7188f0a5be99a5b1d9adc.gz
上级 bd693af5
......@@ -175,7 +175,7 @@ nlopt_result nldrmd_minimize_(int n, nlopt_func f, void *f_data,
*fdiff = fh - fl;
if (init_diam == 0) /* initialize diam. for psi convergence test */
for (i = 0; i < n; ++i) init_diam = fabs(xl[i] - xh[i]);
for (i = 0; i < n; ++i) init_diam += fabs(xl[i] - xh[i]);
if (psi <= 0 && nlopt_stop_ftol(stop, fl, fh)) {
ret = NLOPT_FTOL_REACHED;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册