@mtanneau: I gave a pure-Julia constraint-programming solution one post above ![]()
To finish it off, define
function integerize(X, i)
Xi = X[i]
a = ceil(Xi.lo)
b = floor(Xi.hi)
if a > b
return emptyinterval(X)
end
return setindex(X, interval(a, b), i)
end
function integerize(X)
for i in 1:length(X)
X = integerize(X, i)
end
return X
end
Then
julia> p = pave(C1 β© C2 β© C3 β© C4, X, 1e-2);
julia> unique(integerize.(p.boundary))
3-element Array{IntervalBox{4,Float64},1}:
[2, 2] Γ [1, 1] Γ [0, 0] Γ [1, 1]
β
Γ β
Γ β
Γ β
[1, 1] Γ [2, 2] Γ [1, 1] Γ [0, 0]
give the desired solutions!