Class: Gecode::IntEnum::Extensional::TupleConstraint
- Inherits:
-
Constraint
- Object
- Constraint
- Gecode::IntEnum::Extensional::TupleConstraint
- Defined in:
- lib/gecoder/interface/constraints/int_enum/extensional.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#post ⇒ Object
:nodoc:.
Methods inherited from Constraint
Constructor Details
This class inherits a constructor from Gecode::Constraint
Instance Method Details
#post ⇒ Object
:nodoc:
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
# File 'lib/gecoder/interface/constraints/int_enum/extensional.rb', line 162 def post # Bind lhs. lhs = @params[:lhs].to_int_enum.bind_array # Create the tuple set. tuple_set = Gecode::Raw::TupleSet.new @params[:tuples].each do |tuple| tuple_set.add tuple end tuple_set.finalize # Post the constraint. Gecode::Raw::extensional(@model.active_space, lhs, tuple_set, *) end |