Re: Kernel Interpolation

Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Kernel-Interpolation-tp12650p12651.html

On Mon, 2009-03-09 at 14:40 +0100, Dima wrote:

> I'm almost done with coding an additional 1D interpolation technique:
> the kernel approach, which can
> for example be found in the book "Foreign Exchange Risk" by Hakkala,
> Wystup. I plan to
> code it for 2D later.
>
> I have some questions regarding the existing interpolation functions:
>
> - As usual: Any reasons not to include it? Is someone else working on
> the same project?

Not that I know of.

> - The existing  classes all have primitive, derivative and second
> derivative functions, which I don't all have for kernels. What shall I
> do? Return a zero/throw error?

Throw an error.

> - For me its not really clear, what the function update is doing. Can
> someone elaborate?

It recalculates the interpolation coefficients.  The point is that the
Interpolation object only stores iterators into the underlying data, not
a copy of the data.  If external code changes the original data, it will
invalidate the interpolation (since the stored interpolated coefficients
are still based on the old data, but the stored iterators will now
access the new data.) After changing the data, the external
code---which, usually, is some method of the object storing the data and
the interpolation---must call update() to renew the interpolation
coefficients.

Luigi


--

Prediction is very difficult, especially if it's about the future.
-- Niels Bohr



------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev