forum.alglib.net

ALGLIB forum
It is currently Sun Dec 22, 2024 7:45 pm

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Store Line in Database
PostPosted: Wed Sep 28, 2011 2:11 pm 
Offline

Joined: Thu Jul 21, 2011 1:44 pm
Posts: 3
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


Top
 Profile  
 
 Post subject: Re: Store Line in Database
PostPosted: Wed Sep 28, 2011 7:29 pm 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
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.


Top
 Profile  
 
 Post subject: Re: Store Line in Database
PostPosted: Thu Sep 29, 2011 1:37 pm 
Offline

Joined: Thu Jul 21, 2011 1:44 pm
Posts: 3
Perfect!

Thanks for your help!

-Keegan


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 31 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group