Class: Gecode::Set::Relation::RelationConstraint

Inherits:
ReifiableConstraint show all
Defined in:
lib/gecoder/interface/constraints/set/relation.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from ReifiableConstraint

#&, #reification_var, #reification_var=, #|

Methods inherited from Constraint

#initialize

Constructor Details

This class inherits a constructor from Gecode::Constraint

Instance Method Details

#postObject



140
141
142
143
144
145
146
147
148
149
150
151
# File 'lib/gecoder/interface/constraints/set/relation.rb', line 140

def post
  lhs, rhs, reif_var, relation = @params.values_at(:lhs, :rhs, :reif, 
    :relation)
  
  (params = []) << lhs.to_set_var.bind
  params << Gecode::Util::SET_RELATION_TYPES[relation]
  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