+NLopt 2.4
+
+* New genetic algorithm ESCH, thanks to Carlos Henrique da Silva Santos.
+
+* Fix swig dir for VPATH builds, thanks to Sandro Vitenti for the bug report.
+
+* Bugfix in copy constructor for C++ and Python interfaces.
+
NLopt 2.3.1 (16 September 2012)
* Bug fix: COBLYA should return ROUNDOFF_LIMITED rather than XTOL_REACHED
NLOPT_EXTERN(void) nlopt_set_munge(nlopt_opt opt,
nlopt_munge munge_on_destroy,
nlopt_munge munge_on_copy);
+typedef void* (*nlopt_munge2)(void *p, void *data);
+NLOPT_EXTERN(void) nlopt_munge_data(nlopt_opt opt,
+ nlopt_munge2 munge, void *data);
/*************************** DEPRECATED API **************************/
/* The new "object-oriented" API is preferred, since it allows us to
}
}
+void NLOPT_STDCALL nlopt_munge_data(nlopt_opt opt,
+ nlopt_munge2 munge, void *data) {
+ if (opt && munge) {
+ unsigned i;
+ opt->f_data = munge(opt->f_data, data);
+ for (i = 0; i < opt->m; ++i)
+ opt->fc[i].f_data = munge(opt->fc[i].f_data, data);
+ for (i = 0; i < opt->p; ++i)
+ opt->h[i].f_data = munge(opt->h[i].f_data, data);
+ }
+}
+
/*************************************************************************/