lib/dither/ipog.rb in dither-0.0.3 vs lib/dither/ipog.rb in dither-0.0.4
- old
+ new
@@ -88,10 +88,13 @@
end
private
def fill_unbound(data)
+ @bound_sets ||= []
+ return nil if @bound_sets.any? { |a| data.subset?(a) }
+
arr = Array.new(params.length)
data.each do |param|
arr[param.i] = params[param.i][param.j]
end
@@ -100,9 +103,10 @@
j = 0
arr[i] = params[i][j]
data << Param.new(i, j)
end
end
+ @bound_sets << data
return nil if violates_constraints?(data)
arr
end
def find_unbound(param_array, stuff)