mapFolding 0.15.4__py3-none-any.whl → 0.16.1__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 +25 -0
- easyRun/A005316.py +21 -0
- easyRun/NOTcountingFolds.py +36 -0
- easyRun/__init__.py +0 -0
- easyRun/countFolds.py +41 -0
- easyRun/meanders.py +71 -0
- mapFolding/__init__.py +10 -55
- mapFolding/_dataPacking.py +68 -0
- mapFolding/_theSSOT.py +33 -36
- mapFolding/_theTypes.py +21 -4
- mapFolding/algorithms/daoOfMapFolding.py +1 -2
- mapFolding/algorithms/matrixMeanders.py +101 -348
- mapFolding/algorithms/matrixMeandersBeDry.py +264 -0
- mapFolding/algorithms/matrixMeandersNumPy.py +286 -0
- mapFolding/algorithms/matrixMeandersPandas.py +351 -0
- mapFolding/algorithms/oeisIDbyFormula.py +320 -76
- mapFolding/algorithms/zCuzDocStoopidoeisIDbyFormula.py +92 -0
- mapFolding/basecamp.py +261 -113
- mapFolding/beDRY.py +2 -30
- mapFolding/dataBaskets.py +120 -4
- mapFolding/oeis.py +13 -33
- mapFolding/reference/A000682facts.py +1276 -0
- mapFolding/reference/A005316facts.py +985 -0
- mapFolding/reference/matrixMeandersAnalysis/__init__.py +1 -0
- mapFolding/reference/matrixMeandersAnalysis/prefixNotationNotes.py +15 -0
- mapFolding/reference/meandersDumpingGround/A005316JavaPort.py +1 -1
- mapFolding/reference/meandersDumpingGround/A005316imperative.py +1 -1
- mapFolding/reference/meandersDumpingGround/matrixMeandersNumPyV1finalForm.py +424 -0
- mapFolding/someAssemblyRequired/A007822/A007822rawMaterials.py +54 -0
- mapFolding/someAssemblyRequired/A007822/__init__.py +0 -0
- mapFolding/someAssemblyRequired/A007822/makeA007822AsynchronousModules.py +197 -0
- mapFolding/someAssemblyRequired/A007822/makeA007822Modules.py +74 -0
- mapFolding/someAssemblyRequired/RecipeJob.py +4 -4
- mapFolding/someAssemblyRequired/__init__.py +9 -2
- mapFolding/someAssemblyRequired/_toolIfThis.py +4 -3
- mapFolding/someAssemblyRequired/_toolkitContainers.py +8 -8
- mapFolding/someAssemblyRequired/infoBooth.py +27 -30
- mapFolding/someAssemblyRequired/makeJobTheorem2Numba.py +6 -5
- mapFolding/someAssemblyRequired/makeJobTheorem2codon.py +6 -4
- mapFolding/someAssemblyRequired/makingModules_count.py +294 -0
- mapFolding/someAssemblyRequired/makingModules_doTheNeedful.py +117 -0
- mapFolding/someAssemblyRequired/mapFolding/__init__.py +0 -0
- mapFolding/someAssemblyRequired/mapFolding/makeMapFoldingModules.py +220 -0
- mapFolding/someAssemblyRequired/meanders/__init__.py +0 -0
- mapFolding/someAssemblyRequired/meanders/makeMeandersModules.py +64 -0
- mapFolding/someAssemblyRequired/toolkitMakeModules.py +152 -0
- mapFolding/someAssemblyRequired/toolkitNumba.py +1 -1
- mapFolding/someAssemblyRequired/transformationTools.py +1 -0
- mapFolding/syntheticModules/A007822/__init__.py +1 -0
- mapFolding/syntheticModules/{algorithmA007822.py → A007822/algorithm.py} +2 -3
- mapFolding/syntheticModules/{algorithmA007822Numba.py → A007822/algorithmNumba.py} +3 -6
- mapFolding/syntheticModules/A007822/asynchronous.py +148 -0
- mapFolding/syntheticModules/A007822/asynchronousAnnex.py +66 -0
- mapFolding/syntheticModules/A007822/asynchronousAnnexNumba.py +85 -0
- mapFolding/syntheticModules/A007822/asynchronousNumba.py +52 -0
- mapFolding/syntheticModules/A007822/asynchronousTheorem2.py +53 -0
- mapFolding/syntheticModules/A007822/asynchronousTrimmed.py +47 -0
- mapFolding/syntheticModules/{initializeStateA007822.py → A007822/initializeState.py} +1 -2
- mapFolding/syntheticModules/{theorem2A007822.py → A007822/theorem2.py} +1 -2
- mapFolding/syntheticModules/{theorem2A007822Numba.py → A007822/theorem2Numba.py} +6 -4
- mapFolding/syntheticModules/{theorem2A007822Trimmed.py → A007822/theorem2Trimmed.py} +1 -2
- mapFolding/syntheticModules/countParallelNumba.py +5 -2
- mapFolding/syntheticModules/daoOfMapFoldingNumba.py +4 -2
- mapFolding/syntheticModules/dataPacking.py +4 -2
- mapFolding/syntheticModules/dataPackingA007822.py +92 -26
- mapFolding/syntheticModules/meanders/__init__.py +1 -0
- mapFolding/syntheticModules/meanders/bigInt.py +62 -0
- mapFolding/syntheticModules/theorem2Numba.py +3 -2
- mapFolding/tests/conftest.py +28 -13
- mapFolding/tests/test_computations.py +69 -62
- mapFolding/tests/test_oeis.py +6 -6
- mapFolding/zCuzDocStoopid/__init__.py +4 -0
- mapFolding/zCuzDocStoopid/makeDocstrings.py +68 -0
- mapfolding-0.16.1.dist-info/METADATA +99 -0
- mapfolding-0.16.1.dist-info/RECORD +114 -0
- {mapfolding-0.15.4.dist-info → mapfolding-0.16.1.dist-info}/top_level.txt +1 -0
- mapFolding/someAssemblyRequired/A007822rawMaterials.py +0 -46
- mapFolding/someAssemblyRequired/makeAllModules.py +0 -764
- mapfolding-0.15.4.dist-info/METADATA +0 -78
- mapfolding-0.15.4.dist-info/RECORD +0 -78
- {mapfolding-0.15.4.dist-info → mapfolding-0.16.1.dist-info}/WHEEL +0 -0
- {mapfolding-0.15.4.dist-info → mapfolding-0.16.1.dist-info}/entry_points.txt +0 -0
- {mapfolding-0.15.4.dist-info → mapfolding-0.16.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
from mapFolding.dataBaskets import MapFoldingState
|
|
2
|
+
from mapFolding.syntheticModules.A007822.asynchronousAnnex import filterAsymmetricFolds, getAsymmetricFoldsTotal
|
|
3
|
+
|
|
4
|
+
def count(state: MapFoldingState) -> MapFoldingState:
|
|
5
|
+
while state.leaf1ndex > 4:
|
|
6
|
+
if state.leafBelow[0] == 1:
|
|
7
|
+
if state.leaf1ndex > state.leavesTotal:
|
|
8
|
+
filterAsymmetricFolds(state.leafBelow)
|
|
9
|
+
else:
|
|
10
|
+
state.dimensionsUnconstrained = state.dimensionsTotal
|
|
11
|
+
state.gap1ndexCeiling = state.gapRangeStart[state.leaf1ndex - 1]
|
|
12
|
+
state.indexDimension = 0
|
|
13
|
+
while state.indexDimension < state.dimensionsTotal:
|
|
14
|
+
state.leafConnectee = state.connectionGraph[state.indexDimension, state.leaf1ndex, state.leaf1ndex]
|
|
15
|
+
if state.leafConnectee == state.leaf1ndex:
|
|
16
|
+
state.dimensionsUnconstrained -= 1
|
|
17
|
+
else:
|
|
18
|
+
while state.leafConnectee != state.leaf1ndex:
|
|
19
|
+
state.gapsWhere[state.gap1ndexCeiling] = state.leafConnectee
|
|
20
|
+
if state.countDimensionsGapped[state.leafConnectee] == 0:
|
|
21
|
+
state.gap1ndexCeiling += 1
|
|
22
|
+
state.countDimensionsGapped[state.leafConnectee] += 1
|
|
23
|
+
state.leafConnectee = state.connectionGraph[state.indexDimension, state.leaf1ndex, state.leafBelow[state.leafConnectee]]
|
|
24
|
+
state.indexDimension += 1
|
|
25
|
+
if not state.dimensionsUnconstrained:
|
|
26
|
+
state.indexLeaf = 0
|
|
27
|
+
while state.indexLeaf < state.leaf1ndex:
|
|
28
|
+
state.gapsWhere[state.gap1ndexCeiling] = state.indexLeaf
|
|
29
|
+
state.gap1ndexCeiling += 1
|
|
30
|
+
state.indexLeaf += 1
|
|
31
|
+
state.indexMiniGap = state.gap1ndex
|
|
32
|
+
while state.indexMiniGap < state.gap1ndexCeiling:
|
|
33
|
+
state.gapsWhere[state.gap1ndex] = state.gapsWhere[state.indexMiniGap]
|
|
34
|
+
if state.countDimensionsGapped[state.gapsWhere[state.indexMiniGap]] == state.dimensionsUnconstrained:
|
|
35
|
+
state.gap1ndex += 1
|
|
36
|
+
state.countDimensionsGapped[state.gapsWhere[state.indexMiniGap]] = 0
|
|
37
|
+
state.indexMiniGap += 1
|
|
38
|
+
while state.gap1ndex == state.gapRangeStart[state.leaf1ndex - 1]:
|
|
39
|
+
state.leaf1ndex -= 1
|
|
40
|
+
state.leafBelow[state.leafAbove[state.leaf1ndex]] = state.leafBelow[state.leaf1ndex]
|
|
41
|
+
state.leafAbove[state.leafBelow[state.leaf1ndex]] = state.leafAbove[state.leaf1ndex]
|
|
42
|
+
state.gap1ndex -= 1
|
|
43
|
+
state.leafAbove[state.leaf1ndex] = state.gapsWhere[state.gap1ndex]
|
|
44
|
+
state.leafBelow[state.leaf1ndex] = state.leafBelow[state.leafAbove[state.leaf1ndex]]
|
|
45
|
+
state.leafBelow[state.leafAbove[state.leaf1ndex]] = state.leaf1ndex
|
|
46
|
+
state.leafAbove[state.leafBelow[state.leaf1ndex]] = state.leaf1ndex
|
|
47
|
+
state.gapRangeStart[state.leaf1ndex] = state.gap1ndex
|
|
48
|
+
state.leaf1ndex += 1
|
|
49
|
+
else:
|
|
50
|
+
state.groupsOfFolds = getAsymmetricFoldsTotal()
|
|
51
|
+
state.groupsOfFolds *= 2
|
|
52
|
+
state.groupsOfFolds = (state.groupsOfFolds + 1) // 2
|
|
53
|
+
return state
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from mapFolding.dataBaskets import MapFoldingState
|
|
2
|
+
from mapFolding.syntheticModules.A007822.asynchronousAnnex import filterAsymmetricFolds, getAsymmetricFoldsTotal
|
|
3
|
+
|
|
4
|
+
def count(state: MapFoldingState) -> MapFoldingState:
|
|
5
|
+
while state.leaf1ndex > 4:
|
|
6
|
+
if state.leafBelow[0] == 1:
|
|
7
|
+
if state.leaf1ndex > state.leavesTotal:
|
|
8
|
+
filterAsymmetricFolds(state.leafBelow)
|
|
9
|
+
else:
|
|
10
|
+
state.dimensionsUnconstrained = state.dimensionsTotal
|
|
11
|
+
state.gap1ndexCeiling = state.gapRangeStart[state.leaf1ndex - 1]
|
|
12
|
+
state.indexDimension = 0
|
|
13
|
+
while state.indexDimension < state.dimensionsTotal:
|
|
14
|
+
state.leafConnectee = state.connectionGraph[state.indexDimension, state.leaf1ndex, state.leaf1ndex]
|
|
15
|
+
if state.leafConnectee == state.leaf1ndex:
|
|
16
|
+
state.dimensionsUnconstrained -= 1
|
|
17
|
+
else:
|
|
18
|
+
while state.leafConnectee != state.leaf1ndex:
|
|
19
|
+
state.gapsWhere[state.gap1ndexCeiling] = state.leafConnectee
|
|
20
|
+
if state.countDimensionsGapped[state.leafConnectee] == 0:
|
|
21
|
+
state.gap1ndexCeiling += 1
|
|
22
|
+
state.countDimensionsGapped[state.leafConnectee] += 1
|
|
23
|
+
state.leafConnectee = state.connectionGraph[state.indexDimension, state.leaf1ndex, state.leafBelow[state.leafConnectee]]
|
|
24
|
+
state.indexDimension += 1
|
|
25
|
+
state.indexMiniGap = state.gap1ndex
|
|
26
|
+
while state.indexMiniGap < state.gap1ndexCeiling:
|
|
27
|
+
state.gapsWhere[state.gap1ndex] = state.gapsWhere[state.indexMiniGap]
|
|
28
|
+
if state.countDimensionsGapped[state.gapsWhere[state.indexMiniGap]] == state.dimensionsUnconstrained:
|
|
29
|
+
state.gap1ndex += 1
|
|
30
|
+
state.countDimensionsGapped[state.gapsWhere[state.indexMiniGap]] = 0
|
|
31
|
+
state.indexMiniGap += 1
|
|
32
|
+
while state.gap1ndex == state.gapRangeStart[state.leaf1ndex - 1]:
|
|
33
|
+
state.leaf1ndex -= 1
|
|
34
|
+
state.leafBelow[state.leafAbove[state.leaf1ndex]] = state.leafBelow[state.leaf1ndex]
|
|
35
|
+
state.leafAbove[state.leafBelow[state.leaf1ndex]] = state.leafAbove[state.leaf1ndex]
|
|
36
|
+
state.gap1ndex -= 1
|
|
37
|
+
state.leafAbove[state.leaf1ndex] = state.gapsWhere[state.gap1ndex]
|
|
38
|
+
state.leafBelow[state.leaf1ndex] = state.leafBelow[state.leafAbove[state.leaf1ndex]]
|
|
39
|
+
state.leafBelow[state.leafAbove[state.leaf1ndex]] = state.leaf1ndex
|
|
40
|
+
state.leafAbove[state.leafBelow[state.leaf1ndex]] = state.leaf1ndex
|
|
41
|
+
state.gapRangeStart[state.leaf1ndex] = state.gap1ndex
|
|
42
|
+
state.leaf1ndex += 1
|
|
43
|
+
else:
|
|
44
|
+
state.groupsOfFolds = getAsymmetricFoldsTotal()
|
|
45
|
+
state.groupsOfFolds *= 2
|
|
46
|
+
state.groupsOfFolds = (state.groupsOfFolds + 1) // 2
|
|
47
|
+
return state
|
|
@@ -21,8 +21,7 @@ def transitionOnGroupsOfFolds(state: MapFoldingState) -> MapFoldingState:
|
|
|
21
21
|
ImaSymmetricFold = False
|
|
22
22
|
break
|
|
23
23
|
leafConnectee += 1
|
|
24
|
-
|
|
25
|
-
state.groupsOfFolds += 1
|
|
24
|
+
state.groupsOfFolds += ImaSymmetricFold
|
|
26
25
|
state.indexMiniGap += 1
|
|
27
26
|
else:
|
|
28
27
|
state.dimensionsUnconstrained = state.dimensionsTotal
|
|
@@ -21,8 +21,7 @@ def count(state: MapFoldingState) -> MapFoldingState:
|
|
|
21
21
|
ImaSymmetricFold = False
|
|
22
22
|
break
|
|
23
23
|
leafConnectee += 1
|
|
24
|
-
|
|
25
|
-
state.groupsOfFolds += 1
|
|
24
|
+
state.groupsOfFolds += ImaSymmetricFold
|
|
26
25
|
state.indexMiniGap += 1
|
|
27
26
|
else:
|
|
28
27
|
state.dimensionsUnconstrained = state.dimensionsTotal
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
from mapFolding.dataBaskets import
|
|
1
|
+
from mapFolding.dataBaskets import (
|
|
2
|
+
Array1DElephino, Array1DLeavesTotal, Array3DLeavesTotal, DatatypeElephino, DatatypeFoldsTotal, DatatypeLeavesTotal)
|
|
3
|
+
from mapFolding.syntheticModules.dataPackingA007822 import unRePackDataclassA007822
|
|
2
4
|
from numba import jit
|
|
3
5
|
|
|
6
|
+
@unRePackDataclassA007822
|
|
4
7
|
@jit(cache=True, error_model='numpy', fastmath=True, forceinline=True)
|
|
5
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]:
|
|
6
9
|
while leaf1ndex > 4:
|
|
@@ -23,8 +26,7 @@ def count(groupsOfFolds: DatatypeFoldsTotal, gap1ndex: DatatypeElephino, gap1nde
|
|
|
23
26
|
ImaSymmetricFold = False
|
|
24
27
|
break
|
|
25
28
|
leafConnectee += 1
|
|
26
|
-
|
|
27
|
-
groupsOfFolds += 1
|
|
29
|
+
groupsOfFolds += ImaSymmetricFold
|
|
28
30
|
indexMiniGap += 1
|
|
29
31
|
else:
|
|
30
32
|
dimensionsUnconstrained = dimensionsTotal
|
|
@@ -63,4 +65,4 @@ def count(groupsOfFolds: DatatypeFoldsTotal, gap1ndex: DatatypeElephino, gap1nde
|
|
|
63
65
|
else:
|
|
64
66
|
groupsOfFolds *= 2
|
|
65
67
|
groupsOfFolds = (groupsOfFolds + 1) // 2
|
|
66
|
-
return (groupsOfFolds, gap1ndex, gap1ndexCeiling, indexDimension, indexLeaf, indexMiniGap, leaf1ndex, leafConnectee, dimensionsUnconstrained, countDimensionsGapped, gapRangeStart, gapsWhere, leafAbove, leafBelow, leafComparison, connectionGraph, dimensionsTotal, leavesTotal)
|
|
68
|
+
return (groupsOfFolds, gap1ndex, gap1ndexCeiling, indexDimension, indexLeaf, indexMiniGap, leaf1ndex, leafConnectee, dimensionsUnconstrained, countDimensionsGapped, gapRangeStart, gapsWhere, leafAbove, leafBelow, leafComparison, connectionGraph, dimensionsTotal, leavesTotal)
|
|
@@ -21,8 +21,7 @@ def count(state: MapFoldingState) -> MapFoldingState:
|
|
|
21
21
|
ImaSymmetricFold = False
|
|
22
22
|
break
|
|
23
23
|
leafConnectee += 1
|
|
24
|
-
|
|
25
|
-
state.groupsOfFolds += 1
|
|
24
|
+
state.groupsOfFolds += ImaSymmetricFold
|
|
26
25
|
state.indexMiniGap += 1
|
|
27
26
|
else:
|
|
28
27
|
state.dimensionsUnconstrained = state.dimensionsTotal
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
from concurrent.futures import Future as ConcurrentFuture, ProcessPoolExecutor
|
|
2
2
|
from copy import deepcopy
|
|
3
|
-
from mapFolding.dataBaskets import
|
|
3
|
+
from mapFolding.dataBaskets import (
|
|
4
|
+
Array1DElephino, Array1DLeavesTotal, Array3DLeavesTotal, DatatypeElephino, DatatypeFoldsTotal, DatatypeLeavesTotal,
|
|
5
|
+
ParallelMapFoldingState)
|
|
4
6
|
from multiprocessing import set_start_method as multiprocessing_set_start_method
|
|
5
7
|
from numba import jit
|
|
8
|
+
|
|
6
9
|
if __name__ == '__main__':
|
|
7
10
|
multiprocessing_set_start_method('spawn')
|
|
8
11
|
|
|
@@ -96,4 +99,4 @@ def doTheNeedful(state: ParallelMapFoldingState, concurrencyLimit: int) -> tuple
|
|
|
96
99
|
listStatesParallel[indexSherpa] = dictionaryConcurrency[indexSherpa].result()
|
|
97
100
|
groupsOfFoldsTotal += listStatesParallel[indexSherpa].groupsOfFolds
|
|
98
101
|
foldsTotal: int = groupsOfFoldsTotal * stateParallel.leavesTotal
|
|
99
|
-
return (foldsTotal, listStatesParallel)
|
|
102
|
+
return (foldsTotal, listStatesParallel)
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
from mapFolding.dataBaskets import
|
|
1
|
+
from mapFolding.dataBaskets import (
|
|
2
|
+
Array1DElephino, Array1DLeavesTotal, Array3DLeavesTotal, DatatypeElephino, DatatypeFoldsTotal, DatatypeLeavesTotal,
|
|
3
|
+
MapFoldingState)
|
|
2
4
|
from numba import jit
|
|
3
5
|
|
|
4
6
|
@jit(cache=True, error_model='numpy', fastmath=True, forceinline=True)
|
|
@@ -72,4 +74,4 @@ def doTheNeedful(state: MapFoldingState) -> MapFoldingState:
|
|
|
72
74
|
leavesTotal: DatatypeLeavesTotal = state.leavesTotal
|
|
73
75
|
groupsOfFolds, gap1ndex, gap1ndexCeiling, indexDimension, indexLeaf, indexMiniGap, leaf1ndex, leafConnectee, dimensionsUnconstrained, countDimensionsGapped, gapRangeStart, gapsWhere, leafAbove, leafBelow, connectionGraph, dimensionsTotal, leavesTotal = count(groupsOfFolds, gap1ndex, gap1ndexCeiling, indexDimension, indexLeaf, indexMiniGap, leaf1ndex, leafConnectee, dimensionsUnconstrained, countDimensionsGapped, gapRangeStart, gapsWhere, leafAbove, leafBelow, connectionGraph, dimensionsTotal, leavesTotal)
|
|
74
76
|
state = MapFoldingState(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)
|
|
75
|
-
return state
|
|
77
|
+
return state
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
from mapFolding.dataBaskets import
|
|
1
|
+
from mapFolding.dataBaskets import (
|
|
2
|
+
Array1DElephino, Array1DLeavesTotal, Array3DLeavesTotal, DatatypeElephino, DatatypeFoldsTotal, DatatypeLeavesTotal,
|
|
3
|
+
MapFoldingState)
|
|
2
4
|
from mapFolding.syntheticModules.theorem2Numba import count
|
|
3
5
|
|
|
4
6
|
def sequential(state: MapFoldingState) -> MapFoldingState:
|
|
@@ -23,4 +25,4 @@ def sequential(state: MapFoldingState) -> MapFoldingState:
|
|
|
23
25
|
leavesTotal: DatatypeLeavesTotal = state.leavesTotal
|
|
24
26
|
groupsOfFolds, gap1ndex, gap1ndexCeiling, indexDimension, indexMiniGap, leaf1ndex, leafConnectee, dimensionsUnconstrained, countDimensionsGapped, gapRangeStart, gapsWhere, leafAbove, leafBelow, connectionGraph, dimensionsTotal, leavesTotal = count(groupsOfFolds, gap1ndex, gap1ndexCeiling, indexDimension, indexMiniGap, leaf1ndex, leafConnectee, dimensionsUnconstrained, countDimensionsGapped, gapRangeStart, gapsWhere, leafAbove, leafBelow, connectionGraph, dimensionsTotal, leavesTotal)
|
|
25
27
|
state = MapFoldingState(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)
|
|
26
|
-
return state
|
|
28
|
+
return state
|
|
@@ -1,26 +1,92 @@
|
|
|
1
|
-
from
|
|
2
|
-
from mapFolding.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
from collections.abc import Callable
|
|
2
|
+
from mapFolding.dataBaskets import (
|
|
3
|
+
Array1DElephino, Array1DLeavesTotal, Array3DLeavesTotal, DatatypeElephino, DatatypeFoldsTotal, DatatypeLeavesTotal,
|
|
4
|
+
MapFoldingState)
|
|
5
|
+
|
|
6
|
+
def unRePackDataclassA007822(callableTarget: Callable[[
|
|
7
|
+
DatatypeFoldsTotal, DatatypeElephino, DatatypeElephino, DatatypeLeavesTotal, DatatypeLeavesTotal, DatatypeElephino,
|
|
8
|
+
DatatypeLeavesTotal, DatatypeLeavesTotal, DatatypeLeavesTotal, Array1DLeavesTotal, Array1DElephino, Array1DLeavesTotal,
|
|
9
|
+
Array1DLeavesTotal, Array1DLeavesTotal, Array1DLeavesTotal, Array3DLeavesTotal, DatatypeLeavesTotal, DatatypeLeavesTotal
|
|
10
|
+
], tuple[
|
|
11
|
+
DatatypeFoldsTotal, DatatypeElephino, DatatypeElephino, DatatypeLeavesTotal, DatatypeLeavesTotal, DatatypeElephino,
|
|
12
|
+
DatatypeLeavesTotal, DatatypeLeavesTotal, DatatypeLeavesTotal, Array1DLeavesTotal, Array1DElephino, Array1DLeavesTotal,
|
|
13
|
+
Array1DLeavesTotal, Array1DLeavesTotal, Array1DLeavesTotal, Array3DLeavesTotal, DatatypeLeavesTotal, DatatypeLeavesTotal
|
|
14
|
+
]]) -> Callable[[MapFoldingState], MapFoldingState]:
|
|
15
|
+
def workhorse(state: MapFoldingState) -> MapFoldingState:
|
|
16
|
+
mapShape: tuple[DatatypeLeavesTotal, ...] = state.mapShape
|
|
17
|
+
groupsOfFolds: DatatypeFoldsTotal = state.groupsOfFolds
|
|
18
|
+
gap1ndex: DatatypeElephino = state.gap1ndex
|
|
19
|
+
gap1ndexCeiling: DatatypeElephino = state.gap1ndexCeiling
|
|
20
|
+
indexDimension: DatatypeLeavesTotal = state.indexDimension
|
|
21
|
+
indexLeaf: DatatypeLeavesTotal = state.indexLeaf
|
|
22
|
+
indexMiniGap: DatatypeElephino = state.indexMiniGap
|
|
23
|
+
leaf1ndex: DatatypeLeavesTotal = state.leaf1ndex
|
|
24
|
+
leafConnectee: DatatypeLeavesTotal = state.leafConnectee
|
|
25
|
+
dimensionsUnconstrained: DatatypeLeavesTotal = state.dimensionsUnconstrained
|
|
26
|
+
countDimensionsGapped: Array1DLeavesTotal = state.countDimensionsGapped
|
|
27
|
+
gapRangeStart: Array1DElephino = state.gapRangeStart
|
|
28
|
+
gapsWhere: Array1DLeavesTotal = state.gapsWhere
|
|
29
|
+
leafAbove: Array1DLeavesTotal = state.leafAbove
|
|
30
|
+
leafBelow: Array1DLeavesTotal = state.leafBelow
|
|
31
|
+
leafComparison: Array1DLeavesTotal = state.leafComparison
|
|
32
|
+
connectionGraph: Array3DLeavesTotal = state.connectionGraph
|
|
33
|
+
dimensionsTotal: DatatypeLeavesTotal = state.dimensionsTotal
|
|
34
|
+
leavesTotal: DatatypeLeavesTotal = state.leavesTotal
|
|
35
|
+
|
|
36
|
+
(groupsOfFolds, gap1ndex, gap1ndexCeiling, indexDimension, indexLeaf, indexMiniGap, leaf1ndex, leafConnectee, dimensionsUnconstrained,
|
|
37
|
+
countDimensionsGapped, gapRangeStart, gapsWhere, leafAbove, leafBelow, leafComparison, connectionGraph, dimensionsTotal, leavesTotal
|
|
38
|
+
) = callableTarget(
|
|
39
|
+
groupsOfFolds, gap1ndex, gap1ndexCeiling, indexDimension, indexLeaf, indexMiniGap, leaf1ndex, leafConnectee, dimensionsUnconstrained,
|
|
40
|
+
countDimensionsGapped, gapRangeStart, gapsWhere, leafAbove, leafBelow, leafComparison, connectionGraph, dimensionsTotal, leavesTotal)
|
|
41
|
+
|
|
42
|
+
state = MapFoldingState(mapShape=mapShape, groupsOfFolds=groupsOfFolds, gap1ndex=gap1ndex, gap1ndexCeiling=gap1ndexCeiling,
|
|
43
|
+
indexDimension=indexDimension, indexLeaf=indexLeaf, indexMiniGap=indexMiniGap, leaf1ndex=leaf1ndex, leafConnectee=leafConnectee,
|
|
44
|
+
dimensionsUnconstrained=dimensionsUnconstrained, countDimensionsGapped=countDimensionsGapped, gapRangeStart=gapRangeStart,
|
|
45
|
+
gapsWhere=gapsWhere, leafAbove=leafAbove, leafBelow=leafBelow, leafComparison=leafComparison)
|
|
46
|
+
return state
|
|
47
|
+
|
|
48
|
+
return workhorse
|
|
49
|
+
|
|
50
|
+
def unRePackDataclassAsynchronous(callableTarget: Callable[[
|
|
51
|
+
DatatypeFoldsTotal, DatatypeElephino, DatatypeElephino, DatatypeLeavesTotal, DatatypeElephino,
|
|
52
|
+
DatatypeLeavesTotal, DatatypeLeavesTotal, DatatypeLeavesTotal, Array1DLeavesTotal, Array1DElephino, Array1DLeavesTotal,
|
|
53
|
+
Array1DLeavesTotal, Array1DLeavesTotal, Array3DLeavesTotal, DatatypeLeavesTotal, DatatypeLeavesTotal
|
|
54
|
+
], tuple[
|
|
55
|
+
DatatypeFoldsTotal, DatatypeElephino, DatatypeElephino, DatatypeLeavesTotal, DatatypeElephino,
|
|
56
|
+
DatatypeLeavesTotal, DatatypeLeavesTotal, DatatypeLeavesTotal, Array1DLeavesTotal, Array1DElephino, Array1DLeavesTotal,
|
|
57
|
+
Array1DLeavesTotal, Array1DLeavesTotal, Array3DLeavesTotal, DatatypeLeavesTotal, DatatypeLeavesTotal
|
|
58
|
+
]]) -> Callable[[MapFoldingState], MapFoldingState]:
|
|
59
|
+
def workhorse(state: MapFoldingState) -> MapFoldingState:
|
|
60
|
+
mapShape: tuple[DatatypeLeavesTotal, ...] = state.mapShape
|
|
61
|
+
groupsOfFolds: DatatypeFoldsTotal = state.groupsOfFolds
|
|
62
|
+
gap1ndex: DatatypeElephino = state.gap1ndex
|
|
63
|
+
gap1ndexCeiling: DatatypeElephino = state.gap1ndexCeiling
|
|
64
|
+
indexDimension: DatatypeLeavesTotal = state.indexDimension
|
|
65
|
+
indexLeaf: DatatypeLeavesTotal = state.indexLeaf
|
|
66
|
+
indexMiniGap: DatatypeElephino = state.indexMiniGap
|
|
67
|
+
leaf1ndex: DatatypeLeavesTotal = state.leaf1ndex
|
|
68
|
+
leafConnectee: DatatypeLeavesTotal = state.leafConnectee
|
|
69
|
+
dimensionsUnconstrained: DatatypeLeavesTotal = state.dimensionsUnconstrained
|
|
70
|
+
countDimensionsGapped: Array1DLeavesTotal = state.countDimensionsGapped
|
|
71
|
+
gapRangeStart: Array1DElephino = state.gapRangeStart
|
|
72
|
+
gapsWhere: Array1DLeavesTotal = state.gapsWhere
|
|
73
|
+
leafAbove: Array1DLeavesTotal = state.leafAbove
|
|
74
|
+
leafBelow: Array1DLeavesTotal = state.leafBelow
|
|
75
|
+
leafComparison: Array1DLeavesTotal = state.leafComparison
|
|
76
|
+
connectionGraph: Array3DLeavesTotal = state.connectionGraph
|
|
77
|
+
dimensionsTotal: DatatypeLeavesTotal = state.dimensionsTotal
|
|
78
|
+
leavesTotal: DatatypeLeavesTotal = state.leavesTotal
|
|
79
|
+
|
|
80
|
+
(groupsOfFolds, gap1ndex, gap1ndexCeiling, indexDimension, indexMiniGap, leaf1ndex, leafConnectee, dimensionsUnconstrained,
|
|
81
|
+
countDimensionsGapped, gapRangeStart, gapsWhere, leafAbove, leafBelow, connectionGraph, dimensionsTotal, leavesTotal
|
|
82
|
+
) = callableTarget(
|
|
83
|
+
groupsOfFolds, gap1ndex, gap1ndexCeiling, indexDimension, indexMiniGap, leaf1ndex, leafConnectee, dimensionsUnconstrained,
|
|
84
|
+
countDimensionsGapped, gapRangeStart, gapsWhere, leafAbove, leafBelow, connectionGraph, dimensionsTotal, leavesTotal)
|
|
85
|
+
|
|
86
|
+
state = MapFoldingState(mapShape=mapShape, groupsOfFolds=groupsOfFolds, gap1ndex=gap1ndex, gap1ndexCeiling=gap1ndexCeiling,
|
|
87
|
+
indexDimension=indexDimension, indexLeaf=indexLeaf, indexMiniGap=indexMiniGap, leaf1ndex=leaf1ndex, leafConnectee=leafConnectee,
|
|
88
|
+
dimensionsUnconstrained=dimensionsUnconstrained, countDimensionsGapped=countDimensionsGapped, gapRangeStart=gapRangeStart,
|
|
89
|
+
gapsWhere=gapsWhere, leafAbove=leafAbove, leafBelow=leafBelow, leafComparison=leafComparison)
|
|
90
|
+
return state
|
|
91
|
+
|
|
92
|
+
return workhorse
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Everything in this directory is synthesized by other modules in the package."""
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
from mapFolding.algorithms.matrixMeandersBeDry import areIntegersWide, walkDyckPath
|
|
2
|
+
from mapFolding.dataBaskets import MatrixMeandersNumPyState
|
|
3
|
+
|
|
4
|
+
def outfitDictionaryBitGroups(state: MatrixMeandersNumPyState) -> dict[tuple[int, int], int]:
|
|
5
|
+
"""Outfit `dictionaryBitGroups` so it may manage the computations for one iteration of the transfer matrix.
|
|
6
|
+
|
|
7
|
+
Parameters
|
|
8
|
+
----------
|
|
9
|
+
state : MatrixMeandersState
|
|
10
|
+
The current state of the computation, including `dictionaryMeanders`.
|
|
11
|
+
|
|
12
|
+
Returns
|
|
13
|
+
-------
|
|
14
|
+
dictionaryBitGroups : dict[tuple[int, int], int]
|
|
15
|
+
A dictionary of `(bitsAlpha, bitsZulu)` to `crossings`.
|
|
16
|
+
"""
|
|
17
|
+
state.bitWidth = max(state.dictionaryMeanders.keys()).bit_length()
|
|
18
|
+
return {(arcCode & state.locatorBits, arcCode >> 1 & state.locatorBits): crossings for arcCode, crossings in state.dictionaryMeanders.items()}
|
|
19
|
+
|
|
20
|
+
def countBigInt(state: MatrixMeandersNumPyState) -> MatrixMeandersNumPyState:
|
|
21
|
+
"""Count meanders with matrix transfer algorithm using Python `int` (*int*eger) contained in a Python `dict` (*dict*ionary).
|
|
22
|
+
|
|
23
|
+
Parameters
|
|
24
|
+
----------
|
|
25
|
+
state : MatrixMeandersState
|
|
26
|
+
The algorithm state.
|
|
27
|
+
|
|
28
|
+
Notes
|
|
29
|
+
-----
|
|
30
|
+
The matrix transfer algorithm is sophisticated, but this implementation is straightforward: compute each index one at a time,
|
|
31
|
+
compute each `arcCode` one at a time, and compute each type of analysis one at a time.
|
|
32
|
+
"""
|
|
33
|
+
dictionaryBitGroups: dict[tuple[int, int], int] = {}
|
|
34
|
+
while state.kOfMatrix > 0 and areIntegersWide(state):
|
|
35
|
+
state.kOfMatrix -= 1
|
|
36
|
+
dictionaryBitGroups = outfitDictionaryBitGroups(state)
|
|
37
|
+
state.dictionaryMeanders = {}
|
|
38
|
+
for (bitsAlpha, bitsZulu), crossings in dictionaryBitGroups.items():
|
|
39
|
+
bitsAlphaHasArcs: bool = bitsAlpha > 1
|
|
40
|
+
bitsZuluHasArcs: bool = bitsZulu > 1
|
|
41
|
+
bitsAlphaIsEven = bitsZuluIsEven = 0
|
|
42
|
+
arcCodeAnalysis = (bitsAlpha | bitsZulu << 1) << 2 | 3
|
|
43
|
+
if arcCodeAnalysis < state.MAXIMUMarcCode:
|
|
44
|
+
state.dictionaryMeanders[arcCodeAnalysis] = state.dictionaryMeanders.get(arcCodeAnalysis, 0) + crossings
|
|
45
|
+
if bitsAlphaHasArcs:
|
|
46
|
+
arcCodeAnalysis = bitsAlpha >> 2 | bitsZulu << 3 | (bitsAlphaIsEven := (1 - (bitsAlpha & 1))) << 1
|
|
47
|
+
if arcCodeAnalysis < state.MAXIMUMarcCode:
|
|
48
|
+
state.dictionaryMeanders[arcCodeAnalysis] = state.dictionaryMeanders.get(arcCodeAnalysis, 0) + crossings
|
|
49
|
+
if bitsZuluHasArcs:
|
|
50
|
+
arcCodeAnalysis = bitsZulu >> 1 | bitsAlpha << 2 | (bitsZuluIsEven := (1 - (bitsZulu & 1)))
|
|
51
|
+
if arcCodeAnalysis < state.MAXIMUMarcCode:
|
|
52
|
+
state.dictionaryMeanders[arcCodeAnalysis] = state.dictionaryMeanders.get(arcCodeAnalysis, 0) + crossings
|
|
53
|
+
if bitsAlphaHasArcs and bitsZuluHasArcs and (bitsAlphaIsEven or bitsZuluIsEven):
|
|
54
|
+
if bitsAlphaIsEven and (not bitsZuluIsEven):
|
|
55
|
+
bitsAlpha ^= walkDyckPath(bitsAlpha)
|
|
56
|
+
elif bitsZuluIsEven and (not bitsAlphaIsEven):
|
|
57
|
+
bitsZulu ^= walkDyckPath(bitsZulu)
|
|
58
|
+
arcCodeAnalysis: int = bitsZulu >> 2 << 1 | bitsAlpha >> 2
|
|
59
|
+
if arcCodeAnalysis < state.MAXIMUMarcCode:
|
|
60
|
+
state.dictionaryMeanders[arcCodeAnalysis] = state.dictionaryMeanders.get(arcCodeAnalysis, 0) + crossings
|
|
61
|
+
dictionaryBitGroups = {}
|
|
62
|
+
return state
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
from mapFolding.dataBaskets import
|
|
1
|
+
from mapFolding.dataBaskets import (
|
|
2
|
+
Array1DElephino, Array1DLeavesTotal, Array3DLeavesTotal, DatatypeElephino, DatatypeFoldsTotal, DatatypeLeavesTotal)
|
|
2
3
|
from numba import jit
|
|
3
4
|
|
|
4
5
|
@jit(cache=True, error_model='numpy', fastmath=True, forceinline=True)
|
|
@@ -43,4 +44,4 @@ def count(groupsOfFolds: DatatypeFoldsTotal, gap1ndex: DatatypeElephino, gap1nde
|
|
|
43
44
|
leaf1ndex += 1
|
|
44
45
|
else:
|
|
45
46
|
groupsOfFolds *= 2
|
|
46
|
-
return (groupsOfFolds, gap1ndex, gap1ndexCeiling, indexDimension, indexMiniGap, leaf1ndex, leafConnectee, dimensionsUnconstrained, countDimensionsGapped, gapRangeStart, gapsWhere, leafAbove, leafBelow, connectionGraph, dimensionsTotal, leavesTotal)
|
|
47
|
+
return (groupsOfFolds, gap1ndex, gap1ndexCeiling, indexDimension, indexMiniGap, leaf1ndex, leafConnectee, dimensionsUnconstrained, countDimensionsGapped, gapRangeStart, gapsWhere, leafAbove, leafBelow, connectionGraph, dimensionsTotal, leavesTotal)
|
mapFolding/tests/conftest.py
CHANGED
|
@@ -25,7 +25,7 @@ research domain.
|
|
|
25
25
|
|
|
26
26
|
from collections.abc import Callable, Generator, Sequence
|
|
27
27
|
from mapFolding import _theSSOT, getLeavesTotal, makeDataContainer, packageSettings, validateListDimensions
|
|
28
|
-
from mapFolding.oeis import
|
|
28
|
+
from mapFolding.oeis import dictionaryOEIS, dictionaryOEISMapFolding, oeisIDsImplemented
|
|
29
29
|
from pathlib import Path
|
|
30
30
|
from typing import Any
|
|
31
31
|
import numpy
|
|
@@ -223,7 +223,7 @@ def oneTestCuzTestsOverwritingTests(oeisID_1random: str) -> tuple[int, ...]:
|
|
|
223
223
|
pass
|
|
224
224
|
|
|
225
225
|
@pytest.fixture
|
|
226
|
-
def mapShapeTestCountFolds(
|
|
226
|
+
def mapShapeTestCountFolds(oeisIDmapFolding: str) -> tuple[int, ...]:
|
|
227
227
|
"""For each `oeisID` from the `pytest.fixture`, returns `listDimensions` from `valuesTestValidation` if
|
|
228
228
|
`validateListDimensions` approves. Each `listDimensions` is suitable for testing counts.
|
|
229
229
|
|
|
@@ -239,10 +239,10 @@ def mapShapeTestCountFolds(oeisID: str) -> tuple[int, ...]:
|
|
|
239
239
|
|
|
240
240
|
"""
|
|
241
241
|
while True:
|
|
242
|
-
n = random.choice(dictionaryOEISMapFolding[
|
|
242
|
+
n = random.choice(dictionaryOEISMapFolding[oeisIDmapFolding]['valuesTestValidation'])
|
|
243
243
|
if n < 2:
|
|
244
244
|
continue
|
|
245
|
-
listDimensionsCandidate = list(dictionaryOEISMapFolding[
|
|
245
|
+
listDimensionsCandidate = list(dictionaryOEISMapFolding[oeisIDmapFolding]['getMapShape'](n))
|
|
246
246
|
|
|
247
247
|
try:
|
|
248
248
|
return validateListDimensions(listDimensionsCandidate)
|
|
@@ -278,7 +278,7 @@ def mapShapeTestFunctionality(oeisID_1random: str) -> tuple[int, ...]:
|
|
|
278
278
|
pass
|
|
279
279
|
|
|
280
280
|
@pytest.fixture
|
|
281
|
-
def mapShapeTestParallelization(
|
|
281
|
+
def mapShapeTestParallelization(oeisIDmapFolding: str) -> tuple[int, ...]:
|
|
282
282
|
"""For each `oeisID` from the `pytest.fixture`, returns `listDimensions` from `valuesTestParallelization`.
|
|
283
283
|
|
|
284
284
|
Parameters
|
|
@@ -292,8 +292,8 @@ def mapShapeTestParallelization(oeisID: str) -> tuple[int, ...]:
|
|
|
292
292
|
Map dimensions suitable for testing parallelization features.
|
|
293
293
|
|
|
294
294
|
"""
|
|
295
|
-
n = random.choice(dictionaryOEISMapFolding[
|
|
296
|
-
return dictionaryOEISMapFolding[
|
|
295
|
+
n = random.choice(dictionaryOEISMapFolding[oeisIDmapFolding]['valuesTestParallelization'])
|
|
296
|
+
return dictionaryOEISMapFolding[oeisIDmapFolding]['getMapShape'](n)
|
|
297
297
|
|
|
298
298
|
@pytest.fixture
|
|
299
299
|
def mockBenchmarkTimer() -> Generator[unittest.mock.MagicMock | unittest.mock.AsyncMock, Any, None]:
|
|
@@ -332,7 +332,7 @@ def mockFoldingFunction() -> Callable[..., Callable[..., None]]:
|
|
|
332
332
|
return make_mock
|
|
333
333
|
|
|
334
334
|
@pytest.fixture(params=oeisIDsImplemented)
|
|
335
|
-
def
|
|
335
|
+
def oeisIDmapFolding(request: pytest.FixtureRequest) -> Any:
|
|
336
336
|
"""Parametrized fixture providing all implemented OEIS sequence identifiers.
|
|
337
337
|
|
|
338
338
|
(AI generated docstring)
|
|
@@ -350,11 +350,26 @@ def oeisID(request: pytest.FixtureRequest) -> Any:
|
|
|
350
350
|
"""
|
|
351
351
|
return request.param
|
|
352
352
|
|
|
353
|
-
@pytest.fixture(params=
|
|
354
|
-
def
|
|
355
|
-
"""Parametrized fixture providing all
|
|
353
|
+
@pytest.fixture(params=('A000682', 'A005316'))
|
|
354
|
+
def oeisIDmeanders(request: pytest.FixtureRequest) -> Any:
|
|
355
|
+
"""Parametrized fixture providing all Meanders OEIS sequence identifiers.
|
|
356
356
|
|
|
357
|
-
|
|
357
|
+
Parameters
|
|
358
|
+
----------
|
|
359
|
+
request : pytest.FixtureRequest
|
|
360
|
+
The pytest request object containing the current parameter value.
|
|
361
|
+
|
|
362
|
+
Returns
|
|
363
|
+
-------
|
|
364
|
+
sequenceIdentifier : Any
|
|
365
|
+
OEIS sequence identifier for testing across all Meanders sequences.
|
|
366
|
+
|
|
367
|
+
"""
|
|
368
|
+
return request.param
|
|
369
|
+
|
|
370
|
+
@pytest.fixture(params=tuple(dictionaryOEIS.keys()))
|
|
371
|
+
def oeisIDother(request: pytest.FixtureRequest) -> Any:
|
|
372
|
+
"""Parametrized fixture providing all other OEIS sequence identifiers.
|
|
358
373
|
|
|
359
374
|
Parameters
|
|
360
375
|
----------
|
|
@@ -364,7 +379,7 @@ def oeisIDMeanders(request: pytest.FixtureRequest) -> Any:
|
|
|
364
379
|
Returns
|
|
365
380
|
-------
|
|
366
381
|
sequenceIdentifier : Any
|
|
367
|
-
OEIS sequence identifier for testing across all
|
|
382
|
+
OEIS sequence identifier for testing across all other sequences.
|
|
368
383
|
|
|
369
384
|
"""
|
|
370
385
|
return request.param
|