rb-gsl
rb-gsl copied to clipboard
Adapt to GSL 2.0
The following modifications allows one to compile and ruby rb-gsl against GSL v2.
- change the way jacobians of fdfsolvers are computed as they are no more accessible as members of the structure
- some elliptic functions return error code change their name, elliptic D function dropped the unused parameter n
- fix a compiler warning about a pointer being passed instead of the value it was pointing to.
The files build without issues and test pass with ruby2.2 and ruby2.3
Let me know if you want me to modify or correct things in this PR.
This allows at least Debian to fix the transition of this package to GSL 2, and thus fixes #24 and #25
Thanks!
travis does not work, because it cannot install gsl v2 via rubygems.
This is great. I'm currently working on incorporating nmatrix into rb-gsl and don't want any conflicts, so I'll merge your code with mine in 2-3 days.
By the way, does this change break compatibility with GSL 1.15 and 1.16?
If yes, could you add guards with the macro GSL_2_LATER for whatever code that requires GSL > 2?
For example:
# ifdef GSL_2_LATER
// some gsl 2.0 methods.
#endif
Thanks for your feedback. I'll try to see what I can do in this direction.
Hi,
Many thanks for this great patch.
I've wrote an additional patch to detect whether Jacobians are pre-calculated (fbf775955495fc31b1b0a569f0aa40033c65d773). I hope it helps.
Now I wrote a similar patch for gsl_sf_mathieu (c08a4a4589fa33647fe77702d023cd57820ba3da).
I hope this also helps you.
@boutil will it possible for you to include changes from @ktns into your branch?
I'll work on that today.
@boutil didn't you have to make any changes to extconf to link with GSL 2.1?
I integrated the changes from @ktns to replace mine where needed. Thanks @ktns. I also put a gard around the change of parameters for the ellint_D function.
I didn't have to make any changes to link with GSL2.1. I just ran ruby on the extconf.rb, and make, and it just built.