class Gecode::Set::Connection::SetMinOperand

Public Instance Methods

constrain_equal(int_operand, constrain, propagation_options) click to toggle source
# File doc/tmp/rdoc_dev/gecoder/interface/constraints/set/connection.rb, line 77
def constrain_equal(int_operand, constrain, propagation_options)
  set = @set.to_set_var
  if constrain
    int_operand.must_be.in set.upper_bound.min..set.lower_bound.min
  end
  
  Gecode::Raw::min(@model.active_space, set.bind, 
    int_operand.to_int_var.bind)
end

Public Class Methods

new(model, set_op) click to toggle source
# File doc/tmp/rdoc_dev/gecoder/interface/constraints/set/connection.rb, line 72
def initialize(model, set_op)
  super model
  @set = set_op
end