changed algorithm to make use of recent cubes

This commit is contained in:
Maxime Vorwerk
2023-09-25 04:29:40 +02:00
parent b7e477f18e
commit 8a0cd223d5
2 changed files with 3 additions and 3 deletions

View File

@@ -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