Class: Gecode::Constraints::Set::Cardinality::Expression
- Inherits:
-
Int::CompositeExpression
- Object
- Expression
- CompositeExpression
- Int::CompositeExpression
- Gecode::Constraints::Set::Cardinality::Expression
- Defined in:
- lib/gecoder/interface/constraints/set/cardinality.rb
Overview
Describes a cardinality expression started with set.size.must .
Instance Method Summary collapse
-
#in(range) ⇒ Object
:nodoc:.
Methods inherited from Int::CompositeExpression
Methods inherited from CompositeExpression
#==, #initialize, #method_missing
Methods inherited from Expression
Constructor Details
This class inherits a constructor from Gecode::Constraints::Int::CompositeExpression
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Gecode::Constraints::CompositeExpression
Instance Method Details
#in(range) ⇒ Object
:nodoc:
36 37 38 39 40 41 42 43 |
# File 'lib/gecoder/interface/constraints/set/cardinality.rb', line 36 def in(range) if range.kind_of?(Range) and !@params[:negate] @params.update(:range => range) @model.add_constraint CardinalityConstraint.new(@model, @params) else super(range) end end |