chiark
/
gitweb
/
~ianmdlvl
/
nlopt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a4c19a8
)
only check ftol on iterations where fmin decreased; seems to make this stopping condi...
author
stevenj
<stevenj@alum.mit.edu>
Wed, 29 Aug 2007 04:52:01 +0000
(
00:52
-0400)
committer
stevenj
<stevenj@alum.mit.edu>
Wed, 29 Aug 2007 04:52:01 +0000
(
00:52
-0400)
darcs-hash:
20070829045201
-c8de0-
241983936b8a9a08b449d4018baa6d6a9d226c22
.gz
cdirect/cdirect.c
patch
|
blob
|
history
diff --git
a/cdirect/cdirect.c
b/cdirect/cdirect.c
index 5b7200c545db72b76fe062fb1275dda767cf4af7..3e9a40ca2739d6510a1e242f6343d1daf1283690 100644
(file)
--- a/
cdirect/cdirect.c
+++ b/
cdirect/cdirect.c
@@
-407,7
+407,7
@@
nlopt_result cdirect_unscaled(int n, nlopt_func f, void *f_data,
double fmin0 = p.fmin;
ret = divide_good_rects(&p);
if (ret != NLOPT_SUCCESS) goto done;
- if (nlopt_stop_f(p.stop, p.fmin, fmin0)) {
+ if (
p.fmin < fmin0 &&
nlopt_stop_f(p.stop, p.fmin, fmin0)) {
ret = NLOPT_FTOL_REACHED;
goto done;
}