chiark
/
gitweb
/
~ianmdlvl
/
nlopt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix evil bug in MMA dual function that was leading to incorrect gradient and lots...
[nlopt.git]
/
mma
/
mma.c
diff --git
a/mma/mma.c
b/mma/mma.c
index 7dae61b6b800b8e5f6f10b4215b9219fc1dec863..4658cf58c244db77710917c75828fc3d9fe1ec57 100644
(file)
--- a/
mma/mma.c
+++ b/
mma/mma.c
@@
-99,7
+99,7
@@
static double dual_func(int m, const double *y, double *grad, void *d_)
d->wval += 0.5 * dx2 * denominv;
for (i = 0; i < m; ++i)
gcval[i] += (dfcdx[i*n+j] * c + (fabs(dfcdx[i*n+j])*sigma[j]
- + 0.5*rhoc[
j
]) * dx2)
+ + 0.5*rhoc[
i
]) * dx2)
* denominv;
}