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:
e3970b1
)
whoops
author
stevenj
<stevenj@alum.mit.edu>
Fri, 24 Aug 2007 02:53:47 +0000
(22:53 -0400)
committer
stevenj
<stevenj@alum.mit.edu>
Fri, 24 Aug 2007 02:53:47 +0000
(22:53 -0400)
darcs-hash:
20070824025347
-c8de0-
c995e338829c25db49e5b822ed1563ebdd97eadf
.gz
api/nlopt.c
patch
|
blob
|
history
test/testopt.cpp
patch
|
blob
|
history
diff --git
a/api/nlopt.c
b/api/nlopt.c
index ef3acf959e047088621ac7dede46a8598fcd2e72..5de528219c6d2920d519a69abae0ea927faa78f4 100644
(file)
--- a/
api/nlopt.c
+++ b/
api/nlopt.c
@@
-135,7
+135,7
@@
nlopt_result nlopt_minimize(
}
iret = lbfgsb_minimize(n, f, f_data, x, nbd, lb, ub,
MIN(n, 5), 0.0, ftol_rel,
- xtol_abs ?
xtol_rel : *xtol_abs
,
+ xtol_abs ?
*xtol_abs : xtol_rel
,
maxeval);
free(nbd);
if (iret <= 0) {
diff --git
a/test/testopt.cpp
b/test/testopt.cpp
index 3599f51411a3f6f41451935a6b1b4df5b74ef4e9..795a39cf177b02f3103d16be1f79be65c7a836d4 100644
(file)
--- a/
test/testopt.cpp
+++ b/
test/testopt.cpp
@@
-125,6
+125,9
@@
int main(int argc, char **argv)
srand((unsigned) time(NULL));
testfuncs_verbose = 0;
+ if (argc <= 1)
+ usage(stdout);
+
while ((c = getopt(argc, argv, "hvra:o:e:")) != -1)
switch (c) {
case 'h':