Sha256: e967efa77895a98b34bddb05a245fa777fa8156df158c139ef6cd3bf584cb7cd
Contents?: true
Size: 305 Bytes
Versions: 11
Compression:
Stored size: 305 Bytes
Contents
require File.dirname(__FILE__) + '/example_helper' class EquationProblem include Gecode::Mixin def initialize x, y, z = vars_is_an int_var_array(3, 0..9) (x + y).must == z x.must == y - 3 branch_on vars end end puts 'x y z' puts EquationProblem.new.solve!.vars.values.join(' ')
Version data entries
11 entries across 11 versions & 2 rubygems