class Gecode::SetElements::SetElementsOperand

A SetElementsOperand is an uncommon operand that results from calling SetOperand#elements. It facilitates placing the constraints defined in SetElementsConstraintReceiver

Examples

Producing a SetElementsOperand from set_operand:

set_operand.elements

Public Instance Methods

model() click to toggle source
# File doc/tmp/rdoc_dev/gecoder/interface/constraints/set_elements_constraints.rb, line 31
def model 
  @set.model
end
to_set_elements() click to toggle source

Returns the set operand that makes up the set elements operand.

# File doc/tmp/rdoc_dev/gecoder/interface/constraints/set_elements_constraints.rb, line 27
def to_set_elements 
  return @set
end

Public Class Methods

new(set) click to toggle source

Constructs a new set elements operand set.

# File doc/tmp/rdoc_dev/gecoder/interface/constraints/set_elements_constraints.rb, line 18
def initialize(set) 
  unless set.respond_to? :to_set_var
    raise TypeError, "Expected set operand, got #{set.class}."
  end

  @set = set
end