class Gecode::SelectedSet::Element::SelectedSetUnionOperand

Public Instance Methods

constrain_equal(set_operand, constrain, propagation_options) click to toggle source
# File doc/tmp/rdoc_dev/gecoder/interface/constraints/selected_set/select.rb, line 73
def constrain_equal(set_operand, constrain, propagation_options)
  enum, indices = @selected_set.to_selected_set
  if constrain
    set_operand.must_be.subset_of enum.upper_bound_range
  end
  
  Gecode::Raw::elementsUnion(@model.active_space, 
    enum.to_set_enum.bind_array, indices.to_set_var.bind, 
    set_operand.to_set_var.bind)
end

Public Class Methods

new(model, selected_set) click to toggle source
# File doc/tmp/rdoc_dev/gecoder/interface/constraints/selected_set/select.rb, line 68
def initialize(model, selected_set)
  super model
  @selected_set = selected_set
end