提交 1afcb865 编写于 作者: S stevenj

bug fix - xtol is only met if true for *all* components of x, not just for one

darcs-hash:20080729061320-c8de0-77347389447843be32fb38d6050893f706c271d1.gz
上级 bdcc042d
......@@ -23,9 +23,9 @@ int nlopt_stop_x(const nlopt_stopping *s, const double *x, const double *oldx)
{
int i;
for (i = 0; i < s->n; ++i)
if (relstop(oldx[i], x[i], s->xtol_rel, s->xtol_abs[i]))
return 1;
return 0;
if (!relstop(oldx[i], x[i], s->xtol_rel, s->xtol_abs[i]))
return 0;
return 1;
}
static double sc(double x, double smin, double smax)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册