Class: Gecode::Set::Connection::SetMinOperand
- Inherits:
-
Int::ShortCircuitEqualityOperand
- Object
- Int::ShortCircuitEqualityOperand
- Gecode::Set::Connection::SetMinOperand
- Defined in:
- lib/gecoder/interface/constraints/set/connection.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from Int::ShortCircuitEqualityOperand
Instance Method Summary collapse
- #constrain_equal(int_operand, constrain, propagation_options) ⇒ Object
-
#initialize(model, set_op) ⇒ SetMinOperand
constructor
:nodoc:.
Methods inherited from Int::ShortCircuitEqualityOperand
#construct_receiver, #to_int_var
Methods included from Int::IntOperand
#*, #+, #-, #abs, #method_missing, #pre_arith_mult, #square_root, #squared
Methods included from Operand
Constructor Details
#initialize(model, set_op) ⇒ SetMinOperand
:nodoc:
72 73 74 75 |
# File 'lib/gecoder/interface/constraints/set/connection.rb', line 72 def initialize(model, set_op) super model @set = set_op 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
77 78 79 80 81 82 83 84 85 |
# File 'lib/gecoder/interface/constraints/set/connection.rb', line 77 def constrain_equal(int_operand, constrain, ) set = @set.to_set_var if constrain int_operand.must_be.in set.upper_bound.min..set.lower_bound.min end Gecode::Raw::min(@model.active_space, set.bind, int_operand.to_int_var.bind) end |