Class: Gecode::BoolEnum::Relation::BoolEnumDisjunctionOperand

Inherits:
Gecode::Bool::ShortCircuitEqualityOperand show all
Defined in:
lib/gecoder/interface/constraints/bool_enum/relation.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes inherited from Gecode::Bool::ShortCircuitEqualityOperand

#model

Instance Method Summary collapse

Methods inherited from Gecode::Bool::ShortCircuitEqualityOperand

#construct_receiver, #to_bool_var

Methods included from Gecode::Bool::BoolOperand

#&, #*, #+, #-, #^, #implies, #method_missing, #|

Methods included from Operand

#model, #must, #must_not

Methods included from Gecode::Bool::BoolLinearOperations

#*, #+, #-

Constructor Details

#initialize(model, bool_enum) ⇒ BoolEnumDisjunctionOperand

Returns a new instance of BoolEnumDisjunctionOperand.



43
44
45
46
# File 'lib/gecoder/interface/constraints/bool_enum/relation.rb', line 43

def initialize(model, bool_enum)
  super model
  @enum = bool_enum
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Gecode::Bool::BoolOperand

Instance Method Details

#constrain_equal(bool_operand, constrain_domain, propagation_options) ⇒ Object



48
49
50
51
52
# File 'lib/gecoder/interface/constraints/bool_enum/relation.rb', line 48

def constrain_equal(bool_operand, constrain_domain, propagation_options)
  Gecode::Raw::rel(@model.active_space, Gecode::Raw::BOT_OR,
    @enum.to_bool_enum.bind_array, bool_operand.to_bool_var.bind, 
    *propagation_options)
end