This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

GSL-0.9 -> Standard interface to functions/pakages


Hi List,

After working with gsl_min,gsl_multifit etc., I find the lack of standard
interface as a great weakness when using gsl.

First of, it should be suffcient for the solvers, and minimizers with one
interface to usersupplied functions and derivatives:

f(R^1) -> R^1
f(R^1) -> R^m
f(R^n) -> R^1
f(R^n) -> R^m

Which can all be handled by an interface as:

gsl_(???)_function_f: 
int (* f) (const gsl_vector * X, void * PARAMS, gsl_vector* F)
gsl_(???)_function_df:
int (* df) (const gsl_vector * X, void * PARAMS, gsl_matrix * J)
gsl_(???)_function_fdf:
int (* fdf) (const gsl_vector * X, void * PARAMS, gsl_vector * F,gsl_matrix * J)

Currently each optimizing-pakage has it own similar definition, when the
interface above clearly should be sufficient.

-------

Next up, using the above definition GSL should be able to provide the
users with a simplified interface to both solvers, minimizers and
maximizers. I.e. use of the interface should only be 3-4 steps:

1. Initialise (alloc) pakage, using usersupplied values or default.
2. Do optimization.
(3.) User-controlled iteration.
4. Terminate (free) pakage.

Most of the pakage would ofcourse just be a wrapper for the existing
solvers in GSL.

My point is that little enhancements, and the ability to try functions
implemented in gsl, without the need of a big program to setup *all*
options, and allocations would greatly improve upon
development-time, allthough the pakage might give a performancehit. It can
be seen as a higherlevel interface to lowerlevel functions. If users want
more direct control, they can offcourse use the lower-level pakages
directly.

Actually something as simple as a usefull numberingscheme for the number 
of independent variables in a function and number of returned values would
be of great use (n,p are currently used inconsistently):

nx = dimension of x - now n, p, m.
nf = dimension of function returnvalue, now normally p.

What the pakage should be called I don't know - gsl_optim might be a
little too close to Matlab ;o)

I wouldn't mind doing the framework, when I've finished the "direct
search, SIMPLEX", currently underway.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]