Minimization algorithms on pure Ruby.
Unidimensional:
- Newton-Rahpson (requires first and second derivative)
- Golden Section
- Brent (Port of GSL code)
If you needs speed, use rb-gsl
d=Minimization::Brent.new(-1000,20000 , proc {|x| x**2})
d.iterate
puts d.x_minimum puts d.f_minimum
- Pure Ruby
sudo gem install minimization
http://ruby-statsample.rubyforge.org/minimization/
GPL-2 (See LICENSE.txt)