Class: Gecode::SetElements::Relation::RelationConstraint
- Inherits:
-
Constraint
- Object
- Constraint
- Gecode::SetElements::Relation::RelationConstraint
- Defined in:
- lib/gecoder/interface/constraints/set_elements/relation.rb
Overview
:nodoc:
Instance Method Summary collapse
Methods inherited from Constraint
Constructor Details
This class inherits a constructor from Gecode::Constraint
Instance Method Details
#post ⇒ Object
103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/gecoder/interface/constraints/set_elements/relation.rb', line 103 def post set_elements, rhs, type = @params.values_at(:lhs, :rhs, :relation_type) set = set_elements.to_set_elements if rhs.kind_of? Fixnum # Use a proxy int variable to cover. rhs = @model.int_var(rhs) end Gecode::Raw::rel(@model.active_space, set.to_set_var.bind, type, rhs.to_int_var.bind) end |