I have several data points on which I would like to perform three
types of interpolation:
linear interpolation
polynomial interpolation
natural cspline interpolation
I am rather new to Fortran and I don't really know where to search for
these routines. I googled, but all I found so far was a polynomial
interpolation and cspline interp. routine in Numerical Recipes (for
Fortran 77, Vol. 1, see http://www.nrbook.com/a/bookfpdf.php). But as
the codes seem not to be free, I was wondering whether I would find
routines in LAPACK or BLAS. But so far, I didn't.
Do you know whether there are free and working routines for what I'm
trying to do? If so, where can they be found? Maybe in LAPACK, BLAS,
GSL or somewhere else?
I'd be grateful for several hints!
Regards,
Alexander
As can be inferred from
http://www.gnu.org/software/gsl/manual/html_node/Interpolation.html
the GNU Scientific Library indeed offers various interpolation types.
A Fortran wrapper (which is not quite up to date with the present
GSL release) is available at
http://www.lrz-muenchen.de/services/software/mathematik/gsl/fortran/index.html
Best Regards
Reinhold
Alexander Erlich schrieb:
I don't remember the exact terms, but you are supposed to buy
the book and then you can use the routines. Used books might
be available for a low price.
The general idea, though, is that you use the routines as a
starting point as you learn about the underlying methods, and
then adapt them. They are specifically not designed as black
boxes, like some other NR packages. You are supposed to look
inside, along with the explanation in the book.
-- glen
thanks, good to know that GSL holds what I need. Still, I was
wondering whether there there are no interpolation routines in LAPACK
(or BLAS)? I couldn't find them so far. Still our instructor
recommended LAPACK and BLAS because they are better tested, and I also
have some experience implementing LAPACK, so it would be really
convenient to take LAPACK interpolation routines, if available.
Regards,
Alexander
There aren't any. Both packages are concerned with providing basic and
advanced linear algebra functionality, i.e. linear matrix operations.
Still our instructor
> recommended LAPACK and BLAS because they are better tested, and I also
> have some experience implementing LAPACK, so it would be really
> convenient to take LAPACK interpolation routines, if available.
>
> Regards,
> Alexander
Regards,
Reinhold
LAPACK is not a general mathematical library, it is specifically for
linear algebra problems. Of course, there are ways to do interpolation
using linear algebra routines (e.g. cubic splines), but I think you are
looking for more general algorithms. You can find source code for more
general mathematical problems at <http://www.netlib.org>. If you do a
search for the word "interpolation" you will get 52 matches.
$.02 -Ron Shepard