module SA::ClassMethods
Public Instance Methods
simulated_annealing(unit, options)
click to toggle source
# File lib/sa.rb, line 10 def simulated_annealing(unit, options) opts = options.each_with_object({}) {|kv, r| r[kv.first.to_sym] = kv.last } ctx = SA::Context.new ctx.annealing(unit, opts[:temp], opts[:stop_temp], opts[:cool]) return unit end