public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Rhys Ulerich <rhys.ulerich@gmail.com>
To: Brian Gough <bjg@gnu.org>
Cc: gsl-discuss@sourceware.org
Subject: Re: Where a generalized Richardson extrapolation routine would fit in  GSL?
Date: Thu, 17 Dec 2009 00:44:00 -0000	[thread overview]
Message-ID: <4a00655d0912161643k63868ac4i2577f618f6e2196@mail.gmail.com> (raw)
In-Reply-To: <87zl5ig7i0.wl%bjg@network-theory.co.uk>

> Also, are the "exact/normtable" arguments essential or just for
> convenience? If they can be computed easily by the user it would be
> good to have only a minimal number of arguments in the base function.

They're just for convenience.  Computing the norms doesn't require
difficult coding, but doing it in a storage and efficient way for the
vector case requires computing those norms during the extrapolation
process. It isn't difficult but it does require some index futzing.

> Ideally I'd like to start with a scalar version using normal C arrays,
> similar to the gsl_sum functions, for implementation simplicity.

For API simplicity?  Or simplicity of the underlying implementation?
There's just enough to the argument processing and general normtable
handling that it's easier to get good test coverage if there's one
implementation that does the whole enchilada and then everything else
sits as convenience wrappers.  That prevents changes to one
convenience function from accidentally changing the interface's
semantics (especially for the 'k' handling).

All that said, I'm happy to make the interface conform.  Would you be
willing to take draft public API in gsl_extrap.h (inline below) and
change the functions and their signatures to resemble what you'd like?
 That'll save me from needing to update the unit tests and
documentation as we iterate to convergence.

- Rhys

The declarations from that last patch look like:

int
gsl_extrap_richardson_vector_step(
        gsl_vector * Ah,
        const gsl_vector * Aht,
        double t,
        double ki);

int
gsl_extrap_richardson_step(
        double * Ah,
        const double * Aht,
        double t,
        double ki);

int
gsl_extrap_richardson_vector(
        gsl_matrix * A,
        double t,
        const gsl_vector * k,
        gsl_matrix * normtable,
        const gsl_vector * exact);

int
gsl_extrap_richardson(
        gsl_vector * A,
        double t,
        const gsl_vector * k,
        gsl_matrix * normtable,
        double exact);

  reply	other threads:[~2009-12-17  0:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4a00655d0908201247g7d7bd9a1t466f4a66f08df4@mail.gmail.com>
     [not found] ` <4a00655d0911291536t5a11752fp27ab9c274148f822@mail.gmail.com>
2009-11-29 23:39   ` Rhys Ulerich
2009-12-01 14:08     ` Brian Gough
2009-12-13 23:49       ` Rhys Ulerich
2009-12-15 17:17         ` Brian Gough
2009-12-15 17:31           ` Rhys Ulerich
2009-12-16  4:25             ` Rhys Ulerich
2009-12-16 17:21             ` Brian Gough
2009-12-17  0:44               ` Rhys Ulerich [this message]
2009-12-17 22:50                 ` Brian Gough
2009-12-18 17:21                   ` Brian Gough
2010-02-06 15:26                     ` Rhys Ulerich
2010-02-09  8:47                       ` Brian Gough

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=4a00655d0912161643k63868ac4i2577f618f6e2196@mail.gmail.com \
    --to=rhys.ulerich@gmail.com \
    --cc=bjg@gnu.org \
    --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).