Cubic spline
Cubic spline
Hi Sergey,
I have found some code that does exactly what you need, and is also quite fast. I have tested it for 300,000 knots and it provided an answer in less than 1 second on my 1.6 GHz computer. The code is available at the following link http://www.pcs.cnu.edu/~bbradie/cinterpolation.html
The only drawback is that this library provides several other interpolation routines inside the same header file, and that there are basically 3 functions (cubic_nak, tridiagonal, spline_eval) that you need in order to solve your problem. That's why I suggest that I first create a single class/function based on these 3 functions, and perhaps also optimize their code a bit. In the end we will have new module solving not-a-knot cubic spline interpolation, which should be identical to the matlab version.
I can send you my VC++ project to demonstrate how this library works. Just send me an email and I'll reply as soon as possible. You can send me an email by going to: http://www.codecogs.com/pages/email/sendmail.php?user=lucian~9ca206432b
Login