chiark / gitweb /
change lb/ub field in Matlab interface to lower_bounds/upper_bounds, for consistency
authorstevenj <stevenj@alum.mit.edu>
Wed, 16 Jun 2010 00:45:10 +0000 (20:45 -0400)
committerstevenj <stevenj@alum.mit.edu>
Wed, 16 Jun 2010 00:45:10 +0000 (20:45 -0400)
darcs-hash:20100616004510-c8de0-9ef715297bbfeaf62e5ee94485294500f41dd1cf.gz

octave/nlopt_minimize_constrained.m
octave/nlopt_optimize-mex.c
octave/nlopt_optimize-oct.cc
octave/nlopt_optimize.m

index fb9d503b21b12ccafbe9ca46a9c5efc71d32edc8..8d3cee67bab4e80a11e778a7b653fae415572621 100644 (file)
@@ -95,8 +95,8 @@ if (isfield(stop, 'minf_max'))
 end
 opt.algorithm = algorithm;
 opt.min_objective = @(x) f(x, f_data{:});
-opt.lb = lb;
-opt.ub = ub;
+opt.lower_bounds = lb;
+opt.upper_bounds = ub;
 for i = 1:length(fc)
   opt.fc{i} = @(x) fc{i}(x, fc_data{i}{:});
 end
index cde3a44ff2fe1090d44c8d076defe57e61230814..56ca0d98164b82e3d682ac3051646d63e7206a77 100644 (file)
@@ -135,9 +135,9 @@ nlopt_opt make_opt(const mxArray *opts, unsigned n)
      opt = nlopt_create(algorithm, n);
      CHECK1(opt, "nlopt: out of memory");
 
-     nlopt_set_lower_bounds(opt, struct_arrval(opts, "lb", n,
+     nlopt_set_lower_bounds(opt, struct_arrval(opts, "lower_bounds", n,
                                               fill(tmp, n, -HUGE_VAL)));
-     nlopt_set_upper_bounds(opt, struct_arrval(opts, "ub", n,
+     nlopt_set_upper_bounds(opt, struct_arrval(opts, "upper_bounds", n,
                                               fill(tmp, n, +HUGE_VAL)));
 
      nlopt_set_stopval(opt, struct_val_default(opts, "stopval", -HUGE_VAL));
index f95f7ecddcd5b8d39ef42182147f9f0f261c215b..f5b1dd62eca258b4f156cb657ce3ce8149d4eee5 100644 (file)
@@ -151,13 +151,13 @@ nlopt_opt make_opt(Octave_map &opts, int n)
   CHECK1(opt, "nlopt: out of memory");
 
   Matrix m_inf(1, n, -HUGE_VAL);
-  Matrix lb = struct_val_default(opts, "lb", m_inf);
-  CHECK1(n == lb.length(), "wrong length of opt.lb");
+  Matrix lb = struct_val_default(opts, "lower_bounds", m_inf);
+  CHECK1(n == lb.length(), "wrong length of opt.lower_bounds");
   CHECK1(nlopt_set_lower_bounds(opt, lb.data()) > 0, "nlopt: out of memory");
 
   Matrix p_inf(1, n, +HUGE_VAL);
-  Matrix ub = struct_val_default(opts, "ub", p_inf);
-  CHECK1(n == ub.length(), "wrong length of opt.ub");
+  Matrix ub = struct_val_default(opts, "upper_bounds", p_inf);
+  CHECK1(n == ub.length(), "wrong length of opt.upper_bounds");
   CHECK1(nlopt_set_upper_bounds(opt, ub.data()) > 0, "nlopt: out of memory");
 
   nlopt_set_stopval(opt, struct_val_default(opts, "stopval", -HUGE_VAL));
index 6d0d85bebac7cd69f96d9dd8b2441a1cb019fd45..1377689284e6eaad80f450ee575c7f17cb79afa4 100644 (file)
 % BOUND CONSTRAINTS:
 %
 % Lower and/or upper bounds for the design variables x are specified
-% via opt.lb and/or opt.ub, respectively: these are vectors (of the
-% same length as xinit, above) giving the bounds in each component.
-% An unbounded component may be specified by a lower/upper bound of
-% -inf/+inf, respectively.  If opt.lb and/or opt.ub are not specified,
-% the default bounds are -inf/+inf (i.e. unbounded), respectively.
+% via opt.lower_bounds and/or opt.upper_bounds, respectively: these
+% are vectors (of the same length as xinit, above) giving the bounds
+% in each component. An unbounded component may be specified by a
+% lower/upper bound of -inf/+inf, respectively.  If opt.lower_bounds
+% and/or opt.upper_bounds are not specified, the default bounds are
+% -inf/+inf (i.e. unbounded), respectively.
 %
 % NONLINEAR CONSTRAINTS:
 %