Class: Gecode::BoolEnum::Relation::BoolEnumConjunctionOperand

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) ⇒ BoolEnumConjunctionOperand

:nodoc:



30
31
32
33
# File 'lib/gecoder/interface/constraints/bool_enum/relation.rb', line 30

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



35
36
37
38
39
# File 'lib/gecoder/interface/constraints/bool_enum/relation.rb', line 35

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