|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
import numpy as np
|
|
|
|
|
from sympy.utilities.iterables import multiset_permutations
|
|
|
|
|
import copy
|
|
|
|
|
|
|
|
|
|
def findCoordAround(center, nbAround):
|
|
|
|
|
nbDimention = len(center)
|
|
|
|
@ -69,14 +70,15 @@ def getPermutationOfCoord(center, find, coord):
|
|
|
|
|
|
|
|
|
|
def applySapceAroundToCase(center,spaceAround,space):
|
|
|
|
|
reelSpaceAround = []
|
|
|
|
|
spaceAroundCopy = copy.deepcopy(spaceAround)
|
|
|
|
|
for y in range(len(spaceAround)):
|
|
|
|
|
estBon = True
|
|
|
|
|
for i in range(len(spaceAround[y])):
|
|
|
|
|
for i in range(len(spaceAroundCopy[y])):
|
|
|
|
|
if not estBon:
|
|
|
|
|
continue
|
|
|
|
|
else :
|
|
|
|
|
spaceAround[y][i] += center[i]
|
|
|
|
|
estBon = estBon and 0 <= spaceAround[y][i] <= space.nbSubdivisions-1
|
|
|
|
|
spaceAroundCopy[y][i] += center[i]
|
|
|
|
|
estBon = estBon and 0 <= spaceAroundCopy[y][i] <= space.nbSubdivisions-1
|
|
|
|
|
if estBon:
|
|
|
|
|
reelSpaceAround.append(spaceAround[y])
|
|
|
|
|
reelSpaceAround.append(spaceAroundCopy[y])
|
|
|
|
|
return reelSpaceAround
|