diff --git a/julia/PolycubeCounting.jl b/julia/PolycubeCounting.jl index e7fcab2..26222ba 100644 --- a/julia/PolycubeCounting.jl +++ b/julia/PolycubeCounting.jl @@ -14,36 +14,6 @@ function options() end function scanForPolycubes(MaxSize::Int64) - D = Dict{UInt, ImmutableOrientedPolycube}() - S = Vector{Polycube}(); - cube = getCube() - immutableCube = getImmutableOrientedPolycube(cube) - D[immutableCube.hash] = immutableCube - push!(S, cube) - - while !isempty(S) - cube = pop!(S) - growableSpaces = collect(getPossibleNeighbors(cube)) - acceptable_growth = MaxSize - length(cube.cubes) - possibleGrowth = powerset(growableSpaces, 1, acceptable_growth) - for cubesToAdd ∈ possibleGrowth - newPolycube = Polycube(copy(cube.cubes), Set(cubesToAdd), deepcopy(cube.orderedLists)) - for c ∈ cubesToAdd - push!(newPolycube, c) - end - collision = checkForCollision(newPolycube, D) - if !collision - push!(S, newPolycube) - immutableNewPolycube = getImmutableOrientedPolycube(newPolycube) - D[immutableNewPolycube.hash] = immutableNewPolycube - end - end - end - sanitizedData = sanitize(D, MaxSize) - serialize("julia/results.bin", sanitizedData) -end - -function scanForPolycubesRec(MaxSize::Int64) D = Dict{UInt, ImmutableOrientedPolycube}() singletonCube = getCube() immutableCube = getImmutableOrientedPolycube(singletonCube)