mapFolding 0.16.1__py3-none-any.whl → 0.16.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- easyRun/A000682.py +1 -1
- easyRun/A005316.py +2 -3
- easyRun/NOTcountingFolds.py +6 -5
- easyRun/countFolds.py +1 -1
- easyRun/generateAllModules.py +14 -0
- easyRun/meanders.py +16 -18
- mapFolding/__init__.py +1 -0
- mapFolding/_theSSOT.py +3 -2
- mapFolding/_theTypes.py +3 -0
- mapFolding/algorithms/A086345.py +75 -0
- mapFolding/algorithms/matrixMeanders.py +15 -28
- mapFolding/algorithms/matrixMeandersBeDry.py +34 -116
- mapFolding/algorithms/matrixMeandersNumPy.py +117 -70
- mapFolding/algorithms/matrixMeandersPandas.py +113 -130
- mapFolding/algorithms/oeisIDbyFormula.py +25 -14
- mapFolding/algorithms/symmetricFolds.py +36 -0
- mapFolding/algorithms/zCuzDocStoopidoeisIDbyFormula.py +26 -12
- mapFolding/basecamp.py +152 -323
- mapFolding/dataBaskets.py +136 -34
- mapFolding/filesystemToolkit.py +4 -32
- mapFolding/oeis.py +5 -12
- mapFolding/reference/A000682facts.py +785 -1264
- mapFolding/reference/A005316facts.py +958 -923
- mapFolding/reference/A086345Wu.py +25 -0
- mapFolding/reference/matrixMeandersAnalysis/signatures.py +2033 -0
- mapFolding/someAssemblyRequired/A007822/A007822rawMaterials.py +9 -44
- mapFolding/someAssemblyRequired/A007822/_asynchronousAnnex.py +51 -0
- mapFolding/someAssemblyRequired/A007822/makeA007822AsynchronousModules.py +39 -136
- mapFolding/someAssemblyRequired/A007822/makeA007822Modules.py +44 -45
- mapFolding/someAssemblyRequired/RecipeJob.py +78 -18
- mapFolding/someAssemblyRequired/__init__.py +3 -8
- mapFolding/someAssemblyRequired/_toolkitContainers.py +32 -3
- mapFolding/someAssemblyRequired/infoBooth.py +40 -23
- mapFolding/someAssemblyRequired/makeJobTheorem2Numba.py +75 -154
- mapFolding/someAssemblyRequired/makeJobTheorem2codon.py +56 -88
- mapFolding/someAssemblyRequired/makingModules_count.py +91 -85
- mapFolding/someAssemblyRequired/makingModules_doTheNeedful.py +7 -65
- mapFolding/someAssemblyRequired/{mapFolding → mapFoldingModules}/makeMapFoldingModules.py +25 -31
- mapFolding/someAssemblyRequired/meanders/makeMeandersModules.py +14 -13
- mapFolding/someAssemblyRequired/toolkitMakeModules.py +10 -10
- mapFolding/someAssemblyRequired/toolkitNumba.py +1 -1
- mapFolding/someAssemblyRequired/transformationTools.py +17 -19
- mapFolding/syntheticModules/A007822/algorithm.py +46 -50
- mapFolding/syntheticModules/A007822/asynchronous.py +93 -34
- mapFolding/syntheticModules/A007822/initializeState.py +15 -21
- mapFolding/syntheticModules/A007822/theorem2.py +21 -21
- mapFolding/syntheticModules/A007822/theorem2Numba.py +42 -23
- mapFolding/syntheticModules/A007822/theorem2Trimmed.py +21 -21
- mapFolding/syntheticModules/countParallelNumba.py +3 -7
- mapFolding/syntheticModules/daoOfMapFoldingNumba.py +3 -6
- mapFolding/syntheticModules/meanders/bigInt.py +15 -25
- mapFolding/syntheticModules/theorem2.py +6 -0
- mapFolding/syntheticModules/theorem2Numba.py +26 -2
- mapFolding/syntheticModules/theorem2Trimmed.py +6 -0
- mapFolding/tests/test_computations.py +1 -1
- mapFolding/zCuzDocStoopid/makeDocstrings.py +2 -0
- {mapfolding-0.16.1.dist-info → mapfolding-0.16.4.dist-info}/METADATA +4 -1
- mapfolding-0.16.4.dist-info/RECORD +106 -0
- mapFolding/_dataPacking.py +0 -68
- mapFolding/reference/meandersDumpingGround/A005316intOptimized.py +0 -122
- mapFolding/reference/meandersDumpingGround/A005316optimized128bit.py +0 -79
- mapFolding/reference/meandersDumpingGround/matrixMeandersBaseline.py +0 -65
- mapFolding/reference/meandersDumpingGround/matrixMeandersBaselineAnnex.py +0 -84
- mapFolding/reference/meandersDumpingGround/matrixMeandersSimpleQueue.py +0 -90
- mapFolding/syntheticModules/A007822/algorithmNumba.py +0 -94
- mapFolding/syntheticModules/A007822/asynchronousAnnex.py +0 -66
- mapFolding/syntheticModules/A007822/asynchronousAnnexNumba.py +0 -85
- mapFolding/syntheticModules/A007822/asynchronousNumba.py +0 -52
- mapFolding/syntheticModules/A007822/asynchronousTheorem2.py +0 -53
- mapFolding/syntheticModules/A007822/asynchronousTrimmed.py +0 -47
- mapFolding/syntheticModules/dataPacking.py +0 -28
- mapFolding/syntheticModules/dataPackingA007822.py +0 -92
- mapfolding-0.16.1.dist-info/RECORD +0 -114
- /mapFolding/someAssemblyRequired/{mapFolding → mapFoldingModules}/__init__.py +0 -0
- {mapfolding-0.16.1.dist-info → mapfolding-0.16.4.dist-info}/WHEEL +0 -0
- {mapfolding-0.16.1.dist-info → mapfolding-0.16.4.dist-info}/entry_points.txt +0 -0
- {mapfolding-0.16.1.dist-info → mapfolding-0.16.4.dist-info}/licenses/LICENSE +0 -0
- {mapfolding-0.16.1.dist-info → mapfolding-0.16.4.dist-info}/top_level.txt +0 -0
|
@@ -1,76 +1,72 @@
|
|
|
1
|
-
|
|
1
|
+
import numpy
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
state.indexMiniGap += 1
|
|
23
|
-
return state
|
|
24
|
-
|
|
25
|
-
def activeLeafGreaterThan0(state: MapFoldingState) -> bool:
|
|
3
|
+
from mapFolding.dataBaskets import SymmetricFoldsState
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def filterAsymmetricFolds(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
7
|
+
state.indexLeaf = 1
|
|
8
|
+
state.leafComparison[0] = 1
|
|
9
|
+
state.leafConnectee = 1
|
|
10
|
+
while state.leafConnectee < state.leavesTotal + 1:
|
|
11
|
+
state.indexMiniGap = state.leafBelow[state.indexLeaf]
|
|
12
|
+
state.leafComparison[state.leafConnectee] = (state.indexMiniGap - state.indexLeaf + state.leavesTotal) % state.leavesTotal
|
|
13
|
+
state.indexLeaf = state.indexMiniGap
|
|
14
|
+
state.leafConnectee += 1
|
|
15
|
+
state.arrayGroupOfFolds = numpy.take(state.leafComparison, state.indicesArrayGroupOfFolds)
|
|
16
|
+
compared = state.arrayGroupOfFolds[..., 0:state.leavesTotal // 2] == state.arrayGroupOfFolds[..., state.leavesTotal // 2:None]
|
|
17
|
+
for indexRow in range(len(compared)):
|
|
18
|
+
state.groupsOfFolds += compared[indexRow].all()
|
|
19
|
+
return state
|
|
20
|
+
|
|
21
|
+
def activeLeafGreaterThan0(state: SymmetricFoldsState) -> bool:
|
|
26
22
|
return state.leaf1ndex > 0
|
|
27
23
|
|
|
28
|
-
def activeLeafGreaterThanLeavesTotal(state:
|
|
24
|
+
def activeLeafGreaterThanLeavesTotal(state: SymmetricFoldsState) -> bool:
|
|
29
25
|
return state.leaf1ndex > state.leavesTotal
|
|
30
26
|
|
|
31
|
-
def activeLeafIsTheFirstLeaf(state:
|
|
27
|
+
def activeLeafIsTheFirstLeaf(state: SymmetricFoldsState) -> bool:
|
|
32
28
|
return state.leaf1ndex <= 1
|
|
33
29
|
|
|
34
|
-
def activeLeafIsUnconstrainedInAllDimensions(state:
|
|
30
|
+
def activeLeafIsUnconstrainedInAllDimensions(state: SymmetricFoldsState) -> bool:
|
|
35
31
|
return not state.dimensionsUnconstrained
|
|
36
32
|
|
|
37
|
-
def activeLeafUnconstrainedInThisDimension(state:
|
|
33
|
+
def activeLeafUnconstrainedInThisDimension(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
38
34
|
state.dimensionsUnconstrained -= 1
|
|
39
35
|
return state
|
|
40
36
|
|
|
41
|
-
def filterCommonGaps(state:
|
|
37
|
+
def filterCommonGaps(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
42
38
|
state.gapsWhere[state.gap1ndex] = state.gapsWhere[state.indexMiniGap]
|
|
43
39
|
if state.countDimensionsGapped[state.gapsWhere[state.indexMiniGap]] == state.dimensionsUnconstrained:
|
|
44
40
|
state = incrementActiveGap(state)
|
|
45
41
|
state.countDimensionsGapped[state.gapsWhere[state.indexMiniGap]] = 0
|
|
46
42
|
return state
|
|
47
43
|
|
|
48
|
-
def gapAvailable(state:
|
|
44
|
+
def gapAvailable(state: SymmetricFoldsState) -> bool:
|
|
49
45
|
return state.leaf1ndex > 0
|
|
50
46
|
|
|
51
|
-
def incrementActiveGap(state:
|
|
47
|
+
def incrementActiveGap(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
52
48
|
state.gap1ndex += 1
|
|
53
49
|
return state
|
|
54
50
|
|
|
55
|
-
def incrementGap1ndexCeiling(state:
|
|
51
|
+
def incrementGap1ndexCeiling(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
56
52
|
state.gap1ndexCeiling += 1
|
|
57
53
|
return state
|
|
58
54
|
|
|
59
|
-
def incrementIndexMiniGap(state:
|
|
55
|
+
def incrementIndexMiniGap(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
60
56
|
state.indexMiniGap += 1
|
|
61
57
|
return state
|
|
62
58
|
|
|
63
|
-
def initializeIndexMiniGap(state:
|
|
59
|
+
def initializeIndexMiniGap(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
64
60
|
state.indexMiniGap = state.gap1ndex
|
|
65
61
|
return state
|
|
66
62
|
|
|
67
|
-
def initializeVariablesToFindGaps(state:
|
|
63
|
+
def initializeVariablesToFindGaps(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
68
64
|
state.dimensionsUnconstrained = state.dimensionsTotal
|
|
69
65
|
state.gap1ndexCeiling = state.gapRangeStart[state.leaf1ndex - 1]
|
|
70
66
|
state.indexDimension = 0
|
|
71
67
|
return state
|
|
72
68
|
|
|
73
|
-
def insertActiveLeaf(state:
|
|
69
|
+
def insertActiveLeaf(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
74
70
|
state.indexLeaf = 0
|
|
75
71
|
while state.indexLeaf < state.leaf1ndex:
|
|
76
72
|
state.gapsWhere[state.gap1ndexCeiling] = state.indexLeaf
|
|
@@ -78,7 +74,7 @@ def insertActiveLeaf(state: MapFoldingState) -> MapFoldingState:
|
|
|
78
74
|
state.indexLeaf += 1
|
|
79
75
|
return state
|
|
80
76
|
|
|
81
|
-
def insertActiveLeafAtGap(state:
|
|
77
|
+
def insertActiveLeafAtGap(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
82
78
|
state.gap1ndex -= 1
|
|
83
79
|
state.leafAbove[state.leaf1ndex] = state.gapsWhere[state.gap1ndex]
|
|
84
80
|
state.leafBelow[state.leaf1ndex] = state.leafBelow[state.leafAbove[state.leaf1ndex]]
|
|
@@ -88,50 +84,50 @@ def insertActiveLeafAtGap(state: MapFoldingState) -> MapFoldingState:
|
|
|
88
84
|
state.leaf1ndex += 1
|
|
89
85
|
return state
|
|
90
86
|
|
|
91
|
-
def leafBelowSentinelIs1(state:
|
|
87
|
+
def leafBelowSentinelIs1(state: SymmetricFoldsState) -> bool:
|
|
92
88
|
return state.leafBelow[0] == 1
|
|
93
89
|
|
|
94
|
-
def leafConnecteeIsActiveLeaf(state:
|
|
90
|
+
def leafConnecteeIsActiveLeaf(state: SymmetricFoldsState) -> bool:
|
|
95
91
|
return state.leafConnectee == state.leaf1ndex
|
|
96
92
|
|
|
97
|
-
def lookForGaps(state:
|
|
93
|
+
def lookForGaps(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
98
94
|
state.gapsWhere[state.gap1ndexCeiling] = state.leafConnectee
|
|
99
95
|
if state.countDimensionsGapped[state.leafConnectee] == 0:
|
|
100
96
|
state = incrementGap1ndexCeiling(state)
|
|
101
97
|
state.countDimensionsGapped[state.leafConnectee] += 1
|
|
102
98
|
return state
|
|
103
99
|
|
|
104
|
-
def lookupLeafConnecteeInConnectionGraph(state:
|
|
100
|
+
def lookupLeafConnecteeInConnectionGraph(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
105
101
|
state.leafConnectee = state.connectionGraph[state.indexDimension, state.leaf1ndex, state.leaf1ndex]
|
|
106
102
|
return state
|
|
107
103
|
|
|
108
|
-
def loopingLeavesConnectedToActiveLeaf(state:
|
|
104
|
+
def loopingLeavesConnectedToActiveLeaf(state: SymmetricFoldsState) -> bool:
|
|
109
105
|
return state.leafConnectee != state.leaf1ndex
|
|
110
106
|
|
|
111
|
-
def loopingThroughTheDimensions(state:
|
|
107
|
+
def loopingThroughTheDimensions(state: SymmetricFoldsState) -> bool:
|
|
112
108
|
return state.indexDimension < state.dimensionsTotal
|
|
113
109
|
|
|
114
|
-
def loopingToActiveGapCeiling(state:
|
|
110
|
+
def loopingToActiveGapCeiling(state: SymmetricFoldsState) -> bool:
|
|
115
111
|
return state.indexMiniGap < state.gap1ndexCeiling
|
|
116
112
|
|
|
117
|
-
def noGapsHere(state:
|
|
113
|
+
def noGapsHere(state: SymmetricFoldsState) -> bool:
|
|
118
114
|
return state.leaf1ndex > 0 and state.gap1ndex == state.gapRangeStart[state.leaf1ndex - 1]
|
|
119
115
|
|
|
120
|
-
def tryAnotherLeafConnectee(state:
|
|
116
|
+
def tryAnotherLeafConnectee(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
121
117
|
state.leafConnectee = state.connectionGraph[state.indexDimension, state.leaf1ndex, state.leafBelow[state.leafConnectee]]
|
|
122
118
|
return state
|
|
123
119
|
|
|
124
|
-
def tryNextDimension(state:
|
|
120
|
+
def tryNextDimension(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
125
121
|
state.indexDimension += 1
|
|
126
122
|
return state
|
|
127
123
|
|
|
128
|
-
def undoLastLeafPlacement(state:
|
|
124
|
+
def undoLastLeafPlacement(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
129
125
|
state.leaf1ndex -= 1
|
|
130
126
|
state.leafBelow[state.leafAbove[state.leaf1ndex]] = state.leafBelow[state.leaf1ndex]
|
|
131
127
|
state.leafAbove[state.leafBelow[state.leaf1ndex]] = state.leafAbove[state.leaf1ndex]
|
|
132
128
|
return state
|
|
133
129
|
|
|
134
|
-
def count(state:
|
|
130
|
+
def count(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
135
131
|
while activeLeafGreaterThan0(state):
|
|
136
132
|
if activeLeafIsTheFirstLeaf(state) or leafBelowSentinelIs1(state):
|
|
137
133
|
if activeLeafGreaterThanLeavesTotal(state):
|
|
@@ -160,6 +156,6 @@ def count(state: MapFoldingState) -> MapFoldingState:
|
|
|
160
156
|
state.groupsOfFolds = (state.groupsOfFolds + 1) // 2
|
|
161
157
|
return state
|
|
162
158
|
|
|
163
|
-
def doTheNeedful(state:
|
|
159
|
+
def doTheNeedful(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
164
160
|
state = count(state)
|
|
165
161
|
return state
|
|
@@ -1,56 +1,115 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
from copy import deepcopy
|
|
2
|
+
from queue import Queue
|
|
3
|
+
from threading import Lock, Thread
|
|
4
|
+
|
|
5
|
+
import numpy
|
|
6
|
+
|
|
7
|
+
from mapFolding import DatatypeFoldsTotal
|
|
8
|
+
from mapFolding.dataBaskets import SymmetricFoldsState
|
|
9
|
+
|
|
10
|
+
listThreads: list[Thread] = []
|
|
11
|
+
queueFutures: Queue[SymmetricFoldsState] = Queue()
|
|
12
|
+
symmetricFoldsTotal: int = 0
|
|
13
|
+
LOCKsymmetricFoldsTotal = Lock()
|
|
14
|
+
STOPsignal = object()
|
|
15
|
+
|
|
16
|
+
def initializeConcurrencyManager(maxWorkers: int, symmetricFolds: int=0) -> None:
|
|
17
|
+
global listThreads, symmetricFoldsTotal, queueFutures
|
|
18
|
+
listThreads = []
|
|
19
|
+
queueFutures = Queue()
|
|
20
|
+
symmetricFoldsTotal = symmetricFolds
|
|
21
|
+
indexThread = 0
|
|
22
|
+
while indexThread < maxWorkers:
|
|
23
|
+
thread = Thread(target=_threadDoesSomething, name=f'thread{indexThread}', daemon=True)
|
|
24
|
+
thread.start()
|
|
25
|
+
listThreads.append(thread)
|
|
26
|
+
indexThread += 1
|
|
27
|
+
|
|
28
|
+
def _threadDoesSomething() -> None:
|
|
29
|
+
global symmetricFoldsTotal
|
|
30
|
+
while True:
|
|
31
|
+
state = queueFutures.get()
|
|
32
|
+
if state is STOPsignal:
|
|
33
|
+
break
|
|
34
|
+
state = _filterAsymmetricFolds(state)
|
|
35
|
+
with LOCKsymmetricFoldsTotal:
|
|
36
|
+
symmetricFoldsTotal += state.groupsOfFolds
|
|
37
|
+
|
|
38
|
+
def filterAsymmetricFolds(state: SymmetricFoldsState) -> None:
|
|
39
|
+
queueFutures.put_nowait(deepcopy(state))
|
|
40
|
+
|
|
41
|
+
def getSymmetricFoldsTotal() -> DatatypeFoldsTotal:
|
|
42
|
+
for _thread in listThreads:
|
|
43
|
+
queueFutures.put(STOPsignal)
|
|
44
|
+
for thread in listThreads:
|
|
45
|
+
thread.join()
|
|
46
|
+
return symmetricFoldsTotal
|
|
47
|
+
|
|
48
|
+
def _filterAsymmetricFolds(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
49
|
+
state.indexLeaf = 1
|
|
50
|
+
state.leafComparison[0] = 1
|
|
51
|
+
state.leafConnectee = 1
|
|
52
|
+
while state.leafConnectee < state.leavesTotal + 1:
|
|
53
|
+
state.indexMiniGap = state.leafBelow[state.indexLeaf]
|
|
54
|
+
state.leafComparison[state.leafConnectee] = (state.indexMiniGap - state.indexLeaf + state.leavesTotal) % state.leavesTotal
|
|
55
|
+
state.indexLeaf = state.indexMiniGap
|
|
56
|
+
state.leafConnectee += 1
|
|
57
|
+
state.arrayGroupOfFolds = numpy.take(state.leafComparison, state.indicesArrayGroupOfFolds)
|
|
58
|
+
state.indexMiniGap = 0
|
|
59
|
+
while state.indexMiniGap < len(state.arrayGroupOfFolds):
|
|
60
|
+
state.groupsOfFolds += int(numpy.all(numpy.equal(state.arrayGroupOfFolds[state.indexMiniGap, slice(0, state.leavesTotal // 2)], state.arrayGroupOfFolds[state.indexMiniGap, slice(state.leavesTotal // 2, None)])))
|
|
61
|
+
state.indexMiniGap += 1
|
|
62
|
+
return state
|
|
63
|
+
|
|
64
|
+
def activeLeafGreaterThan0(state: SymmetricFoldsState) -> bool:
|
|
6
65
|
return state.leaf1ndex > 0
|
|
7
66
|
|
|
8
|
-
def activeLeafGreaterThanLeavesTotal(state:
|
|
67
|
+
def activeLeafGreaterThanLeavesTotal(state: SymmetricFoldsState) -> bool:
|
|
9
68
|
return state.leaf1ndex > state.leavesTotal
|
|
10
69
|
|
|
11
|
-
def activeLeafIsTheFirstLeaf(state:
|
|
70
|
+
def activeLeafIsTheFirstLeaf(state: SymmetricFoldsState) -> bool:
|
|
12
71
|
return state.leaf1ndex <= 1
|
|
13
72
|
|
|
14
|
-
def activeLeafIsUnconstrainedInAllDimensions(state:
|
|
73
|
+
def activeLeafIsUnconstrainedInAllDimensions(state: SymmetricFoldsState) -> bool:
|
|
15
74
|
return not state.dimensionsUnconstrained
|
|
16
75
|
|
|
17
|
-
def activeLeafUnconstrainedInThisDimension(state:
|
|
76
|
+
def activeLeafUnconstrainedInThisDimension(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
18
77
|
state.dimensionsUnconstrained -= 1
|
|
19
78
|
return state
|
|
20
79
|
|
|
21
|
-
def filterCommonGaps(state:
|
|
80
|
+
def filterCommonGaps(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
22
81
|
state.gapsWhere[state.gap1ndex] = state.gapsWhere[state.indexMiniGap]
|
|
23
82
|
if state.countDimensionsGapped[state.gapsWhere[state.indexMiniGap]] == state.dimensionsUnconstrained:
|
|
24
83
|
state = incrementActiveGap(state)
|
|
25
84
|
state.countDimensionsGapped[state.gapsWhere[state.indexMiniGap]] = 0
|
|
26
85
|
return state
|
|
27
86
|
|
|
28
|
-
def gapAvailable(state:
|
|
87
|
+
def gapAvailable(state: SymmetricFoldsState) -> bool:
|
|
29
88
|
return state.leaf1ndex > 0
|
|
30
89
|
|
|
31
|
-
def incrementActiveGap(state:
|
|
90
|
+
def incrementActiveGap(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
32
91
|
state.gap1ndex += 1
|
|
33
92
|
return state
|
|
34
93
|
|
|
35
|
-
def incrementGap1ndexCeiling(state:
|
|
94
|
+
def incrementGap1ndexCeiling(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
36
95
|
state.gap1ndexCeiling += 1
|
|
37
96
|
return state
|
|
38
97
|
|
|
39
|
-
def incrementIndexMiniGap(state:
|
|
98
|
+
def incrementIndexMiniGap(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
40
99
|
state.indexMiniGap += 1
|
|
41
100
|
return state
|
|
42
101
|
|
|
43
|
-
def initializeIndexMiniGap(state:
|
|
102
|
+
def initializeIndexMiniGap(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
44
103
|
state.indexMiniGap = state.gap1ndex
|
|
45
104
|
return state
|
|
46
105
|
|
|
47
|
-
def initializeVariablesToFindGaps(state:
|
|
106
|
+
def initializeVariablesToFindGaps(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
48
107
|
state.dimensionsUnconstrained = state.dimensionsTotal
|
|
49
108
|
state.gap1ndexCeiling = state.gapRangeStart[state.leaf1ndex - 1]
|
|
50
109
|
state.indexDimension = 0
|
|
51
110
|
return state
|
|
52
111
|
|
|
53
|
-
def insertActiveLeaf(state:
|
|
112
|
+
def insertActiveLeaf(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
54
113
|
state.indexLeaf = 0
|
|
55
114
|
while state.indexLeaf < state.leaf1ndex:
|
|
56
115
|
state.gapsWhere[state.gap1ndexCeiling] = state.indexLeaf
|
|
@@ -58,7 +117,7 @@ def insertActiveLeaf(state: MapFoldingState) -> MapFoldingState:
|
|
|
58
117
|
state.indexLeaf += 1
|
|
59
118
|
return state
|
|
60
119
|
|
|
61
|
-
def insertActiveLeafAtGap(state:
|
|
120
|
+
def insertActiveLeafAtGap(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
62
121
|
state.gap1ndex -= 1
|
|
63
122
|
state.leafAbove[state.leaf1ndex] = state.gapsWhere[state.gap1ndex]
|
|
64
123
|
state.leafBelow[state.leaf1ndex] = state.leafBelow[state.leafAbove[state.leaf1ndex]]
|
|
@@ -68,54 +127,54 @@ def insertActiveLeafAtGap(state: MapFoldingState) -> MapFoldingState:
|
|
|
68
127
|
state.leaf1ndex += 1
|
|
69
128
|
return state
|
|
70
129
|
|
|
71
|
-
def leafBelowSentinelIs1(state:
|
|
130
|
+
def leafBelowSentinelIs1(state: SymmetricFoldsState) -> bool:
|
|
72
131
|
return state.leafBelow[0] == 1
|
|
73
132
|
|
|
74
|
-
def leafConnecteeIsActiveLeaf(state:
|
|
133
|
+
def leafConnecteeIsActiveLeaf(state: SymmetricFoldsState) -> bool:
|
|
75
134
|
return state.leafConnectee == state.leaf1ndex
|
|
76
135
|
|
|
77
|
-
def lookForGaps(state:
|
|
136
|
+
def lookForGaps(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
78
137
|
state.gapsWhere[state.gap1ndexCeiling] = state.leafConnectee
|
|
79
138
|
if state.countDimensionsGapped[state.leafConnectee] == 0:
|
|
80
139
|
state = incrementGap1ndexCeiling(state)
|
|
81
140
|
state.countDimensionsGapped[state.leafConnectee] += 1
|
|
82
141
|
return state
|
|
83
142
|
|
|
84
|
-
def lookupLeafConnecteeInConnectionGraph(state:
|
|
143
|
+
def lookupLeafConnecteeInConnectionGraph(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
85
144
|
state.leafConnectee = state.connectionGraph[state.indexDimension, state.leaf1ndex, state.leaf1ndex]
|
|
86
145
|
return state
|
|
87
146
|
|
|
88
|
-
def loopingLeavesConnectedToActiveLeaf(state:
|
|
147
|
+
def loopingLeavesConnectedToActiveLeaf(state: SymmetricFoldsState) -> bool:
|
|
89
148
|
return state.leafConnectee != state.leaf1ndex
|
|
90
149
|
|
|
91
|
-
def loopingThroughTheDimensions(state:
|
|
150
|
+
def loopingThroughTheDimensions(state: SymmetricFoldsState) -> bool:
|
|
92
151
|
return state.indexDimension < state.dimensionsTotal
|
|
93
152
|
|
|
94
|
-
def loopingToActiveGapCeiling(state:
|
|
153
|
+
def loopingToActiveGapCeiling(state: SymmetricFoldsState) -> bool:
|
|
95
154
|
return state.indexMiniGap < state.gap1ndexCeiling
|
|
96
155
|
|
|
97
|
-
def noGapsHere(state:
|
|
156
|
+
def noGapsHere(state: SymmetricFoldsState) -> bool:
|
|
98
157
|
return state.leaf1ndex > 0 and state.gap1ndex == state.gapRangeStart[state.leaf1ndex - 1]
|
|
99
158
|
|
|
100
|
-
def tryAnotherLeafConnectee(state:
|
|
159
|
+
def tryAnotherLeafConnectee(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
101
160
|
state.leafConnectee = state.connectionGraph[state.indexDimension, state.leaf1ndex, state.leafBelow[state.leafConnectee]]
|
|
102
161
|
return state
|
|
103
162
|
|
|
104
|
-
def tryNextDimension(state:
|
|
163
|
+
def tryNextDimension(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
105
164
|
state.indexDimension += 1
|
|
106
165
|
return state
|
|
107
166
|
|
|
108
|
-
def undoLastLeafPlacement(state:
|
|
167
|
+
def undoLastLeafPlacement(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
109
168
|
state.leaf1ndex -= 1
|
|
110
169
|
state.leafBelow[state.leafAbove[state.leaf1ndex]] = state.leafBelow[state.leaf1ndex]
|
|
111
170
|
state.leafAbove[state.leafBelow[state.leaf1ndex]] = state.leafAbove[state.leaf1ndex]
|
|
112
171
|
return state
|
|
113
172
|
|
|
114
|
-
def count(state:
|
|
173
|
+
def count(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
115
174
|
while activeLeafGreaterThan0(state):
|
|
116
175
|
if activeLeafIsTheFirstLeaf(state) or leafBelowSentinelIs1(state):
|
|
117
176
|
if activeLeafGreaterThanLeavesTotal(state):
|
|
118
|
-
filterAsymmetricFolds(state
|
|
177
|
+
filterAsymmetricFolds(state)
|
|
119
178
|
else:
|
|
120
179
|
state = initializeVariablesToFindGaps(state)
|
|
121
180
|
while loopingThroughTheDimensions(state):
|
|
@@ -138,11 +197,11 @@ def count(state: MapFoldingState) -> MapFoldingState:
|
|
|
138
197
|
if gapAvailable(state):
|
|
139
198
|
state = insertActiveLeafAtGap(state)
|
|
140
199
|
else:
|
|
141
|
-
state.groupsOfFolds =
|
|
200
|
+
state.groupsOfFolds = getSymmetricFoldsTotal()
|
|
142
201
|
state.groupsOfFolds = (state.groupsOfFolds + 1) // 2
|
|
143
202
|
return state
|
|
144
203
|
|
|
145
|
-
def doTheNeedful(state:
|
|
146
|
-
initializeConcurrencyManager()
|
|
204
|
+
def doTheNeedful(state: SymmetricFoldsState, maxWorkers: int) -> SymmetricFoldsState:
|
|
205
|
+
initializeConcurrencyManager(maxWorkers)
|
|
147
206
|
state = count(state)
|
|
148
207
|
return state
|
|
@@ -1,28 +1,22 @@
|
|
|
1
|
-
from mapFolding.dataBaskets import
|
|
1
|
+
from mapFolding.dataBaskets import SymmetricFoldsState
|
|
2
|
+
import numpy
|
|
2
3
|
|
|
3
|
-
def transitionOnGroupsOfFolds(state:
|
|
4
|
+
def transitionOnGroupsOfFolds(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
4
5
|
while state.groupsOfFolds == 0:
|
|
5
6
|
if state.leaf1ndex <= 1 or state.leafBelow[0] == 1:
|
|
6
7
|
if state.leaf1ndex > state.leavesTotal:
|
|
7
|
-
state.indexLeaf =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
state.
|
|
12
|
-
state.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
state.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
while leafConnectee < indexInMiddle:
|
|
20
|
-
if state.leafComparison[(state.indexMiniGap + leafConnectee) % (state.leavesTotal + 1)] != state.leafComparison[(state.indexMiniGap + state.leavesTotal - 1 - leafConnectee) % (state.leavesTotal + 1)]:
|
|
21
|
-
ImaSymmetricFold = False
|
|
22
|
-
break
|
|
23
|
-
leafConnectee += 1
|
|
24
|
-
state.groupsOfFolds += ImaSymmetricFold
|
|
25
|
-
state.indexMiniGap += 1
|
|
8
|
+
state.indexLeaf = 1
|
|
9
|
+
state.leafComparison[0] = 1
|
|
10
|
+
state.leafConnectee = 1
|
|
11
|
+
while state.leafConnectee < state.leavesTotal + 1:
|
|
12
|
+
state.indexMiniGap = state.leafBelow[state.indexLeaf]
|
|
13
|
+
state.leafComparison[state.leafConnectee] = (state.indexMiniGap - state.indexLeaf + state.leavesTotal) % state.leavesTotal
|
|
14
|
+
state.indexLeaf = state.indexMiniGap
|
|
15
|
+
state.leafConnectee += 1
|
|
16
|
+
state.arrayGroupOfFolds = numpy.take(state.leafComparison, state.indicesArrayGroupOfFolds)
|
|
17
|
+
compared = state.arrayGroupOfFolds[..., 0:state.leavesTotal // 2] == state.arrayGroupOfFolds[..., state.leavesTotal // 2:None]
|
|
18
|
+
for indexRow in range(len(compared)):
|
|
19
|
+
state.groupsOfFolds += compared[indexRow].all()
|
|
26
20
|
else:
|
|
27
21
|
state.dimensionsUnconstrained = state.dimensionsTotal
|
|
28
22
|
state.gap1ndexCeiling = state.gapRangeStart[state.leaf1ndex - 1]
|
|
@@ -1,28 +1,23 @@
|
|
|
1
|
-
from mapFolding.dataBaskets import
|
|
1
|
+
from mapFolding.dataBaskets import SymmetricFoldsState
|
|
2
|
+
from mapFolding.syntheticModules.A007822.initializeState import transitionOnGroupsOfFolds
|
|
3
|
+
import numpy
|
|
2
4
|
|
|
3
|
-
def count(state:
|
|
5
|
+
def count(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
4
6
|
while state.leaf1ndex > 4:
|
|
5
7
|
if state.leafBelow[0] == 1:
|
|
6
8
|
if state.leaf1ndex > state.leavesTotal:
|
|
7
|
-
state.indexLeaf =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
state.
|
|
12
|
-
state.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
state.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
while leafConnectee < indexInMiddle:
|
|
20
|
-
if state.leafComparison[(state.indexMiniGap + leafConnectee) % (state.leavesTotal + 1)] != state.leafComparison[(state.indexMiniGap + state.leavesTotal - 1 - leafConnectee) % (state.leavesTotal + 1)]:
|
|
21
|
-
ImaSymmetricFold = False
|
|
22
|
-
break
|
|
23
|
-
leafConnectee += 1
|
|
24
|
-
state.groupsOfFolds += ImaSymmetricFold
|
|
25
|
-
state.indexMiniGap += 1
|
|
9
|
+
state.indexLeaf = 1
|
|
10
|
+
state.leafComparison[0] = 1
|
|
11
|
+
state.leafConnectee = 1
|
|
12
|
+
while state.leafConnectee < state.leavesTotal + 1:
|
|
13
|
+
state.indexMiniGap = state.leafBelow[state.indexLeaf]
|
|
14
|
+
state.leafComparison[state.leafConnectee] = (state.indexMiniGap - state.indexLeaf + state.leavesTotal) % state.leavesTotal
|
|
15
|
+
state.indexLeaf = state.indexMiniGap
|
|
16
|
+
state.leafConnectee += 1
|
|
17
|
+
state.arrayGroupOfFolds = numpy.take(state.leafComparison, state.indicesArrayGroupOfFolds)
|
|
18
|
+
compared = state.arrayGroupOfFolds[..., 0:state.leavesTotal // 2] == state.arrayGroupOfFolds[..., state.leavesTotal // 2:None]
|
|
19
|
+
for indexRow in range(len(compared)):
|
|
20
|
+
state.groupsOfFolds += compared[indexRow].all()
|
|
26
21
|
else:
|
|
27
22
|
state.dimensionsUnconstrained = state.dimensionsTotal
|
|
28
23
|
state.gap1ndexCeiling = state.gapRangeStart[state.leaf1ndex - 1]
|
|
@@ -66,4 +61,9 @@ def count(state: MapFoldingState) -> MapFoldingState:
|
|
|
66
61
|
else:
|
|
67
62
|
state.groupsOfFolds *= 2
|
|
68
63
|
state.groupsOfFolds = (state.groupsOfFolds + 1) // 2
|
|
64
|
+
return state
|
|
65
|
+
|
|
66
|
+
def doTheNeedful(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
67
|
+
state = transitionOnGroupsOfFolds(state)
|
|
68
|
+
state = count(state)
|
|
69
69
|
return state
|
|
@@ -1,33 +1,25 @@
|
|
|
1
|
-
from mapFolding.dataBaskets import
|
|
2
|
-
|
|
3
|
-
from mapFolding.syntheticModules.dataPackingA007822 import unRePackDataclassA007822
|
|
1
|
+
from mapFolding.dataBaskets import Array1DElephino, Array1DLeavesTotal, Array2DLeavesTotal, Array3DLeavesTotal, DatatypeElephino, DatatypeFoldsTotal, DatatypeLeavesTotal, SymmetricFoldsState
|
|
2
|
+
from mapFolding.syntheticModules.A007822.initializeState import transitionOnGroupsOfFolds
|
|
4
3
|
from numba import jit
|
|
4
|
+
import numpy
|
|
5
5
|
|
|
6
|
-
@unRePackDataclassA007822
|
|
7
6
|
@jit(cache=True, error_model='numpy', fastmath=True, forceinline=True)
|
|
8
|
-
def count(groupsOfFolds: DatatypeFoldsTotal, gap1ndex: DatatypeElephino, gap1ndexCeiling: DatatypeElephino, indexDimension: DatatypeLeavesTotal, indexLeaf: DatatypeLeavesTotal, indexMiniGap: DatatypeElephino, leaf1ndex: DatatypeLeavesTotal, leafConnectee: DatatypeLeavesTotal, dimensionsUnconstrained: DatatypeLeavesTotal, countDimensionsGapped: Array1DLeavesTotal, gapRangeStart: Array1DElephino, gapsWhere: Array1DLeavesTotal, leafAbove: Array1DLeavesTotal, leafBelow: Array1DLeavesTotal, leafComparison: Array1DLeavesTotal, connectionGraph: Array3DLeavesTotal, dimensionsTotal: DatatypeLeavesTotal, leavesTotal: DatatypeLeavesTotal) -> tuple[DatatypeFoldsTotal, DatatypeElephino, DatatypeElephino, DatatypeLeavesTotal, DatatypeLeavesTotal, DatatypeElephino, DatatypeLeavesTotal, DatatypeLeavesTotal, DatatypeLeavesTotal, Array1DLeavesTotal, Array1DElephino, Array1DLeavesTotal, Array1DLeavesTotal, Array1DLeavesTotal, Array1DLeavesTotal, Array3DLeavesTotal, DatatypeLeavesTotal, DatatypeLeavesTotal]:
|
|
7
|
+
def count(groupsOfFolds: DatatypeFoldsTotal, gap1ndex: DatatypeElephino, gap1ndexCeiling: DatatypeElephino, indexDimension: DatatypeLeavesTotal, indexLeaf: DatatypeLeavesTotal, indexMiniGap: DatatypeElephino, leaf1ndex: DatatypeLeavesTotal, leafConnectee: DatatypeLeavesTotal, dimensionsUnconstrained: DatatypeLeavesTotal, countDimensionsGapped: Array1DLeavesTotal, gapRangeStart: Array1DElephino, gapsWhere: Array1DLeavesTotal, leafAbove: Array1DLeavesTotal, leafBelow: Array1DLeavesTotal, leafComparison: Array1DLeavesTotal, arrayGroupOfFolds: Array2DLeavesTotal, connectionGraph: Array3DLeavesTotal, dimensionsTotal: DatatypeLeavesTotal, indicesArrayGroupOfFolds: Array2DLeavesTotal, leavesTotal: DatatypeLeavesTotal) -> tuple[DatatypeFoldsTotal, DatatypeElephino, DatatypeElephino, DatatypeLeavesTotal, DatatypeLeavesTotal, DatatypeElephino, DatatypeLeavesTotal, DatatypeLeavesTotal, DatatypeLeavesTotal, Array1DLeavesTotal, Array1DElephino, Array1DLeavesTotal, Array1DLeavesTotal, Array1DLeavesTotal, Array1DLeavesTotal, Array2DLeavesTotal, Array3DLeavesTotal, DatatypeLeavesTotal, Array2DLeavesTotal, DatatypeLeavesTotal]:
|
|
9
8
|
while leaf1ndex > 4:
|
|
10
9
|
if leafBelow[0] == 1:
|
|
11
10
|
if leaf1ndex > leavesTotal:
|
|
12
|
-
indexLeaf =
|
|
13
|
-
|
|
11
|
+
indexLeaf = 1
|
|
12
|
+
leafComparison[0] = 1
|
|
13
|
+
leafConnectee = 1
|
|
14
14
|
while leafConnectee < leavesTotal + 1:
|
|
15
|
-
|
|
16
|
-
leafComparison[leafConnectee] = (
|
|
17
|
-
indexLeaf =
|
|
15
|
+
indexMiniGap = leafBelow[indexLeaf]
|
|
16
|
+
leafComparison[leafConnectee] = (indexMiniGap - indexLeaf + leavesTotal) % leavesTotal
|
|
17
|
+
indexLeaf = indexMiniGap
|
|
18
18
|
leafConnectee += 1
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
leafConnectee = 0
|
|
24
|
-
while leafConnectee < indexInMiddle:
|
|
25
|
-
if leafComparison[(indexMiniGap + leafConnectee) % (leavesTotal + 1)] != leafComparison[(indexMiniGap + leavesTotal - 1 - leafConnectee) % (leavesTotal + 1)]:
|
|
26
|
-
ImaSymmetricFold = False
|
|
27
|
-
break
|
|
28
|
-
leafConnectee += 1
|
|
29
|
-
groupsOfFolds += ImaSymmetricFold
|
|
30
|
-
indexMiniGap += 1
|
|
19
|
+
arrayGroupOfFolds = numpy.take(leafComparison, indicesArrayGroupOfFolds)
|
|
20
|
+
compared = arrayGroupOfFolds[..., 0:leavesTotal // 2] == arrayGroupOfFolds[..., leavesTotal // 2:None]
|
|
21
|
+
for indexRow in range(len(compared)):
|
|
22
|
+
groupsOfFolds += compared[indexRow].all()
|
|
31
23
|
else:
|
|
32
24
|
dimensionsUnconstrained = dimensionsTotal
|
|
33
25
|
gap1ndexCeiling = gapRangeStart[leaf1ndex - 1]
|
|
@@ -65,4 +57,31 @@ def count(groupsOfFolds: DatatypeFoldsTotal, gap1ndex: DatatypeElephino, gap1nde
|
|
|
65
57
|
else:
|
|
66
58
|
groupsOfFolds *= 2
|
|
67
59
|
groupsOfFolds = (groupsOfFolds + 1) // 2
|
|
68
|
-
return (groupsOfFolds, gap1ndex, gap1ndexCeiling, indexDimension, indexLeaf, indexMiniGap, leaf1ndex, leafConnectee, dimensionsUnconstrained, countDimensionsGapped, gapRangeStart, gapsWhere, leafAbove, leafBelow, leafComparison, connectionGraph, dimensionsTotal, leavesTotal)
|
|
60
|
+
return (groupsOfFolds, gap1ndex, gap1ndexCeiling, indexDimension, indexLeaf, indexMiniGap, leaf1ndex, leafConnectee, dimensionsUnconstrained, countDimensionsGapped, gapRangeStart, gapsWhere, leafAbove, leafBelow, leafComparison, arrayGroupOfFolds, connectionGraph, dimensionsTotal, indicesArrayGroupOfFolds, leavesTotal)
|
|
61
|
+
|
|
62
|
+
def doTheNeedful(state: SymmetricFoldsState) -> SymmetricFoldsState:
|
|
63
|
+
state = transitionOnGroupsOfFolds(state)
|
|
64
|
+
mapShape: tuple[DatatypeLeavesTotal, ...] = state.mapShape
|
|
65
|
+
groupsOfFolds: DatatypeFoldsTotal = state.groupsOfFolds
|
|
66
|
+
gap1ndex: DatatypeElephino = state.gap1ndex
|
|
67
|
+
gap1ndexCeiling: DatatypeElephino = state.gap1ndexCeiling
|
|
68
|
+
indexDimension: DatatypeLeavesTotal = state.indexDimension
|
|
69
|
+
indexLeaf: DatatypeLeavesTotal = state.indexLeaf
|
|
70
|
+
indexMiniGap: DatatypeElephino = state.indexMiniGap
|
|
71
|
+
leaf1ndex: DatatypeLeavesTotal = state.leaf1ndex
|
|
72
|
+
leafConnectee: DatatypeLeavesTotal = state.leafConnectee
|
|
73
|
+
dimensionsUnconstrained: DatatypeLeavesTotal = state.dimensionsUnconstrained
|
|
74
|
+
countDimensionsGapped: Array1DLeavesTotal = state.countDimensionsGapped
|
|
75
|
+
gapRangeStart: Array1DElephino = state.gapRangeStart
|
|
76
|
+
gapsWhere: Array1DLeavesTotal = state.gapsWhere
|
|
77
|
+
leafAbove: Array1DLeavesTotal = state.leafAbove
|
|
78
|
+
leafBelow: Array1DLeavesTotal = state.leafBelow
|
|
79
|
+
leafComparison: Array1DLeavesTotal = state.leafComparison
|
|
80
|
+
arrayGroupOfFolds: Array2DLeavesTotal = state.arrayGroupOfFolds
|
|
81
|
+
connectionGraph: Array3DLeavesTotal = state.connectionGraph
|
|
82
|
+
dimensionsTotal: DatatypeLeavesTotal = state.dimensionsTotal
|
|
83
|
+
indicesArrayGroupOfFolds: Array2DLeavesTotal = state.indicesArrayGroupOfFolds
|
|
84
|
+
leavesTotal: DatatypeLeavesTotal = state.leavesTotal
|
|
85
|
+
groupsOfFolds, gap1ndex, gap1ndexCeiling, indexDimension, indexLeaf, indexMiniGap, leaf1ndex, leafConnectee, dimensionsUnconstrained, countDimensionsGapped, gapRangeStart, gapsWhere, leafAbove, leafBelow, leafComparison, arrayGroupOfFolds, connectionGraph, dimensionsTotal, indicesArrayGroupOfFolds, leavesTotal = count(groupsOfFolds, gap1ndex, gap1ndexCeiling, indexDimension, indexLeaf, indexMiniGap, leaf1ndex, leafConnectee, dimensionsUnconstrained, countDimensionsGapped, gapRangeStart, gapsWhere, leafAbove, leafBelow, leafComparison, arrayGroupOfFolds, connectionGraph, dimensionsTotal, indicesArrayGroupOfFolds, leavesTotal)
|
|
86
|
+
state = SymmetricFoldsState(mapShape=mapShape, groupsOfFolds=groupsOfFolds, gap1ndex=gap1ndex, gap1ndexCeiling=gap1ndexCeiling, indexDimension=indexDimension, indexLeaf=indexLeaf, indexMiniGap=indexMiniGap, leaf1ndex=leaf1ndex, leafConnectee=leafConnectee, dimensionsUnconstrained=dimensionsUnconstrained, countDimensionsGapped=countDimensionsGapped, gapRangeStart=gapRangeStart, gapsWhere=gapsWhere, leafAbove=leafAbove, leafBelow=leafBelow, leafComparison=leafComparison)
|
|
87
|
+
return state
|