crystal-gsl
GNU Scientific Library (GSL) binding for Crystal
Installation
Add this to your application's shard.yml
:
dependencies:
gsl:
github: konovod/crystal-gsl
Run shards install
System dependencies
Ubuntu
- libatlas-base-dev
- libgsl-dev
Fedora
- gsl
- gsl-devel
MacOS
- brew install gsl
Windows
- Recommended on GSL website way to get GSL on Windows is to build manually using .sln files from https://github.com/BrianGladman/gsl
Usage
require "gsl"
Documentation
(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/)
Examples
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
Status
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)
Contributing
- 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