Re: Kernel Interpolation
Posted by
Dimathematician on
URL: http://quantlib.414.s1.nabble.com/Kernel-Interpolation-tp12650p12652.html
Thanks Luigi,
makes sence. I considered this in my implementation. I finished my
implementations which you can find in the following zip:
www.longvega.com/KernelInterpolation.zip
ready for submission from my perspective. The test functions can be copied
straightforwardly to the other test functions in interpolations.cpp in the
testcases project.
Not sure if this form of submission is convenient for you, let me know
if some other form creates less work.
Best regards, Dima
2009/3/9 Luigi Ballabio
<[hidden email]>
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
------------------------------------------------------------------------------
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev