GNU Scientific Library (GSL) binding for Crystal
Add this to your application's shard.yml
:
dependencies:
gsl:
github: konovod/crystal-gsl
Run shards install
- libatlas-base-dev
- libgsl-dev
- gsl
- gsl-devel
- brew install gsl
- Recommended on GSL website way to get GSL on Windows is to build manually using .sln files from https://github.com/BrianGladman/gsl
require "gsl"
(Incomplete) documentation can be found here. It is generated from sources, so can be messy.
You can also check original GSL docs for details of implementation and theory (https://www.gnu.org/software/gsl/doc/html/)
You can check spec
directory for some simple examples
Warning:
- Mostly tested, but some bugs are possible
- Pre-release (API could break)
- Perhaps not ready for production
If you know GSL, you can call all GSL functions directly: LibGSL.gsl_some_function(arg, ...)
. This could be cumbersome, but it works.
For a high-level wrappers, see TODO.md for detailed list on what is done\missing.
Below is a categorized list of what is done (with links to docs):
- General
- Statistical
- Distributions (33 of 38)
- Histograms
- Permutations
- Correlation
- Analysis
- Optimization
- Approximation
- Chebyshev approximation
- B Splines (2.7 API)
- Interpolation
- Physical constants
- Special functions (273 of 338)
- Fork it ( https://github.com/konovod/crystal-gsl/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request