Class: Gecode::Constraints::SetEnum::Channel::IntChannelConstraint
- Inherits:
-
Constraint
- Object
- Constraint
- Gecode::Constraints::SetEnum::Channel::IntChannelConstraint
- Defined in:
- lib/gecoder/interface/constraints/set_enum/channel.rb
Overview
Describes a channel constraint which “channels” one enumeration of integer variables with one enumeration of set variables. The i:th set in the enumeration of set variables is constrainde to includes the value of the j:th integer variable.
Neither reification nor negation is supported.
Examples
# +set_enum+ is constrained to channel +int_enum+.
int_enum.must.channel set_enum
# This is another way of saying the above.
set_enum.must.channel int_enum
Instance Method Summary collapse
Methods inherited from Constraint
Constructor Details
This class inherits a constructor from Gecode::Constraints::Constraint
Instance Method Details
#post ⇒ Object
42 43 44 45 46 |
# File 'lib/gecoder/interface/constraints/set_enum/channel.rb', line 42 def post lhs, rhs = @params.values_at(:lhs, :rhs) Gecode::Raw::channel(@model.active_space, rhs.to_int_var_array, lhs.to_set_var_array) end |