|
From: Luigi B. <lui...@gm...> - 2009-03-09 15:14:24
|
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 |