diff --git a/julia/Polycube.jl b/julia/Polycube.jl index eb3f070..d173b4c 100644 --- a/julia/Polycube.jl +++ b/julia/Polycube.jl @@ -17,7 +17,7 @@ end function getPossibleNeighbors(S::Polycube) possibleSpots = Set{Tuple{Int64, Int64, Int64}}() - for p ∈ S.cubes + for p ∈ S.recentCubes push!(possibleSpots, p + (1, 0, 0), p + (0, 1, 0), diff --git a/julia/PolycubeCounting.jl b/julia/PolycubeCounting.jl index 902f32b..e7fcab2 100644 --- a/julia/PolycubeCounting.jl +++ b/julia/PolycubeCounting.jl @@ -27,7 +27,7 @@ function scanForPolycubes(MaxSize::Int64) acceptable_growth = MaxSize - length(cube.cubes) possibleGrowth = powerset(growableSpaces, 1, acceptable_growth) for cubesToAdd ∈ possibleGrowth - newPolycube = deepcopy(cube) + newPolycube = Polycube(copy(cube.cubes), Set(cubesToAdd), deepcopy(cube.orderedLists)) for c ∈ cubesToAdd push!(newPolycube, c) end @@ -57,7 +57,7 @@ function evaluatePolycube(polycube::Polycube, D::Dict{UInt, ImmutableOrientedPol possibleGrowth = powerset(growableSpaces, 1, acceptable_growth) for cubesToAdd ∈ possibleGrowth - newPolycube = deepcopy(polycube) + newPolycube = Polycube(copy(polycube.cubes), Set(cubesToAdd), deepcopy(polycube.orderedLists)) for c ∈ cubesToAdd push!(newPolycube, c) end