Class: Gecode::IntEnum::Arithmetic::IntEnumMinOperand
- Inherits:
-
Gecode::Int::ShortCircuitEqualityOperand
- Object
- Gecode::Int::ShortCircuitEqualityOperand
- Gecode::IntEnum::Arithmetic::IntEnumMinOperand
- Defined in:
- lib/gecoder/interface/constraints/int_enum/arithmetic.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from Gecode::Int::ShortCircuitEqualityOperand
Instance Method Summary collapse
- #constrain_equal(int_operand, constrain, propagation_options) ⇒ Object
-
#initialize(model, int_enum) ⇒ IntEnumMinOperand
constructor
A new instance of IntEnumMinOperand.
Methods inherited from Gecode::Int::ShortCircuitEqualityOperand
#construct_receiver, #to_int_var
Methods included from Gecode::Int::IntOperand
#*, #+, #-, #abs, #method_missing, #pre_arith_mult, #square_root, #squared
Methods included from Operand
Constructor Details
#initialize(model, int_enum) ⇒ IntEnumMinOperand
Returns a new instance of IntEnumMinOperand.
47 48 49 50 |
# File 'lib/gecoder/interface/constraints/int_enum/arithmetic.rb', line 47 def initialize(model, int_enum) super model @int_enum = int_enum end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Gecode::Int::IntOperand
Instance Method Details
#constrain_equal(int_operand, constrain, propagation_options) ⇒ Object
52 53 54 55 56 57 58 59 60 |
# File 'lib/gecoder/interface/constraints/int_enum/arithmetic.rb', line 52 def constrain_equal(int_operand, constrain, ) enum = @int_enum.to_int_enum if constrain int_operand.must_be.in enum.domain_range end Gecode::Raw::min(@model.active_space, enum.bind_array, int_operand.to_int_var.bind, *) end |