Module: CSP::Constraints
- Included in:
- Problem
- Defined in:
- lib/csp/constraints.rb
Defined Under Namespace
Classes: AllDifferentConstraint, CustomConstraint, UniqueConstraint
Instance Method Summary
collapse
Instance Method Details
#all_different ⇒ Object
37
38
39
40
41
|
# File 'lib/csp/constraints.rb', line 37
def all_different
add_constraint(AllDifferentConstraint.new(variables))
self
end
|
#unique(variables) ⇒ Object
43
44
45
46
47
|
# File 'lib/csp/constraints.rb', line 43
def unique(variables)
add_constraint(UniqueConstraint.new(variables))
self
end
|