class Gecode::Set::Domain::EqualityDomainConstraint

Public Instance Methods

post() click to toggle source
# File doc/tmp/rdoc_dev/gecoder/interface/constraints/set/domain.rb, line 125
def post
  var, domain, reif_var, negate = @params.values_at(:lhs, :rhs, :reif, 
    :negate)
  if negate
    rel_type = Gecode::Util::NEGATED_SET_RELATION_TYPES[:==]
  else
    rel_type = Gecode::Util::SET_RELATION_TYPES[:==]
  end
  
  (params = []) << var.to_set_var.bind
  params << rel_type
  params << Gecode::Util.constant_set_to_params(domain)
  params << reif_var.to_bool_var.bind if reif_var.respond_to? :to_bool_var
  Gecode::Raw::dom(@model.active_space, *params.flatten)
end