class Gecode::Set::Relation::EqualityRelationConstraint

Public Instance Methods

post() click to toggle source
# File doc/tmp/rdoc_dev/gecoder/interface/constraints/set/relation.rb, line 120
def post
  lhs, rhs, 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 = []) << lhs.to_set_var.bind
  params << rel_type
  params << rhs.to_set_var.bind
  if reif_var.respond_to? :to_bool_var
    params << reif_var.to_bool_var.bind 
  end
  Gecode::Raw::rel(@model.active_space, *params)
end