Class: Gecode::Constraints::CompositeStub
- Inherits:
-
ExpressionStub
- Object
- ExpressionStub
- Gecode::Constraints::CompositeStub
- 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.
Direct Known Subclasses
Bool::CompositeStub, Int::CompositeStub, Set::Cardinality::CompositeStub, Set::CompositeStub
Instance Method Summary collapse
-
#initialize(composite_expression_class, model, params) ⇒ CompositeStub
constructor
The composite expression class should be the class that the stub uses when creating its expressions.
Methods included from LeftHandSideMethods
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 |