You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've spent last 3+ days trying to understand why my code, wasn't doing what i expected it to do,
Reduced from a much larger code (a JuMP model):
import Combinatorics
function foo()
v1 = [1 => 3, 1 => 4, 2 => 3, 2 => 4]
v2 = [Pair{String, String}[], [2 => 4, 1 => 3], Pair{String, String}[]]
v3 = 10
v4 = length(v2)
v5 = fill(fill(false, (v3, v3)), v4)
for k in 1:v4
for connection in v1
r = (connection in v2[k])
for cidx in Combinatorics.permutations(connection)
(v5[k])[cidx...] = r
end
end
if k>=2
@show(v5[2])
end
end
end
foo()
After a while, i've finally noticed that this would output:
I've spent last 3+ days trying to understand why my code, wasn't doing what i expected it to do,
Reduced from a much larger code (a JuMP model):
After a while, i've finally noticed that this would output:
... which is, while is a documented behavior, is really surprising :/
The text was updated successfully, but these errors were encountered: