custom addition -> elementwise addition : Base
This commit is contained in:
@@ -19,12 +19,12 @@ function getPossibleNeighbors(S::Polycube)
|
||||
possibleSpots = Set{Tuple{Int64, Int64, Int64}}()
|
||||
for p ∈ S.recentCubes
|
||||
push!(possibleSpots,
|
||||
p + (1, 0, 0),
|
||||
p + (0, 1, 0),
|
||||
p + (0, 0, 1),
|
||||
p - (1, 0, 0),
|
||||
p - (0, 1, 0),
|
||||
p - (0, 0, 1)
|
||||
p .+ (1, 0, 0),
|
||||
p .+ (0, 1, 0),
|
||||
p .+ (0, 0, 1),
|
||||
p .- (1, 0, 0),
|
||||
p .- (0, 1, 0),
|
||||
p .- (0, 0, 1)
|
||||
)
|
||||
end
|
||||
spots = setdiff(possibleSpots, S.cubes)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
include("Polycube.jl")
|
||||
include("ImmutableOrientedPolycube.jl")
|
||||
include("TupleMisc.jl")
|
||||
include("plot.jl")
|
||||
using XXhash
|
||||
using Serialization
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
|
||||
Base.:+(X::Tuple{Integer, Integer, Integer}, Y::Tuple{Integer, Integer, Integer}) = (X[1]+Y[1], X[2]+Y[2], X[3]+Y[3])
|
||||
Base.:-(X::Tuple{Integer, Integer, Integer}, Y::Tuple{Integer, Integer, Integer}) = (X[1]-Y[1], X[2]-Y[2], X[3]-Y[3])
|
||||
Reference in New Issue
Block a user