ALGLIB - is a multilingual collection of algorithms designed to solve problems in the field of numeric analysis and data processing. ALGLIB is distributed under a 3-clause BSD license. This license is unrestrictive and allows using the package both in open and proprietary programs and even relicensing the code (if the new license doesn't conflict with the terms of the 3-clause BSD license).
Gemfile gem 'alglib', '~> 1.0.1'
install gem install alglib