lib/gecoder/interface/constraints/int_enum/distinct.rb in gecoder-0.3.0 vs lib/gecoder/interface/constraints/int_enum/distinct.rb in gecoder-0.4.0

- old
+ new

@@ -5,11 +5,11 @@ def with_offsets(*offsets) if offsets.kind_of? Enumerable offsets = *offsets end params = {:lhs => self, :offsets => offsets} - return Gecode::Constraints::IntEnum::Distinct::OffsetExpression.new( + return Gecode::Constraints::IntEnum::Distinct::OffsetExpressionStub.new( @model, params) end end end @@ -23,24 +23,19 @@ raise Gecode::MissingConstraintError, 'A negated distinct is not ' + 'implemented.' end @model.add_constraint Distinct::DistinctConstraint.new(@model, - @params.update(Gecode::Constraints::OptionUtil.decode_options(options))) + @params.update(Gecode::Constraints::Util.decode_options(options))) end end # A module that gathers the classes and modules used in distinct constraints. module Distinct # Describes an expression started with an int var enum following with # #with_offsets . - class OffsetExpression < Gecode::Constraints::IntEnum::Expression + class OffsetExpressionStub < Gecode::Constraints::ExpressionStub include Gecode::Constraints::LeftHandSideMethods - - def initialize(model, params) - @model = model - @params = params - end private # Produces an expression with offsets for the lhs module. def expression(params) \ No newline at end of file