class Gecode::Int::Relation::RelationConstraint

Public Instance Methods

post() click to toggle source
# File doc/tmp/rdoc_dev/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, *propagation_options)
  else
    Gecode::Raw::rel(@model.active_space, lhs.to_int_var.bind, 
      relation, rhs, reif_var.to_bool_var.bind, *propagation_options)
  end
end