class Gecode::SetEnum::Operation::OperationSetOperand
Public Instance Methods
constrain_equal(set_operand, constrain_domain, propagation_options)
click to toggle source
# File doc/tmp/rdoc_dev/gecoder/interface/constraints/set_enum/operation.rb, line 54 def constrain_equal(set_operand, constrain_domain, propagation_options) operation = Gecode::Util::SET_OPERATION_TYPES[@operator] if constrain_domain if operation == Gecode::Raw::SOT_INTER set_operand.must_be.subset_of @enum.first.upper_bound else set_operand.must_be.subset_of @enum.upper_bound_range end end Gecode::Raw::rel(@model.active_space, operation, @enum.to_set_enum.bind_array, set_operand.to_set_var.bind) end
Public Class Methods
new(model, enum, operator)
click to toggle source
Calls superclass method
Gecode::Set::ShortCircuitEqualityOperand.new
# File doc/tmp/rdoc_dev/gecoder/interface/constraints/set_enum/operation.rb, line 48 def initialize(model, enum, operator) super model @enum = enum @operator = operator end