Class: Gecode::Int::Relation::RelationConstraint
- Inherits:
-
ReifiableConstraint
- Object
- Constraint
- ReifiableConstraint
- Gecode::Int::Relation::RelationConstraint
- Defined in:
- lib/gecoder/interface/constraints/int/relation.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#post ⇒ Object
:nodoc:.
Methods inherited from ReifiableConstraint
#&, #reification_var, #reification_var=, #|
Methods inherited from Constraint
Constructor Details
This class inherits a constructor from Gecode::Constraint
Instance Method Details
#post ⇒ Object
:nodoc:
125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/gecoder/interface/constraints/int/relation.rb', line 125 def post # Fetch the parameters to Gecode. lhs, relation, rhs, reif_var = @params.values_at(:lhs, :relation_type, :rhs, :reif) rhs = rhs.to_int_var.bind if rhs.respond_to? :to_int_var if reif_var.nil? Gecode::Raw::rel(@model.active_space, lhs.to_int_var.bind, relation, rhs, *) else Gecode::Raw::rel(@model.active_space, lhs.to_int_var.bind, relation, rhs, reif_var.to_bool_var.bind, *) end end |