Module: Gecode::Constraints::LeftHandSideMethods
- Included in:
- BoolEnumMethods, Bool::OperationMethods, CompositeStub, Int::Linear::Helper, SetEnum::Selection::SetAccessStub, SimpleExpressionStub, FreeBoolVar, FreeIntVar, FreeSetVar, IntEnumMethods, SetEnumMethods
- Defined in:
- lib/gecoder/interface/constraints.rb
Overview
A module that should be mixed in to class of objects that should be usable as left hand sides (i.e. the part before must*) when specifying constraints. Assumes that a method #expression is defined which produces a new expression given the current constraint parameters.
Instance Method Summary collapse
-
#must ⇒ Object
(also: #must_be)
Specifies that a constraint must hold for the keft hand side.
-
#must_not ⇒ Object
(also: #must_not_be)
Specifies that the negation of a constraint must hold for the left hand side.
Instance Method Details
#must ⇒ Object Also known as: must_be
Specifies that a constraint must hold for the keft hand side.
15 16 17 |
# File 'lib/gecoder/interface/constraints.rb', line 15 def must expression update_params(:negate => false) end |
#must_not ⇒ Object Also known as: must_not_be
Specifies that the negation of a constraint must hold for the left hand side.
22 23 24 |
# File 'lib/gecoder/interface/constraints.rb', line 22 def must_not expression update_params(:negate => true) end |