Class: Gecode::Constraints::Set::CompositeStub

Inherits:
CompositeStub show all
Defined in:
lib/gecoder/interface/constraints/set_var_constraints.rb

Overview

Describes a stub that produces a set variable, which can then be used with the normal set variable constraints. An example of a set composite constraints would be set selection constraint.

sets[int_var].must_be.subset_of(another_set)

sets[int_var] produces a set variable which the constraint .must_be.subset_of(another_set) 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.

Whether a constraint involving a reification stub supports negation and reification depends on the constraint on the right hand side (none support the strength option as no set constraints do).

Instance Method Summary collapse

Methods included from LeftHandSideMethods

#must, #must_not

Constructor Details

#initialize(model, params) ⇒ CompositeStub

Returns a new instance of CompositeStub.



61
62
63
# File 'lib/gecoder/interface/constraints/set_var_constraints.rb', line 61

def initialize(model, params)
  super(CompositeExpression, model, params)
end