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:
e537f38
)
bug fix in nlopt_set_lower_bounds1, thanks to @wojdyr
author
Steven G. Johnson
<stevenj@alum.mit.edu>
Tue, 26 May 2015 15:00:46 +0000
(11:00 -0400)
committer
Steven G. Johnson
<stevenj@alum.mit.edu>
Tue, 26 May 2015 15:00:46 +0000
(11:00 -0400)
api/options.c
patch
|
blob
|
history
diff --git
a/api/options.c
b/api/options.c
index b2ce5febb55fc73a7214c67a2f530c07047d11f9..626a38b8c04323f69ed2be1020a236a7587b3a68 100644
(file)
--- a/
api/options.c
+++ b/
api/options.c
@@
-287,8
+287,8
@@
NLOPT_STDCALL nlopt_set_lower_bounds1(nlopt_opt opt, double lb)
nlopt_unset_errmsg(opt);
if (opt) {
unsigned i;
- for (i = 0; i < opt->n; ++i)
- opt->lb[i] = lb;
{
+ for (i = 0; i < opt->n; ++i)
{
+ opt->lb[i] = lb;
if (opt->lb[i] < opt->ub[i] && nlopt_istiny(opt->ub[i] - opt->lb[i]))
opt->lb[i] = opt->ub[i];
}