forum.alglib.net

ALGLIB forum
It is currently Sun Dec 22, 2024 8:32 am

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  [ 5 posts ] 
Author Message
 Post subject: spline1dbuildlinear question
PostPosted: Mon Jan 03, 2011 9:01 pm 
Offline

Joined: Mon Jan 03, 2011 8:38 pm
Posts: 3
Hello!
Thank you for this great library. It appears to be very useful for my purpose. Unfortunately, i didn't have enough time to make out how it operates inside, so my question may seem silly for you.

I use spline1dbuildlinear to get spline1dinterpolant which allows me(by means of spline1dcalc() method) to get Y values by passing the X ones. Now I'm looking for the opposite transformation( I need to get X values from Y using the same spline1dinterpolant). Could you please advice me the best way to do it using algLib?

PS see attached image for more details.


Attachments:
chart.PNG
chart.PNG [ 13.97 KiB | Viewed 5683 times ]
Top
 Profile  
 
 Post subject: Re: spline1dbuildlinear question
PostPosted: Tue Jan 04, 2011 11:06 am 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
There is no easy way to do so, i.e. there is no special function to solve such a problem. But you can unpack spline coefficients with spline1dunpack function and solve linear equations c0*x+c1 = y.


Top
 Profile  
 
 Post subject: Re: spline1dbuildlinear question
PostPosted: Tue Jan 04, 2011 2:05 pm 
Offline

Joined: Mon Jan 03, 2011 8:38 pm
Posts: 3
thanks, that's exectly what I needed.


Top
 Profile  
 
 Post subject: Re: spline1dbuildlinear question
PostPosted: Tue Jan 04, 2011 4:32 pm 
Offline

Joined: Mon Jan 03, 2011 8:38 pm
Posts: 3
Hello again.
I need to find local maximum of smooth function(result of experiment data approximation). I couldn't find any mentions of such functionality in ALGLIB Reference Manual. Probably, I used the wrong key words, because I'm not well familiar with mathematical analysis. Does ALGLIB offer functionality for this purpose?


Top
 Profile  
 
 Post subject: Re: spline1dbuildlinear question
PostPosted: Wed Jan 05, 2011 10:29 am 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
It is called "numerical optimization". Take a look at http://www.alglib.net/optimization/ It describes methods for minimization of smooth functions, but max(f) is the same as min(-f), so you can easily convert your problem to the minimization of a smooth function.

The only issue is that these methods were developed for N-dimensional minimization. They will work in 1-dimensional case too, but several times slower than specialized methods for 1-dimensional optimization.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 29 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