PrettyGSL
This gem provides a nice interface to the GNU scientific library through the Ruby/GSL wrapper. I've simply attempted to update the interface to use more idiomatic ruby.
Installation
Add this line to your application's Gemfile:
gem 'pretty_gsl'
And then execute:
$ bundle
Or install it yourself as:
$ gem install pretty_gsl
Usage
function = Proc.new{ |variables, constants| ...}
optional_gradient = Proc.new{ |variables, constants, gradient_components| ...}
constants = [1,2,3, ...]
guess = [1,2,3, ...]
m = Minimizer.new(function, constants, function_gradient: optional_gradient)
m.minimize(*guess)
=> {:success=>true, :minimum_x=>[1, 2], :iterations=>50, :minimum_f=>30.0, :simplex_size=>0.0008 ... }
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request