public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Bill Maier <shufflesky@hotmail.com>
To: "gsl-discuss@sourceware.org" <gsl-discuss@sourceware.org>
Subject: Bug #45782
Date: Mon, 23 Nov 2015 20:07:00 -0000	[thread overview]
Message-ID: <BLUPR16MB01969E3A98E6947F467C71A8C9070@BLUPR16MB0196.namprd16.prod.outlook.com> (raw)

The actual implementation of this feature is rather straightforward. The
function that numerically computes the Jacobian already has a parameter for
epsilon, so it's just a question of getting that information from the user to
the function call.

The main question I have is how to give the user a way to specify this
epsilon while maintaining backward compatibility. Right now the interface
for multiroot solvers is well-defined: alloc, set, iterate, and free. The
most obvious place to introduce an additional parameter would be in the
"set" call, gsl_multiroot_fsolver_set(), but currently there's no facility
there for another parameter. We could add another argument to the call which
would contain the epsilon value. Just tacking it on would lose backward
compatibility, but we could create an additional "set" call, something like
gsl_multiroot_fsolver_params_set(). This call would have an additional
argument, something like "fsolver_params" which would be a structure with
additional parameters for the solver including the epsilon value. We would
then have two "set" calls for fsolvers. Using a new structure allows for
future parameters to be added if needed.

Another option which leaves the current user interface intact would be
to add the epsilon parameter to the gsl_multiroot_fsolver structure. In the
function gsl_multiroot_fsolver_alloc() function the epsilon value would be
set to the current default of GSL_SQRT_DBL_EPSILON to maintain backward
compatibility. If the user wanted it to be something different, he would set
the epsilon value manually with a line of code like
    solver->epsilon = 1.0e-4
at a point after the solver allocation but before the call to
gsl_multiroot_fsolver_set(). This option has the advantage of maintaining the
current user interface, but establishing a manual bypass to it doesn't seem
like a good design choice.

I am interested in hearing from other GSL developers and users which option
they think is the most appropriate for this library. Personally I think the
first option, adding a new "set" call with an additional argument, is the
cleanest way to go, though it does expand the user interface.

-Bill Maier

                 reply	other threads:[~2015-11-23 20:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BLUPR16MB01969E3A98E6947F467C71A8C9070@BLUPR16MB0196.namprd16.prod.outlook.com \
    --to=shufflesky@hotmail.com \
    --cc=gsl-discuss@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).