forum.alglib.net http://forum.alglib.net/ |
|
Store Line in Database http://forum.alglib.net/viewtopic.php?f=2&t=450 |
Page 1 of 1 |
Author: | KeeganWB [ Wed Sep 28, 2011 2:11 pm ] |
Post subject: | Store Line in Database |
I have a program that calculates many lines at one time. For example, I use dataset A and dataset B to calculate a spline called C. The data in A and B is always the same; therefore, the spline C is always the same. In my program, I store spline C in the following variable: Code: alglib.spline1dinterpolant compLine; In an effort to speed up the program, I would like to store "compLine" in an SQL database, that way I can recall the line rather than recalling all of the data in A and B just to recalculate line C. Any help would be GREATLY appreciated!! THANKS! -Keegan |
Author: | Sergey.Bochkanov [ Wed Sep 28, 2011 7:29 pm ] |
Post subject: | Re: Store Line in Database |
Current version of ALGLIB does not support serialization of splines. However, you can manually serialize spline and restore it: * in case it is linear spline just store set of nodes and function values at these nodes. next call to spline1dbuildlinear() will generate same spline * in case it is nonlinear (C2 continuous cubic, Hermite or Akima) spline - store set of nodes, spline values and derivatives. You can reconstruct spline by passing these values to spline1dbuildhermite (same function for all nonlinear splines, because all these splines internally represented as Hermite splines). I hope this will help you. |
Author: | KeeganWB [ Thu Sep 29, 2011 1:37 pm ] |
Post subject: | Re: Store Line in Database |
Perfect! Thanks for your help! -Keegan |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |