Class: Gecode::Constraints::BoolEnum::Extensional::RegexpConstraint
- Inherits:
-
Constraint
- Object
- Constraint
- Gecode::Constraints::BoolEnum::Extensional::RegexpConstraint
- Defined in:
- lib/gecoder/interface/constraints/bool_enum/extensional.rb
Overview
Describes a regexp constraint, which constrains the enumeration of boolean variables to match a specified regexp in the boolean domain. Neither negation nor reification is supported.
The regular expressions are specified as described in IntEnum::Extensional::RegexpConstraint but true and false can be used instead of integers.
Example
# Constrains the two boolean variables in +bools+ to be false
# and true respectively.
bools.must.match [false, true]
# Constrains the boolean variables in +bools+ to be false,
# except for three consecutive variables which should be true
# followed by false followed by true.
bools.must.match [repeat(false), true, false, true, repeat(false)]]
Instance Method Summary collapse
Methods inherited from Constraint
Constructor Details
This class inherits a constructor from Gecode::Constraints::Constraint