Class: Gecode::Constraints::SetEnum::Distinct::AtMostOneConstraint
- Inherits:
-
Constraint
- Object
- Constraint
- Gecode::Constraints::SetEnum::Distinct::AtMostOneConstraint
- Defined in:
- lib/gecoder/interface/constraints/set_enum/distinct.rb
Overview
Describes an at most one constraint, which constrains all pairs of set variables in the enumeration to at most have one element in common and be of a specified size. Providing a size is not optional.
Neither negation nor reification is supported.
Examples
# All set variables in +sets+ must have cardinality 17 and no pair may
# have more than one element in common.
sets.must.at_most_share_one_element(:size => 17)
Instance Method Summary collapse
Methods inherited from Constraint
Constructor Details
This class inherits a constructor from Gecode::Constraints::Constraint