Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,988 Was thanked: 1127 time(s) in 723 post(s)
|
Didn't find an explicit alglib topic, thus I post this here: It seems that the convolution function from the alglib plugin does not care for the second and fourth arguments (problem size in alglib ). I guess that the problem size is nothing else than the size of the 1st and 3rd arguments, thus they are obsolete. If that is correct than I suggest to provide a convr1d(2) function. BTW, a real symmetric eigensolver would be fine... It seems that the alglib license does not allow for inclusion of the plugin in any smath distribution, except if someone buys a commercial license. [Moderator]: Moved.Edited by moderator 18 June 2018 15:10:29(UTC)
| Reason: Not specified File Attachment(s): conv.sm (7kb) downloaded 113 time(s). mkraska attached the following image(s): |
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
|
Russia ☭ forever Viacheslav N. Mezentsev |
3 users thanked uni for this useful post.
|
on 27/04/2013(UTC), on 27/04/2013(UTC), on 08/05/2013(UTC)
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
Originally Posted by: mkraska It seems that the convolution function from the alglib plugin does not care for the second and fourth arguments (problem size in alglib ). I guess that the problem size is nothing else than the size of the 1st and 3rd arguments, thus they are obsolete.
If that is correct than I suggest to provide a convr1d(2) function. I think it's best to follow the description in the source code (see doc.pdf). I corrected the behavior of the function and added an inverse function convr1dinv(). |
Russia ☭ forever Viacheslav N. Mezentsev |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,988 Was thanked: 1127 time(s) in 723 post(s)
|
Originally Posted by: uni I think it's best to follow the description in the source code (see doc.pdf). I corrected the behavior of the function and added an inverse function convr1dinv().
Uni, thanks for the update. Now the function convr1d seems to insist on providing the correct vector sizes as arguments. This is not really an improvement unless values differing from the actual length can be provided for some magic purpose. I did not find any such hint in the doc. Thus, in order to keep the argument list lean, I would recommend to have convr1d(f;g) and let the interface determine the sizes as in the previous version. However, I do not want to distract you from progress in the xyplot-plugin! Martin |
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
Originally Posted by: mkraska Originally Posted by: uni I think it's best to follow the description in the source code (see doc.pdf). I corrected the behavior of the function and added an inverse function convr1dinv().
Thus, in order to keep the argument list lean, I would recommend to have convr1d(f;g) and let the interface determine the sizes as in the previous version. Ok, I'll add this too. It seems to me that I need to follow the documentation to describe the interfaces of functions. |
Russia ☭ forever Viacheslav N. Mezentsev |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,988 Was thanked: 1127 time(s) in 723 post(s)
|
Originally Posted by: uni Originally Posted by: mkraska Thus, in order to keep the argument list lean, I would recommend to have convr1d(f;g) and let the interface determine the sizes as in the previous version.
Ok, I'll add this too. It seems to me that I need to follow the documentation to describe the interfaces of functions. Thanks for considering the change. This would perhaps apply to the other integral transforms as well. When providing sort of convr1d(2), then you could add a hint to the doc string that the size parameters in alglib are determined from the actual size). The alglib version of the Beta function seems o return values if one argument is negative despite of the docs limiting the range to posive arguments. Also, in contrast to the implementation in the StatisticalTools Plugin, the function cannot handle complex numbers. I added the plugin to the inofficial SMath distribution. After a look at the alglib license I feel safe to do so. The available functions are (at least a little) documented in the Handbook based on alglib docs and examples by uni. Edited by user 28 April 2013 14:57:51(UTC)
| Reason: Not specified mkraska attached the following image(s): |
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
Updated. al_convr1d(2), al_convr1dinv(2) added. |
Russia ☭ forever Viacheslav N. Mezentsev |
2 users thanked uni for this useful post.
|
on 06/05/2013(UTC), on 06/05/2013(UTC)
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,988 Was thanked: 1127 time(s) in 723 post(s)
|
Originally Posted by: uni Updated. al_convr1d(2), al_convr1dinv(2) added.
Thanks for implementing the proposal. On my system, Example 2.sm fails to run correctly. If I replace the al_convr1dinv(4) by al_convr1dinv(2) then it is ok. My handbook examples show the same effect, on top of that, in conv.sm, there is an xy-plot-region throwiing an critical error. It does not recover, even if I fix the convolution problem with the new (2)-call. conv1.sm is the fixed version. Edited by user 06 May 2013 19:03:55(UTC)
| Reason: Not specified File Attachment(s): conv.sm (13kb) downloaded 61 time(s). |
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
Updated. al_nleqsolve() function added (Levenberg-Marquardt-like nonlinear solver). This algorithm solves system of nonlinear equations F(x). Parameters: Code:
X0 - starting point.
StepMax - maximum step length, >=0. Set StpMax to 0.0, if you don't want to limit step length.
Eps - >=0. The subroutine finishes its work if on k+1-th iteration the condition ||F||<=EpsF is satisfied.
Edited by user 08 May 2013 23:15:10(UTC)
| Reason: Not specified |
Russia ☭ forever Viacheslav N. Mezentsev |
1 user thanked uni for this useful post.
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Thank you uni for this one I could see that al_nleqsolve() will not work with f(v):eval(F(el(v,1),el(v,2),el(v,3)))j(v):eval(Jac(el(v,1),el(v,2),el(v,3)))Is there any way to make this possible? Regards, Radovan |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
I think it is not necessary, since the function within itself already performs this. I need more examples. Try this solver at work. |
Russia ☭ forever Viacheslav N. Mezentsev |
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Originally Posted by: uni I think it is not necessary, since the function within itself already performs this. I need more examples. Try this solver at work. I just have some frustrating experience when the Jacobian is involved, and would rather appreciated some "derivative free" algorithms of this kind. Here is just a playing with the NonlinearSolver plugin which includes Levenberg-Marquard algorithm and this one in AlgLib. For this particular example all performed quite well. Regards, Radovan |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
1 user thanked omorr for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
Originally Posted by: omorr Originally Posted by: uni I think it is not necessary, since the function within itself already performs this. I need more examples. Try this solver at work. I just have some frustrating experience when the Jacobian is involved, and would rather appreciated some "derivative free" algorithms of this kind. Here is just a playing with the NonlinearSolver plugin which includes Levenberg-Marquard algorithm and this one in AlgLib. For this particular example all performed quite well. Regards, Radovan Thank you, Radovan. Unfortunately, this interface is defined by the function. |
Russia ☭ forever Viacheslav N. Mezentsev |
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
|
Russia ☭ forever Viacheslav N. Mezentsev |
1 user thanked uni for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
Updated. Source code refactoring. |
Russia ☭ forever Viacheslav N. Mezentsev |
1 user thanked uni for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
|
Russia ☭ forever Viacheslav N. Mezentsev |
1 user thanked uni for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: uni Updated to AlgLib 3.14, refactored Thanks UNI, works fine 6179. Jean
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 22/02/2014(UTC) Posts: 81
Was thanked: 11 time(s) in 10 post(s)
|
Some problem in the latest plugin. Another solver f_nrk(...) works fine. x is formal parameter, how I can define it ? Optimization is numerical, the same for both solvers. Edited by user 09 July 2018 00:40:01(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
I need a complete example. |
Russia ☭ forever Viacheslav N. Mezentsev |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 22/02/2014(UTC) Posts: 81
Was thanked: 11 time(s) in 10 post(s)
|
Hello uni, Unfortunately I can't provide complete example, but if I pass to solver copy-pasted copies of the equations, it works. See it below. The problem is that plugin can't read correct result of symbolic calculations, but solver written in Smath does it right. example.sm (49kb) downloaded 54 time(s).
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.