On Fri, Mar 12, 2010 at 1:21 PM, Olaf Till <[email protected]> wrote: > On Fri, Mar 12, 2010 at 10:13:29AM +0100, Olaf Till wrote: >> ... >> > Why would it be bad to copy the Matlab interfaces (I've never used them >> > so I'm asking out of ignorance) ? Are they simply poor interfaces? >> >> I just meant that we should think that over. (One issue that occurs to >> me immediately is the name: 'lsq...' seems to stand for 'least >> squares', which is too special since one could have optimizers which >> optimize with respect to other things than least squares). > > Just realized that much of this decision is long over, since Octave > seems to copy the functionality of Matlabs 'optimset' and 'optimget' > functions. I had thought of something like two levels --- > compatibility functions which map Matlabs options to Octave options > --- so that its possible to introduce a new option without fear to > have to change its name later if Matlab decides to use just this name > for a different thing ... >
I don't see any advantages in doing that. optimset/optimget are just utility functions, they don't understand the options in any way, it's up to the optimization functions to decide what to do with them. > This is not academic: Matlabs 'lsqcurvefit' takes bounds as direct > arguments, but no general linear (or non-linear) constraints. Linear > inequality constraints, however, are now offered by our 'leasqr'. So > constraints would have to be passed via the 'options' argument of > 'lsqcurvefit'. (And BTW I think that constraints really _belong_ into > an options argument, and bounds also). But Matlabs 'optimset', which > is used to prepare the 'options' argument, does not know an option for > constraints. > > Without the two levels above, Octaves 'optimset' should always allow > even unknown options to avoid the problem of synchronization between > Octave and Octave Forge. > > Olaf > Uh-huh. I guess you didn't actually read the code of optimset/optimget in Octave. I suggest you do, and also inspect the existing optimization functions (fzero, fsolve etc) to find out how options are registered (pay attention to the PKG_ADD stubs). hth -- RNDr. Jaroslav Hajek, PhD computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Octave-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/octave-dev
