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:
43353be
)
bug fix in grosenbrock gradient (no wonder StoGO etc. were so bad for this functioon)
author
stevenj
<stevenj@alum.mit.edu>
Mon, 3 Sep 2007 19:22:07 +0000
(15:22 -0400)
committer
stevenj
<stevenj@alum.mit.edu>
Mon, 3 Sep 2007 19:22:07 +0000
(15:22 -0400)
darcs-hash:
20070903192207
-c8de0-
cef32242ac0bc7308b24d07ae31e2e9e1c6c463a
.gz
test/testfuncs.c
patch
|
blob
|
history
diff --git
a/test/testfuncs.c
b/test/testfuncs.c
index cff30974aefa358a3b3d11e7cc18b46ccf2aa91a..3865e20558488f2511013c286107db5cefe9ffd5 100644
(file)
--- a/
test/testfuncs.c
+++ b/
test/testfuncs.c
@@
-125,7
+125,7
@@
static double grosenbrock_f(int n, const double *x, double *grad, void *data)
double a = x[i+1] - x[i] * x[i], b = 1 - x[i];
if (grad) {
grad[i] += -400 * a * x[i] - 2*b;
- grad[i+1] =
-
200 * a;
+ grad[i+1] = 200 * a;
}
f += 100 * sqr(a) + sqr(b);
}