Class: Gecode::Constraints::Int::Domain::NonRangeDomainConstraint
- Inherits:
-
ReifiableConstraint
- Object
- Constraint
- ReifiableConstraint
- Gecode::Constraints::Int::Domain::NonRangeDomainConstraint
- Defined in:
- lib/gecoder/interface/constraints/int/domain.rb
Overview
Describes a non-range domain constraint.
Instance Method Summary collapse
Methods inherited from ReifiableConstraint
#&, #reification_var, #reification_var=, #|
Methods inherited from Constraint
Constructor Details
This class inherits a constructor from Gecode::Constraints::Constraint
Instance Method Details
#post ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/gecoder/interface/constraints/int/domain.rb', line 34 def post space = @model.active_space var, domain, reif_var, strength = @params.values_at(:lhs, :domain, :reif, :strength) domain = domain.to_a (params = []) << var.bind params << Gecode::Raw::IntSet.new(domain, domain.size) params << reif_var.bind if reif_var.respond_to? :bind params << strength Gecode::Raw::dom(space, *params) end |