Module: Gecode::Constraints::LeftHandSideMethods

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

Instance Method Details

#mustObject Also known as: must_be

Specifies that a constraint must hold for the integer variable enum.



15
16
17
# File 'lib/gecoder/interface/constraints.rb', line 15

def must
  expression update_params(:negate => false)
end

#must_notObject Also known as: must_not_be

Specifies that the negation of a constraint must hold for the integer variable.



22
23
24
# File 'lib/gecoder/interface/constraints.rb', line 22

def must_not
  expression update_params(:negate => true)
end