chiark / gitweb /
fixed Matlab plugin
authorstevenj <stevenj@alum.mit.edu>
Wed, 12 May 2010 15:01:53 +0000 (11:01 -0400)
committerstevenj <stevenj@alum.mit.edu>
Wed, 12 May 2010 15:01:53 +0000 (11:01 -0400)
darcs-hash:20100512150153-c8de0-b50f3e7a70cd3b834eef51b8b3123df0ee83dacb.gz

octave/nlopt_optimize-mex.c

index 495619281ca85f4bb1d1caa3e178b054a0337fd2..cde3a44ff2fe1090d44c8d076defe57e61230814 100644 (file)
@@ -146,9 +146,9 @@ nlopt_opt make_opt(const mxArray *opts, unsigned n)
      nlopt_set_xtol_rel(opt, struct_val_default(opts, "xtol_rel", 0.0));
      nlopt_set_xtol_abs(opt, struct_arrval(opts, "xtol_abs", n,
                                           fill(tmp, n, 0.0)));
-     nlopt_set_xtol_rel(opt, struct_val_default(opts, "maxeval", 0.0) < 0 ?
-                       0 : struct_val_default(opts, "maxeval", 0.0));
-     nlopt_set_xtol_rel(opt, struct_val_default(opts, "maxtime", 0.0));
+     nlopt_set_maxeval(opt, struct_val_default(opts, "maxeval", 0.0) < 0 ?
+                      0 : struct_val_default(opts, "maxeval", 0.0));
+     nlopt_set_maxtime(opt, struct_val_default(opts, "maxtime", 0.0));
 
      nlopt_set_population(opt, struct_val_default(opts, "population", 0));