From: Janek Kozicki (janek_listy_at_[hidden])
Date: 2006-12-12 15:26:23
Eric Niebler said: (by the date of Tue, 12 Dec 2006 09:59:19 -0800)
> What we need is an interpolating adapter. It would wrap a TimeSeries of
> one discretization and make it look like it has a different
> discretization, interpolating on the fly. Probably wouldn't be too hard.
Apart from lienar interpolation there are several others available. In
my research I needed to find "the best" interpolation function. If
you want to know what is the criterion of "the best", I can send you
a .pdf of my article that will soon appear in some journal.
So the best interpolation function in my reasearch was sinc256,
written on the very bottom of this webpage:
In firefox this formula is displayed wrongly, the '1/4' symbols
should be replaced with PI. That webpage is about image interpolation
in 2D. But it's plain simple to use it in 1D. Simply assume y=0.
Sinc256 will require 16 data points around the interpolated value (8
on left, 8 on right).
Another a bit worse interpolation is spline36 (also on that webpage),
it will need 6 points around the value (3 on left, 3 on right).
This is for you, just for the future reference, when you will decide
that you need some interpolation function for your library :)
-- Janek Kozicki |
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk