Class: Gecode::Constraints::CompositeStub

Inherits:
ExpressionStub show all
Includes:
LeftHandSideMethods
Defined in:
lib/gecoder/interface/constraints.rb

Overview

Describes a stub that produces a variable, which can then be used with that variable’s normalconstraints. An example with int variables would be the element constraint.

int_enum[int_var].must > rhs

The int_enum part produces an int variable which the constraint “.must > rhs” is then applied to. In the above case two constraints (and one temporary variable) are required, but in the case of equality only one constraint is required.

Instance Method Summary collapse

Methods included from LeftHandSideMethods

#must, #must_not

Constructor Details

#initialize(composite_expression_class, model, params) ⇒ CompositeStub

The composite expression class should be the class that the stub uses when creating its expressions.



448
449
450
451
# File 'lib/gecoder/interface/constraints.rb', line 448

def initialize(composite_expression_class, model, params)
  super(model, params)
  @composite_class = composite_expression_class
end