Sha256: d55667bbc46fbca2a1f92be95c327ed9456b3d5176e15fb6aa05acf9b2865be5
Contents?: true
Size: 399 Bytes
Versions: 1
Compression:
Stored size: 399 Bytes
Contents
require "sa/version" require 'sa/context' module SA def self.included(cls) cls.extend(SA::ClassMethods) end module ClassMethods 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 end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simulated_annealing-0.1.0 | lib/sa.rb |