mapFolding 0.4.3__py3-none-any.whl → 0.5.0__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.
- mapFolding/__init__.py +1 -1
- mapFolding/basecamp.py +11 -13
- mapFolding/beDRY.py +21 -20
- mapFolding/oeis.py +21 -20
- mapFolding/someAssemblyRequired/makeJob.py +8 -7
- mapFolding/someAssemblyRequired/synthesizeModuleJAX.py +1 -3
- mapFolding/someAssemblyRequired/synthesizeNumba.py +19 -14
- mapFolding/someAssemblyRequired/synthesizeNumbaGeneralized.py +22 -21
- mapFolding/someAssemblyRequired/synthesizeNumbaJob.py +6 -13
- mapFolding/someAssemblyRequired/synthesizeNumbaModules.py +9 -15
- mapFolding/syntheticModules/numbaCount.py +6 -6
- mapFolding/syntheticModules/numba_doTheNeedful.py +4 -4
- mapFolding/theDao.py +48 -48
- mapFolding/theSSOT.py +35 -21
- mapFolding/theSSOTdatatypes.py +13 -15
- {mapFolding-0.4.3.dist-info → mapFolding-0.5.0.dist-info}/METADATA +2 -1
- mapFolding-0.5.0.dist-info/RECORD +39 -0
- tests/conftest.py +56 -27
- tests/test_computations.py +5 -6
- tests/test_oeis.py +1 -2
- tests/test_other.py +11 -7
- tests/test_tasks.py +5 -5
- mapFolding-0.4.3.dist-info/RECORD +0 -40
- tests/test_types.py +0 -5
- {mapFolding-0.4.3.dist-info → mapFolding-0.5.0.dist-info}/LICENSE +0 -0
- {mapFolding-0.4.3.dist-info → mapFolding-0.5.0.dist-info}/WHEEL +0 -0
- {mapFolding-0.4.3.dist-info → mapFolding-0.5.0.dist-info}/entry_points.txt +0 -0
- {mapFolding-0.4.3.dist-info → mapFolding-0.5.0.dist-info}/top_level.txt +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""Synthesize one file to compute `foldsTotal` of `mapShape`."""
|
|
2
2
|
from mapFolding.someAssemblyRequired.synthesizeNumba import *
|
|
3
3
|
|
|
4
|
-
def doUnrollCountGaps(FunctionDefTarget: ast.FunctionDef, stateJob: computationState, allImports: UniversalImportTracker) ->
|
|
4
|
+
def doUnrollCountGaps(FunctionDefTarget: ast.FunctionDef, stateJob: computationState, allImports: UniversalImportTracker) -> tuple[ast.FunctionDef, UniversalImportTracker]:
|
|
5
5
|
"""The initial results were very bad."""
|
|
6
6
|
FunctionDefTarget = findAndReplaceWhileLoopIn_body(FunctionDefTarget, 'indexDimension', stateJob['my'][indexMy.dimensionsTotal])
|
|
7
7
|
FunctionDefTarget = removeAssignTargetFrom_body(FunctionDefTarget, 'indexDimension')
|
|
@@ -27,14 +27,7 @@ def doUnrollCountGaps(FunctionDefTarget: ast.FunctionDef, stateJob: computationS
|
|
|
27
27
|
FunctionDefTarget = transformer.visit(FunctionDefTarget)
|
|
28
28
|
return FunctionDefTarget, allImports
|
|
29
29
|
|
|
30
|
-
def writeJobNumba(mapShape: Sequence[int]
|
|
31
|
-
, algorithmSource: ModuleType
|
|
32
|
-
, callableTarget: Optional[str] = None
|
|
33
|
-
, parametersNumba: Optional[ParametersNumba] = None
|
|
34
|
-
, pathFilenameWriteJob: Optional[Union[str, os.PathLike[str]]] = None
|
|
35
|
-
, unrollCountGaps: Optional[bool] = False
|
|
36
|
-
, **keywordArguments: Optional[Any]
|
|
37
|
-
) -> pathlib.Path:
|
|
30
|
+
def writeJobNumba(mapShape: Sequence[int], algorithmSource: ModuleType, callableTarget: str | None = None, parametersNumba: ParametersNumba | None = None, pathFilenameWriteJob: str | PathLike[str] | None = None, unrollCountGaps: bool | None = False, **keywordArguments: Any | None) -> Path:
|
|
38
31
|
""" Parameters: **keywordArguments: most especially for `computationDivisions` if you want to make a parallel job. Also `CPUlimit`. """
|
|
39
32
|
|
|
40
33
|
""" Notes:
|
|
@@ -122,7 +115,7 @@ def writeJobNumba(mapShape: Sequence[int]
|
|
|
122
115
|
|
|
123
116
|
# NOTE add imports, make str, remove unused imports
|
|
124
117
|
astImports = allImports.makeListAst()
|
|
125
|
-
astModule = ast.Module(body=cast(
|
|
118
|
+
astModule = ast.Module(body=cast(list[ast.stmt], astImports + [FunctionDefTarget] + [astLauncher]), type_ignores=[])
|
|
126
119
|
ast.fix_missing_locations(astModule)
|
|
127
120
|
pythonSource = ast.unparse(astModule)
|
|
128
121
|
pythonSource = autoflake.fix_code(pythonSource, ['mapFolding', 'numba', 'numpy'])
|
|
@@ -132,9 +125,9 @@ def writeJobNumba(mapShape: Sequence[int]
|
|
|
132
125
|
if pathFilenameWriteJob is None:
|
|
133
126
|
filename = getFilenameFoldsTotal(stateJob['mapShape'])
|
|
134
127
|
pathRoot = getPathJobRootDEFAULT()
|
|
135
|
-
pathFilenameWriteJob =
|
|
128
|
+
pathFilenameWriteJob = Path(pathRoot, Path(filename).stem, Path(filename).with_suffix('.py'))
|
|
136
129
|
else:
|
|
137
|
-
pathFilenameWriteJob =
|
|
130
|
+
pathFilenameWriteJob = Path(pathFilenameWriteJob)
|
|
138
131
|
pathFilenameWriteJob.parent.mkdir(parents=True, exist_ok=True)
|
|
139
132
|
|
|
140
133
|
pathFilenameWriteJob.write_text(pythonSource)
|
|
@@ -142,7 +135,7 @@ def writeJobNumba(mapShape: Sequence[int]
|
|
|
142
135
|
return pathFilenameWriteJob
|
|
143
136
|
|
|
144
137
|
if __name__ == '__main__':
|
|
145
|
-
mapShape = [5,5]
|
|
138
|
+
mapShape: list[int] = [5,5]
|
|
146
139
|
from mapFolding.syntheticModules import numbaCount
|
|
147
140
|
algorithmSource: ModuleType = numbaCount
|
|
148
141
|
|
|
@@ -4,21 +4,21 @@ everything I am doing. I would rather benefit from humanity's
|
|
|
4
4
|
collective wisdom."""
|
|
5
5
|
from mapFolding.someAssemblyRequired.synthesizeNumba import *
|
|
6
6
|
|
|
7
|
-
def getFunctionDef(algorithmSource: ModuleType, *arguments, **keywordArguments) ->
|
|
7
|
+
def getFunctionDef(algorithmSource: ModuleType, *arguments, **keywordArguments) -> tuple[ast.FunctionDef, UniversalImportTracker]:
|
|
8
8
|
pythonSource = inspect.getsource(algorithmSource)
|
|
9
9
|
astModule: ast.Module = ast.parse(pythonSource, type_comments=True)
|
|
10
10
|
FunctionDefTarget, allImports = makeFunctionDef(astModule, *arguments, **keywordArguments)
|
|
11
11
|
return FunctionDefTarget, allImports
|
|
12
12
|
|
|
13
|
-
def makePythonSource(listFunctionDefs:
|
|
14
|
-
astModule = ast.Module(body=cast(
|
|
13
|
+
def makePythonSource(listFunctionDefs: list[ast.FunctionDef], listAstImports: list[ast.Import | ast.ImportFrom], additional_imports: list[str]) -> str:
|
|
14
|
+
astModule = ast.Module(body=cast(list[ast.stmt], listAstImports + listFunctionDefs), type_ignores=[])
|
|
15
15
|
ast.fix_missing_locations(astModule)
|
|
16
16
|
pythonSource = ast.unparse(astModule)
|
|
17
17
|
if not pythonSource: raise FREAKOUT
|
|
18
18
|
pythonSource = autoflake.fix_code(pythonSource, additional_imports)
|
|
19
19
|
return pythonSource
|
|
20
20
|
|
|
21
|
-
def writePythonAsModule(pythonSource: str, listCallableSynthesized:
|
|
21
|
+
def writePythonAsModule(pythonSource: str, listCallableSynthesized: list[str], relativePathWrite: Path | None, filenameWrite: str | None, formatFilenameWrite: str | None) -> list[youOughtaKnow]:
|
|
22
22
|
pathFilename = None
|
|
23
23
|
if not relativePathWrite:
|
|
24
24
|
pathWrite = getPathSyntheticModules()
|
|
@@ -46,7 +46,7 @@ def writePythonAsModule(pythonSource: str, listCallableSynthesized: List[str], r
|
|
|
46
46
|
dumbassPythonNamespace = pathFilename.relative_to(howIsThisStillAThing).with_suffix('').parts
|
|
47
47
|
ImaModule = '.'.join(dumbassPythonNamespace)
|
|
48
48
|
|
|
49
|
-
listStuffYouOughtaKnow:
|
|
49
|
+
listStuffYouOughtaKnow: list[youOughtaKnow] = []
|
|
50
50
|
|
|
51
51
|
for callableTarget in listCallableSynthesized:
|
|
52
52
|
astImportFrom = ast.ImportFrom(module=ImaModule, names=[ast.alias(name=callableTarget, asname=None)], level=0)
|
|
@@ -55,13 +55,7 @@ def writePythonAsModule(pythonSource: str, listCallableSynthesized: List[str], r
|
|
|
55
55
|
|
|
56
56
|
return listStuffYouOughtaKnow
|
|
57
57
|
|
|
58
|
-
def makeFlowNumbaOptimized(listCallablesInline:
|
|
59
|
-
, callableDispatcher: Optional[bool] = False
|
|
60
|
-
, algorithmSource: Optional[ModuleType] = None
|
|
61
|
-
, relativePathWrite: Optional[pathlib.Path] = None
|
|
62
|
-
, filenameModuleWrite: Optional[str] = None
|
|
63
|
-
, formatFilenameWrite: Optional[str] = None
|
|
64
|
-
) -> List[youOughtaKnow]:
|
|
58
|
+
def makeFlowNumbaOptimized(listCallablesInline: list[str], callableDispatcher: bool | None = False, algorithmSource: ModuleType | None = None, relativePathWrite: Path | None = None, filenameModuleWrite: str | None = None, formatFilenameWrite: str | None = None) -> list[youOughtaKnow]:
|
|
65
59
|
if relativePathWrite and relativePathWrite.is_absolute():
|
|
66
60
|
raise ValueError("The path to write the module must be relative to the root of the package.")
|
|
67
61
|
if not algorithmSource:
|
|
@@ -69,10 +63,10 @@ def makeFlowNumbaOptimized(listCallablesInline: List[str]
|
|
|
69
63
|
|
|
70
64
|
Z0Z_filenameModuleWrite = 'numbaCount.py'
|
|
71
65
|
|
|
72
|
-
listStuffYouOughtaKnow:
|
|
66
|
+
listStuffYouOughtaKnow: list[youOughtaKnow] = []
|
|
73
67
|
additional_imports = ['mapFolding', 'numba', 'numpy']
|
|
74
68
|
|
|
75
|
-
listFunctionDefs:
|
|
69
|
+
listFunctionDefs: list[ast.FunctionDef] = []
|
|
76
70
|
allImportsModule = UniversalImportTracker()
|
|
77
71
|
for callableTarget in listCallablesInline:
|
|
78
72
|
parametersNumba = None
|
|
@@ -124,6 +118,6 @@ def makeFlowNumbaOptimized(listCallablesInline: List[str]
|
|
|
124
118
|
if __name__ == '__main__':
|
|
125
119
|
# Z0Z_setDatatypeModuleScalar('numba')
|
|
126
120
|
# Z0Z_setDecoratorCallable('jit')
|
|
127
|
-
listCallablesInline:
|
|
121
|
+
listCallablesInline: list[str] = ['countInitialize', 'countParallel', 'countSequential']
|
|
128
122
|
callableDispatcher = True
|
|
129
123
|
makeFlowNumbaOptimized(listCallablesInline, callableDispatcher)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
from mapFolding import
|
|
2
|
-
from numba import
|
|
1
|
+
from mapFolding import indexTrack, indexMy
|
|
2
|
+
from numba import int64, prange, uint16, jit
|
|
3
3
|
from numpy import ndarray, dtype, integer
|
|
4
|
-
from typing import
|
|
4
|
+
from typing import Any
|
|
5
5
|
|
|
6
6
|
@jit((uint16[:, :, ::1], uint16[::1], uint16[::1], uint16[:, ::1]), _nrt=True, boundscheck=False, cache=True, error_model='numpy', fastmath=True, forceinline=True, inline='always', looplift=False, no_cfunc_wrapper=False, no_cpython_wrapper=False, nopython=True, parallel=False)
|
|
7
|
-
def countInitialize(connectionGraph: ndarray[
|
|
7
|
+
def countInitialize(connectionGraph: ndarray[tuple[int, int, int], dtype[integer[Any]]], gapsWhere: ndarray[tuple[int], dtype[integer[Any]]], my: ndarray[tuple[int], dtype[integer[Any]]], track: ndarray[tuple[int, int], dtype[integer[Any]]]) -> None:
|
|
8
8
|
while my[indexMy.leaf1ndex.value] > 0:
|
|
9
9
|
if my[indexMy.leaf1ndex.value] <= 1 or track[indexTrack.leafBelow.value, 0] == 1:
|
|
10
10
|
my[indexMy.dimensionsUnconstrained.value] = my[indexMy.dimensionsTotal.value]
|
|
@@ -47,7 +47,7 @@ def countInitialize(connectionGraph: ndarray[Tuple[int, int, int], dtype[integer
|
|
|
47
47
|
return
|
|
48
48
|
|
|
49
49
|
@jit((uint16[:, :, ::1], int64[::1], uint16[::1], uint16[::1], uint16[:, ::1]), _nrt=True, boundscheck=False, cache=True, error_model='numpy', fastmath=True, forceinline=True, inline='always', looplift=False, no_cfunc_wrapper=True, no_cpython_wrapper=True, nopython=True, parallel=True)
|
|
50
|
-
def countParallel(connectionGraph: ndarray[
|
|
50
|
+
def countParallel(connectionGraph: ndarray[tuple[int, int, int], dtype[integer[Any]]], foldGroups: ndarray[tuple[int], dtype[integer[Any]]], gapsWhere: ndarray[tuple[int], dtype[integer[Any]]], my: ndarray[tuple[int], dtype[integer[Any]]], track: ndarray[tuple[int, int], dtype[integer[Any]]]) -> None:
|
|
51
51
|
gapsWherePARALLEL = gapsWhere.copy()
|
|
52
52
|
myPARALLEL = my.copy()
|
|
53
53
|
trackPARALLEL = track.copy()
|
|
@@ -101,7 +101,7 @@ def countParallel(connectionGraph: ndarray[Tuple[int, int, int], dtype[integer[A
|
|
|
101
101
|
foldGroups[my[indexMy.taskIndex.value]] = groupsOfFolds
|
|
102
102
|
|
|
103
103
|
@jit((uint16[:, :, ::1], int64[::1], uint16[::1], uint16[::1], uint16[:, ::1]), _nrt=True, boundscheck=False, cache=True, error_model='numpy', fastmath=True, forceinline=True, inline='always', looplift=False, no_cfunc_wrapper=True, no_cpython_wrapper=True, nopython=True, parallel=False)
|
|
104
|
-
def countSequential(connectionGraph: ndarray[
|
|
104
|
+
def countSequential(connectionGraph: ndarray[tuple[int, int, int], dtype[integer[Any]]], foldGroups: ndarray[tuple[int], dtype[integer[Any]]], gapsWhere: ndarray[tuple[int], dtype[integer[Any]]], my: ndarray[tuple[int], dtype[integer[Any]]], track: ndarray[tuple[int, int], dtype[integer[Any]]]) -> None:
|
|
105
105
|
leafBelow = track[indexTrack.leafBelow.value]
|
|
106
106
|
gapRangeStart = track[indexTrack.gapRangeStart.value]
|
|
107
107
|
countDimensionsGapped = track[indexTrack.countDimensionsGapped.value]
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
from mapFolding import indexMy
|
|
2
|
-
from mapFolding.syntheticModules.numbaCount import countParallel, countSequential
|
|
3
|
-
from numba import jit, int64
|
|
2
|
+
from mapFolding.syntheticModules.numbaCount import countInitialize, countParallel, countSequential
|
|
3
|
+
from numba import uint16, jit, int64
|
|
4
4
|
from numpy import ndarray, dtype, integer
|
|
5
|
-
from typing import
|
|
5
|
+
from typing import Any
|
|
6
6
|
|
|
7
7
|
@jit((uint16[:, :, ::1], int64[::1], uint16[::1], uint16[::1], uint16[::1], uint16[:, ::1]), _nrt=True, boundscheck=False, cache=True, error_model='numpy', fastmath=True, forceinline=True, inline='always', looplift=False, no_cfunc_wrapper=False, no_cpython_wrapper=False, nopython=True, parallel=False)
|
|
8
|
-
def doTheNeedful(connectionGraph: ndarray[
|
|
8
|
+
def doTheNeedful(connectionGraph: ndarray[tuple[int, int, int], dtype[integer[Any]]], foldGroups: ndarray[tuple[int], dtype[integer[Any]]], gapsWhere: ndarray[tuple[int], dtype[integer[Any]]], mapShape: ndarray[tuple[int], dtype[integer[Any]]], my: ndarray[tuple[int], dtype[integer[Any]]], track: ndarray[tuple[int, int], dtype[integer[Any]]]) -> None:
|
|
9
9
|
countInitialize(connectionGraph, gapsWhere, my, track)
|
|
10
10
|
if my[indexMy.taskDivisions.value] > 0:
|
|
11
11
|
countParallel(connectionGraph, foldGroups, gapsWhere, my, track)
|
mapFolding/theDao.py
CHANGED
|
@@ -1,93 +1,93 @@
|
|
|
1
1
|
from mapFolding import indexMy, indexTrack
|
|
2
2
|
from numba import prange
|
|
3
3
|
from numpy import dtype, integer, ndarray
|
|
4
|
-
from typing import Any
|
|
4
|
+
from typing import Any
|
|
5
5
|
|
|
6
6
|
# `.value` is not necessary for this module or most modules. But, this module is transformed into Numba "jitted" functions, and Numba won't use `Enum` for an ndarray index without `.value`.
|
|
7
|
-
def activeLeafConnectedToItself(my: ndarray[
|
|
7
|
+
def activeLeafConnectedToItself(my: ndarray[tuple[int], dtype[integer[Any]]]) -> Any:
|
|
8
8
|
return my[indexMy.leafConnectee.value] == my[indexMy.leaf1ndex.value]
|
|
9
9
|
|
|
10
|
-
def activeLeafGreaterThan0(my: ndarray[
|
|
10
|
+
def activeLeafGreaterThan0(my: ndarray[tuple[int], dtype[integer[Any]]]) -> Any:
|
|
11
11
|
return my[indexMy.leaf1ndex.value] > 0
|
|
12
12
|
|
|
13
|
-
def activeLeafGreaterThanLeavesTotal(foldGroups: ndarray[
|
|
13
|
+
def activeLeafGreaterThanLeavesTotal(foldGroups: ndarray[tuple[int], dtype[integer[Any]]], my: ndarray[tuple[int], dtype[integer[Any]]]) -> Any:
|
|
14
14
|
return my[indexMy.leaf1ndex.value] > foldGroups[-1]
|
|
15
15
|
|
|
16
|
-
def activeLeafIsTheFirstLeaf(my: ndarray[
|
|
16
|
+
def activeLeafIsTheFirstLeaf(my: ndarray[tuple[int], dtype[integer[Any]]]) -> Any:
|
|
17
17
|
return my[indexMy.leaf1ndex.value] <= 1
|
|
18
18
|
|
|
19
|
-
def allDimensionsAreUnconstrained(my: ndarray[
|
|
19
|
+
def allDimensionsAreUnconstrained(my: ndarray[tuple[int], dtype[integer[Any]]]) -> Any:
|
|
20
20
|
return not my[indexMy.dimensionsUnconstrained.value]
|
|
21
21
|
|
|
22
|
-
def backtrack(my: ndarray[
|
|
22
|
+
def backtrack(my: ndarray[tuple[int], dtype[integer[Any]]], track: ndarray[tuple[int, int], dtype[integer[Any]]]) -> None:
|
|
23
23
|
my[indexMy.leaf1ndex.value] -= 1
|
|
24
24
|
track[indexTrack.leafBelow.value, track[indexTrack.leafAbove.value, my[indexMy.leaf1ndex.value]]] = track[indexTrack.leafBelow.value, my[indexMy.leaf1ndex.value]]
|
|
25
25
|
track[indexTrack.leafAbove.value, track[indexTrack.leafBelow.value, my[indexMy.leaf1ndex.value]]] = track[indexTrack.leafAbove.value, my[indexMy.leaf1ndex.value]]
|
|
26
26
|
|
|
27
|
-
def countGaps(gapsWhere: ndarray[
|
|
27
|
+
def countGaps(gapsWhere: ndarray[tuple[int], dtype[integer[Any]]], my: ndarray[tuple[int], dtype[integer[Any]]], track: ndarray[tuple[int, int], dtype[integer[Any]]]) -> None:
|
|
28
28
|
gapsWhere[my[indexMy.gap1ndexCeiling.value]] = my[indexMy.leafConnectee.value]
|
|
29
29
|
if track[indexTrack.countDimensionsGapped.value, my[indexMy.leafConnectee.value]] == 0:
|
|
30
30
|
incrementGap1ndexCeiling(my=my)
|
|
31
31
|
track[indexTrack.countDimensionsGapped.value, my[indexMy.leafConnectee.value]] += 1
|
|
32
32
|
|
|
33
|
-
def decrementDimensionsUnconstrained(my: ndarray[
|
|
33
|
+
def decrementDimensionsUnconstrained(my: ndarray[tuple[int], dtype[integer[Any]]]) -> None:
|
|
34
34
|
my[indexMy.dimensionsUnconstrained.value] -= 1
|
|
35
35
|
|
|
36
|
-
def dimensionsUnconstrainedCondition(connectionGraph: ndarray[
|
|
36
|
+
def dimensionsUnconstrainedCondition(connectionGraph: ndarray[tuple[int, int, int], dtype[integer[Any]]], my: ndarray[tuple[int], dtype[integer[Any]]]) -> Any:
|
|
37
37
|
return connectionGraph[my[indexMy.indexDimension.value], my[indexMy.leaf1ndex.value], my[indexMy.leaf1ndex.value]] == my[indexMy.leaf1ndex.value]
|
|
38
38
|
|
|
39
|
-
def filterCommonGaps(gapsWhere: ndarray[
|
|
39
|
+
def filterCommonGaps(gapsWhere: ndarray[tuple[int], dtype[integer[Any]]], my: ndarray[tuple[int], dtype[integer[Any]]], track: ndarray[tuple[int, int], dtype[integer[Any]]]) -> None:
|
|
40
40
|
gapsWhere[my[indexMy.gap1ndex.value]] = gapsWhere[my[indexMy.indexMiniGap.value]]
|
|
41
41
|
if track[indexTrack.countDimensionsGapped.value, gapsWhere[my[indexMy.indexMiniGap.value]]] == my[indexMy.dimensionsUnconstrained.value]:
|
|
42
42
|
incrementActiveGap(my=my)
|
|
43
43
|
track[indexTrack.countDimensionsGapped.value, gapsWhere[my[indexMy.indexMiniGap.value]]] = 0
|
|
44
44
|
|
|
45
|
-
def incrementActiveGap(my: ndarray[
|
|
45
|
+
def incrementActiveGap(my: ndarray[tuple[int], dtype[integer[Any]]]) -> None:
|
|
46
46
|
my[indexMy.gap1ndex.value] += 1
|
|
47
47
|
|
|
48
|
-
def incrementGap1ndexCeiling(my: ndarray[
|
|
48
|
+
def incrementGap1ndexCeiling(my: ndarray[tuple[int], dtype[integer[Any]]]) -> None:
|
|
49
49
|
my[indexMy.gap1ndexCeiling.value] += 1
|
|
50
50
|
|
|
51
|
-
def incrementIndexDimension(my: ndarray[
|
|
51
|
+
def incrementIndexDimension(my: ndarray[tuple[int], dtype[integer[Any]]]) -> None:
|
|
52
52
|
my[indexMy.indexDimension.value] += 1
|
|
53
53
|
|
|
54
|
-
def incrementIndexMiniGap(my: ndarray[
|
|
54
|
+
def incrementIndexMiniGap(my: ndarray[tuple[int], dtype[integer[Any]]]) -> None:
|
|
55
55
|
my[indexMy.indexMiniGap.value] += 1
|
|
56
56
|
|
|
57
|
-
def initializeIndexMiniGap(my: ndarray[
|
|
57
|
+
def initializeIndexMiniGap(my: ndarray[tuple[int], dtype[integer[Any]]]) -> None:
|
|
58
58
|
my[indexMy.indexMiniGap.value] = my[indexMy.gap1ndex.value]
|
|
59
59
|
|
|
60
|
-
def initializeLeafConnectee(connectionGraph: ndarray[
|
|
60
|
+
def initializeLeafConnectee(connectionGraph: ndarray[tuple[int, int, int], dtype[integer[Any]]], my: ndarray[tuple[int], dtype[integer[Any]]]) -> None:
|
|
61
61
|
my[indexMy.leafConnectee.value] = connectionGraph[my[indexMy.indexDimension.value], my[indexMy.leaf1ndex.value], my[indexMy.leaf1ndex.value]]
|
|
62
62
|
|
|
63
|
-
def initializeVariablesToFindGaps(my: ndarray[
|
|
63
|
+
def initializeVariablesToFindGaps(my: ndarray[tuple[int], dtype[integer[Any]]], track: ndarray[tuple[int, int], dtype[integer[Any]]]) -> None:
|
|
64
64
|
my[indexMy.dimensionsUnconstrained.value] = my[indexMy.dimensionsTotal.value]
|
|
65
65
|
my[indexMy.gap1ndexCeiling.value] = track[indexTrack.gapRangeStart.value, my[indexMy.leaf1ndex.value] - 1]
|
|
66
66
|
my[indexMy.indexDimension.value] = 0
|
|
67
67
|
|
|
68
|
-
def insertUnconstrainedLeaf(gapsWhere: ndarray[
|
|
68
|
+
def insertUnconstrainedLeaf(gapsWhere: ndarray[tuple[int], dtype[integer[Any]]], my: ndarray[tuple[int], dtype[integer[Any]]]) -> None:
|
|
69
69
|
my[indexMy.indexLeaf.value] = 0
|
|
70
70
|
while my[indexMy.indexLeaf.value] < my[indexMy.leaf1ndex.value]:
|
|
71
71
|
gapsWhere[my[indexMy.gap1ndexCeiling.value]] = my[indexMy.indexLeaf.value]
|
|
72
72
|
my[indexMy.gap1ndexCeiling.value] += 1
|
|
73
73
|
my[indexMy.indexLeaf.value] += 1
|
|
74
74
|
|
|
75
|
-
def leafBelowSentinelIs1(track: ndarray[
|
|
75
|
+
def leafBelowSentinelIs1(track: ndarray[tuple[int, int], dtype[integer[Any]]]) -> Any:
|
|
76
76
|
return track[indexTrack.leafBelow.value, 0] == 1
|
|
77
77
|
|
|
78
|
-
def loopingLeavesConnectedToActiveLeaf(my: ndarray[
|
|
78
|
+
def loopingLeavesConnectedToActiveLeaf(my: ndarray[tuple[int], dtype[integer[Any]]]) -> Any:
|
|
79
79
|
return my[indexMy.leafConnectee.value] != my[indexMy.leaf1ndex.value]
|
|
80
80
|
|
|
81
|
-
def loopingToActiveGapCeiling(my: ndarray[
|
|
81
|
+
def loopingToActiveGapCeiling(my: ndarray[tuple[int], dtype[integer[Any]]]) -> Any:
|
|
82
82
|
return my[indexMy.indexMiniGap.value] < my[indexMy.gap1ndexCeiling.value]
|
|
83
83
|
|
|
84
|
-
def loopUpToDimensionsTotal(my: ndarray[
|
|
84
|
+
def loopUpToDimensionsTotal(my: ndarray[tuple[int], dtype[integer[Any]]]) -> Any:
|
|
85
85
|
return my[indexMy.indexDimension.value] < my[indexMy.dimensionsTotal.value]
|
|
86
86
|
|
|
87
|
-
def noGapsHere(my: ndarray[
|
|
87
|
+
def noGapsHere(my: ndarray[tuple[int], dtype[integer[Any]]], track: ndarray[tuple[int, int], dtype[integer[Any]]]) -> Any:
|
|
88
88
|
return my[indexMy.leaf1ndex.value] > 0 and my[indexMy.gap1ndex.value] == track[indexTrack.gapRangeStart.value, my[indexMy.leaf1ndex.value] - 1]
|
|
89
89
|
|
|
90
|
-
def placeLeaf(gapsWhere: ndarray[
|
|
90
|
+
def placeLeaf(gapsWhere: ndarray[tuple[int], dtype[integer[Any]]], my: ndarray[tuple[int], dtype[integer[Any]]], track: ndarray[tuple[int, int], dtype[integer[Any]]]) -> None:
|
|
91
91
|
my[indexMy.gap1ndex.value] -= 1
|
|
92
92
|
track[indexTrack.leafAbove.value, my[indexMy.leaf1ndex.value]] = gapsWhere[my[indexMy.gap1ndex.value]]
|
|
93
93
|
track[indexTrack.leafBelow.value, my[indexMy.leaf1ndex.value]] = track[indexTrack.leafBelow.value, track[indexTrack.leafAbove.value, my[indexMy.leaf1ndex.value]]]
|
|
@@ -96,19 +96,19 @@ def placeLeaf(gapsWhere: ndarray[Tuple[int], dtype[integer[Any]]], my: ndarray[T
|
|
|
96
96
|
track[indexTrack.gapRangeStart.value, my[indexMy.leaf1ndex.value]] = my[indexMy.gap1ndex.value]
|
|
97
97
|
my[indexMy.leaf1ndex.value] += 1
|
|
98
98
|
|
|
99
|
-
def thereIsAnActiveLeaf(my: ndarray[
|
|
99
|
+
def thereIsAnActiveLeaf(my: ndarray[tuple[int], dtype[integer[Any]]]) -> Any:
|
|
100
100
|
return my[indexMy.leaf1ndex.value] > 0
|
|
101
101
|
|
|
102
|
-
def thisIsMyTaskIndex(my: ndarray[
|
|
102
|
+
def thisIsMyTaskIndex(my: ndarray[tuple[int], dtype[integer[Any]]]) -> Any:
|
|
103
103
|
return my[indexMy.leaf1ndex.value] != my[indexMy.taskDivisions.value] or my[indexMy.leafConnectee.value] % my[indexMy.taskDivisions.value] == my[indexMy.taskIndex.value]
|
|
104
104
|
|
|
105
|
-
def updateLeafConnectee(connectionGraph: ndarray[
|
|
105
|
+
def updateLeafConnectee(connectionGraph: ndarray[tuple[int, int, int], dtype[integer[Any]]], my: ndarray[tuple[int], dtype[integer[Any]]], track: ndarray[tuple[int, int], dtype[integer[Any]]]) -> None:
|
|
106
106
|
my[indexMy.leafConnectee.value] = connectionGraph[my[indexMy.indexDimension.value], my[indexMy.leaf1ndex.value], track[indexTrack.leafBelow.value, my[indexMy.leafConnectee.value]]]
|
|
107
107
|
|
|
108
|
-
def countInitialize(connectionGraph: ndarray[
|
|
109
|
-
, gapsWhere: ndarray[
|
|
110
|
-
, my: ndarray[
|
|
111
|
-
, track: ndarray[
|
|
108
|
+
def countInitialize(connectionGraph: ndarray[tuple[int, int, int], dtype[integer[Any]]]
|
|
109
|
+
, gapsWhere: ndarray[tuple[int] , dtype[integer[Any]]]
|
|
110
|
+
, my: ndarray[tuple[int] , dtype[integer[Any]]]
|
|
111
|
+
, track: ndarray[tuple[int, int] , dtype[integer[Any]]]
|
|
112
112
|
) -> None:
|
|
113
113
|
|
|
114
114
|
while activeLeafGreaterThan0(my=my):
|
|
@@ -134,11 +134,11 @@ def countInitialize(connectionGraph: ndarray[Tuple[int, int, int], dtype[integer
|
|
|
134
134
|
if my[indexMy.gap1ndex.value] > 0:
|
|
135
135
|
return
|
|
136
136
|
|
|
137
|
-
def countParallel(connectionGraph: ndarray[
|
|
138
|
-
, foldGroups: ndarray[
|
|
139
|
-
, gapsWhere: ndarray[
|
|
140
|
-
, my: ndarray[
|
|
141
|
-
, track: ndarray[
|
|
137
|
+
def countParallel(connectionGraph: ndarray[tuple[int, int, int], dtype[integer[Any]]]
|
|
138
|
+
, foldGroups: ndarray[tuple[int] , dtype[integer[Any]]]
|
|
139
|
+
, gapsWhere: ndarray[tuple[int] , dtype[integer[Any]]]
|
|
140
|
+
, my: ndarray[tuple[int] , dtype[integer[Any]]]
|
|
141
|
+
, track: ndarray[tuple[int, int] , dtype[integer[Any]]]
|
|
142
142
|
) -> None:
|
|
143
143
|
|
|
144
144
|
gapsWherePARALLEL = gapsWhere.copy()
|
|
@@ -182,11 +182,11 @@ def countParallel(connectionGraph: ndarray[Tuple[int, int, int], dtype[integer[A
|
|
|
182
182
|
placeLeaf(gapsWhere=gapsWhere, my=my, track=track)
|
|
183
183
|
foldGroups[my[indexMy.taskIndex.value]] = groupsOfFolds
|
|
184
184
|
|
|
185
|
-
def countSequential( connectionGraph: ndarray[
|
|
186
|
-
, foldGroups: ndarray[
|
|
187
|
-
, gapsWhere: ndarray[
|
|
188
|
-
, my: ndarray[
|
|
189
|
-
, track: ndarray[
|
|
185
|
+
def countSequential( connectionGraph: ndarray[tuple[int, int, int], dtype[integer[Any]]]
|
|
186
|
+
, foldGroups: ndarray[tuple[int] , dtype[integer[Any]]]
|
|
187
|
+
, gapsWhere: ndarray[tuple[int] , dtype[integer[Any]]]
|
|
188
|
+
, my: ndarray[tuple[int] , dtype[integer[Any]]]
|
|
189
|
+
, track: ndarray[tuple[int, int] , dtype[integer[Any]]]
|
|
190
190
|
) -> None:
|
|
191
191
|
|
|
192
192
|
groupsOfFolds: int = 0
|
|
@@ -216,12 +216,12 @@ def countSequential( connectionGraph: ndarray[Tuple[int, int, int], dtype[intege
|
|
|
216
216
|
placeLeaf(gapsWhere=gapsWhere, my=my, track=track)
|
|
217
217
|
foldGroups[my[indexMy.taskIndex.value]] = groupsOfFolds
|
|
218
218
|
|
|
219
|
-
def doTheNeedful(connectionGraph: ndarray[
|
|
220
|
-
, foldGroups: ndarray[
|
|
221
|
-
, gapsWhere: ndarray[
|
|
222
|
-
, mapShape: ndarray[
|
|
223
|
-
, my: ndarray[
|
|
224
|
-
, track: ndarray[
|
|
219
|
+
def doTheNeedful(connectionGraph: ndarray[tuple[int, int, int], dtype[integer[Any]]]
|
|
220
|
+
, foldGroups: ndarray[tuple[int] , dtype[integer[Any]]]
|
|
221
|
+
, gapsWhere: ndarray[tuple[int] , dtype[integer[Any]]]
|
|
222
|
+
, mapShape: ndarray[tuple[int] , dtype[integer[Any]]]
|
|
223
|
+
, my: ndarray[tuple[int] , dtype[integer[Any]]]
|
|
224
|
+
, track: ndarray[tuple[int, int] , dtype[integer[Any]]]
|
|
225
225
|
) -> None:
|
|
226
226
|
|
|
227
227
|
countInitialize(connectionGraph, gapsWhere, my, track)
|
mapFolding/theSSOT.py
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
|
-
from
|
|
1
|
+
from collections.abc import Callable
|
|
2
|
+
from mapFolding.theSSOTdatatypes import (
|
|
3
|
+
EnumIndices,
|
|
4
|
+
indexMy,
|
|
5
|
+
indexTrack,
|
|
6
|
+
reportDatatypeLimit,
|
|
7
|
+
setDatatypeModule,
|
|
8
|
+
setDatatypeElephino,
|
|
9
|
+
setDatatypeFoldsTotal,
|
|
10
|
+
setDatatypeLeavesTotal,
|
|
11
|
+
getDatatypeModule,
|
|
12
|
+
setInStone,
|
|
13
|
+
hackSSOTdtype,
|
|
14
|
+
hackSSOTdatatype,
|
|
15
|
+
)
|
|
2
16
|
from numba.core.compiler import CompilerBase as numbaCompilerBase
|
|
3
17
|
from numpy import dtype, integer, ndarray
|
|
18
|
+
from pathlib import Path
|
|
19
|
+
from sys import modules as sysModules
|
|
4
20
|
from types import ModuleType
|
|
5
|
-
from typing import Any,
|
|
6
|
-
import pathlib
|
|
7
|
-
import sys
|
|
21
|
+
from typing import Any, Final, TYPE_CHECKING, cast
|
|
8
22
|
|
|
9
23
|
try:
|
|
10
24
|
from typing import NotRequired
|
|
11
|
-
except
|
|
12
|
-
from typing_extensions import NotRequired
|
|
25
|
+
except Exception:
|
|
26
|
+
from typing_extensions import NotRequired # type: ignore
|
|
13
27
|
|
|
14
28
|
if TYPE_CHECKING:
|
|
15
29
|
from typing import TypedDict
|
|
@@ -33,21 +47,21 @@ moduleOfSyntheticModules = "syntheticModules"
|
|
|
33
47
|
formatFilenameModuleDEFAULT = "numba_{callableTarget}.py"
|
|
34
48
|
dispatcherCallableNameDEFAULT = "doTheNeedful"
|
|
35
49
|
|
|
36
|
-
def getPathPackage() ->
|
|
50
|
+
def getPathPackage() -> Path:
|
|
37
51
|
import importlib, inspect
|
|
38
|
-
pathPackage =
|
|
52
|
+
pathPackage = Path(inspect.getfile(importlib.import_module(myPackageNameIs)))
|
|
39
53
|
if pathPackage.is_file():
|
|
40
54
|
pathPackage = pathPackage.parent
|
|
41
55
|
return pathPackage
|
|
42
56
|
|
|
43
|
-
def getPathJobRootDEFAULT() ->
|
|
44
|
-
if 'google.colab' in
|
|
45
|
-
pathJobDEFAULT =
|
|
57
|
+
def getPathJobRootDEFAULT() -> Path:
|
|
58
|
+
if 'google.colab' in sysModules:
|
|
59
|
+
pathJobDEFAULT = Path("/content/drive/MyDrive") / "jobs"
|
|
46
60
|
else:
|
|
47
61
|
pathJobDEFAULT = getPathPackage() / "jobs"
|
|
48
62
|
return pathJobDEFAULT
|
|
49
63
|
|
|
50
|
-
def getPathSyntheticModules() ->
|
|
64
|
+
def getPathSyntheticModules() -> Path:
|
|
51
65
|
pathSyntheticModules = getPathPackage() / moduleOfSyntheticModules
|
|
52
66
|
return pathSyntheticModules
|
|
53
67
|
|
|
@@ -65,12 +79,12 @@ def getDispatcherCallable() -> Callable[..., None]:
|
|
|
65
79
|
|
|
66
80
|
# NOTE I want this _concept_, not necessarily this method, to be well implemented and usable everywhere: Python, Numba, Jax, CUDA, idc
|
|
67
81
|
class computationState(TypedDict):
|
|
68
|
-
connectionGraph: ndarray[
|
|
69
|
-
foldGroups: ndarray[
|
|
70
|
-
gapsWhere: ndarray[
|
|
71
|
-
mapShape: ndarray[
|
|
72
|
-
my: ndarray[
|
|
73
|
-
track: ndarray[
|
|
82
|
+
connectionGraph: ndarray[tuple[int, int, int], dtype[integer[Any]]]
|
|
83
|
+
foldGroups: ndarray[tuple[int] , dtype[integer[Any]]]
|
|
84
|
+
gapsWhere: ndarray[tuple[int] , dtype[integer[Any]]]
|
|
85
|
+
mapShape: ndarray[tuple[int] , dtype[integer[Any]]]
|
|
86
|
+
my: ndarray[tuple[int] , dtype[integer[Any]]]
|
|
87
|
+
track: ndarray[tuple[int, int] , dtype[integer[Any]]]
|
|
74
88
|
|
|
75
89
|
_datatypeModuleScalar = 'numba'
|
|
76
90
|
_decoratorCallable = 'jit'
|
|
@@ -110,7 +124,7 @@ class ParametersNumba(TypedDict):
|
|
|
110
124
|
forceinline: bool
|
|
111
125
|
forceobj: NotRequired[bool]
|
|
112
126
|
inline: str
|
|
113
|
-
locals: NotRequired[
|
|
127
|
+
locals: NotRequired[dict[str, Any]]
|
|
114
128
|
looplift: bool
|
|
115
129
|
no_cfunc_wrapper: bool
|
|
116
130
|
no_cpython_wrapper: bool
|
|
@@ -118,8 +132,8 @@ class ParametersNumba(TypedDict):
|
|
|
118
132
|
nogil: NotRequired[bool]
|
|
119
133
|
nopython: bool
|
|
120
134
|
parallel: bool
|
|
121
|
-
pipeline_class: NotRequired[
|
|
122
|
-
signature_or_function: NotRequired[
|
|
135
|
+
pipeline_class: NotRequired[type[numbaCompilerBase]]
|
|
136
|
+
signature_or_function: NotRequired[Any | Callable | str | tuple]
|
|
123
137
|
target: NotRequired[str]
|
|
124
138
|
|
|
125
139
|
parametersNumbaFailEarly: Final[ParametersNumba] = { '_nrt': True, 'boundscheck': True, 'cache': True, 'error_model': 'python', 'fastmath': False, 'forceinline': True, 'inline': 'always', 'looplift': False, 'no_cfunc_wrapper': False, 'no_cpython_wrapper': False, 'nopython': True, 'parallel': False, }
|
mapFolding/theSSOTdatatypes.py
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
from collections import defaultdict
|
|
2
|
-
from typing import Any, cast,
|
|
2
|
+
from typing import Any, cast, Final, TYPE_CHECKING
|
|
3
3
|
import enum
|
|
4
|
-
import sys
|
|
5
4
|
import numba
|
|
6
5
|
import numpy
|
|
7
6
|
|
|
8
7
|
try:
|
|
9
8
|
from typing import NotRequired
|
|
10
|
-
except
|
|
11
|
-
from typing_extensions import NotRequired
|
|
9
|
+
except Exception:
|
|
10
|
+
from typing_extensions import NotRequired # type: ignore
|
|
12
11
|
|
|
13
12
|
if TYPE_CHECKING:
|
|
14
13
|
from typing import TypedDict
|
|
15
14
|
else:
|
|
16
15
|
TypedDict = dict
|
|
17
16
|
|
|
18
|
-
@enum.verify(enum.CONTINUOUS, enum.UNIQUE) if sys.version_info >= (3, 11) else lambda x: x
|
|
19
17
|
class EnumIndices(enum.IntEnum):
|
|
20
18
|
@staticmethod
|
|
21
19
|
def _generate_next_value_(name: str, start: int, count: int, last_values: list[Any]) -> int:
|
|
@@ -48,7 +46,7 @@ class indexTrack(EnumIndices):
|
|
|
48
46
|
countDimensionsGapped = enum.auto()
|
|
49
47
|
gapRangeStart = enum.auto()
|
|
50
48
|
|
|
51
|
-
_datatypeDefault: Final[
|
|
49
|
+
_datatypeDefault: Final[dict[str, str]] = {
|
|
52
50
|
'elephino': 'uint16',
|
|
53
51
|
'foldsTotal': 'int64',
|
|
54
52
|
'leavesTotal': 'uint16',
|
|
@@ -56,9 +54,9 @@ _datatypeDefault: Final[Dict[str, str]] = {
|
|
|
56
54
|
_datatypeModule = ''
|
|
57
55
|
_datatypeModuleDEFAULT: Final[str] = 'numpy'
|
|
58
56
|
|
|
59
|
-
_datatype:
|
|
57
|
+
_datatype: dict[str, str] = defaultdict(str)
|
|
60
58
|
|
|
61
|
-
def reportDatatypeLimit(identifier: str, datatype: str, sourGrapes:
|
|
59
|
+
def reportDatatypeLimit(identifier: str, datatype: str, sourGrapes: bool | None = False) -> str:
|
|
62
60
|
global _datatype
|
|
63
61
|
if not _datatype[identifier]:
|
|
64
62
|
_datatype[identifier] = datatype
|
|
@@ -68,7 +66,7 @@ def reportDatatypeLimit(identifier: str, datatype: str, sourGrapes: Optional[boo
|
|
|
68
66
|
raise Exception(f"Datatype is '{_datatype[identifier]}' not '{datatype}', so you can take your ball and go home.")
|
|
69
67
|
return _datatype[identifier]
|
|
70
68
|
|
|
71
|
-
def setDatatypeModule(datatypeModule: str, sourGrapes:
|
|
69
|
+
def setDatatypeModule(datatypeModule: str, sourGrapes: bool | None = False) -> str:
|
|
72
70
|
global _datatypeModule
|
|
73
71
|
if not _datatypeModule:
|
|
74
72
|
_datatypeModule = datatypeModule
|
|
@@ -78,13 +76,13 @@ def setDatatypeModule(datatypeModule: str, sourGrapes: Optional[bool] = False) -
|
|
|
78
76
|
raise Exception(f"Datatype module is '{_datatypeModule}' not '{datatypeModule}', so you can take your ball and go home.")
|
|
79
77
|
return _datatypeModule
|
|
80
78
|
|
|
81
|
-
def setDatatypeElephino(datatype: str, sourGrapes:
|
|
79
|
+
def setDatatypeElephino(datatype: str, sourGrapes: bool | None = False) -> str:
|
|
82
80
|
return reportDatatypeLimit('elephino', datatype, sourGrapes)
|
|
83
81
|
|
|
84
|
-
def setDatatypeFoldsTotal(datatype: str, sourGrapes:
|
|
82
|
+
def setDatatypeFoldsTotal(datatype: str, sourGrapes: bool | None = False) -> str:
|
|
85
83
|
return reportDatatypeLimit('foldsTotal', datatype, sourGrapes)
|
|
86
84
|
|
|
87
|
-
def setDatatypeLeavesTotal(datatype: str, sourGrapes:
|
|
85
|
+
def setDatatypeLeavesTotal(datatype: str, sourGrapes: bool | None = False) -> str:
|
|
88
86
|
return reportDatatypeLimit('leavesTotal', datatype, sourGrapes)
|
|
89
87
|
|
|
90
88
|
def _get_datatype(identifier: str) -> str:
|
|
@@ -104,12 +102,12 @@ def getDatatypeModule() -> str:
|
|
|
104
102
|
_datatypeModule = _datatypeModuleDEFAULT
|
|
105
103
|
return _datatypeModule
|
|
106
104
|
|
|
107
|
-
def setInStone(identifier: str) ->
|
|
105
|
+
def setInStone(identifier: str) -> type[Any]:
|
|
108
106
|
datatypeModule = getDatatypeModule()
|
|
109
107
|
datatypeStr = _get_datatype(identifier)
|
|
110
|
-
return cast(
|
|
108
|
+
return cast(type[Any], getattr(eval(datatypeModule), datatypeStr))
|
|
111
109
|
|
|
112
|
-
def hackSSOTdtype(identifier: str) ->
|
|
110
|
+
def hackSSOTdtype(identifier: str) -> type[Any]:
|
|
113
111
|
_hackSSOTdtype={
|
|
114
112
|
'connectionGraph': 'dtypeLeavesTotal',
|
|
115
113
|
'dtypeElephino': 'dtypeElephino',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: mapFolding
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Count distinct ways to fold a map (or a strip of stamps)
|
|
5
5
|
Author-email: Hunter Hogan <HunterHogan@pm.me>
|
|
6
6
|
License: CC-BY-NC-4.0
|
|
@@ -39,6 +39,7 @@ Requires-Dist: pytest-env; extra == "testing"
|
|
|
39
39
|
Requires-Dist: pytest-xdist; extra == "testing"
|
|
40
40
|
Requires-Dist: pytest; extra == "testing"
|
|
41
41
|
Requires-Dist: python_minifier; extra == "testing"
|
|
42
|
+
Requires-Dist: pyupgrade; extra == "testing"
|
|
42
43
|
Requires-Dist: updateCitation; extra == "testing"
|
|
43
44
|
|
|
44
45
|
# mapFolding: Algorithms for enumerating distinct map/stamp folding patterns 🗺️
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
mapFolding/__init__.py,sha256=AQA9ypsiV8cDUCvWdM64kFhO9LaKFvAuSEw03jiI7ao,1358
|
|
2
|
+
mapFolding/basecamp.py,sha256=f6Z_KJ1iGV5a3YBDsxS0m7RojYABYlR4kb-dvKW8CAs,3703
|
|
3
|
+
mapFolding/beDRY.py,sha256=ViKLdomPYXD4o86BZwWgT0qPQNKqdtAZ74YoKC9Kgjg,16793
|
|
4
|
+
mapFolding/oeis.py,sha256=Jak0vOfS_gGTXH6xBI7NTUp4Clluvj792E5HNFDDt6U,11149
|
|
5
|
+
mapFolding/theDao.py,sha256=64dlLhrdtNbZAXMbqcZhGAE0ZwgqYRt8nT1on46J-cc,12611
|
|
6
|
+
mapFolding/theSSOT.py,sha256=tcEbPQLmvRWfIyuR0NpeY0Vm6l6L1dUJFyFZjbDo2Gs,6026
|
|
7
|
+
mapFolding/theSSOTdatatypes.py,sha256=OoB9hVfedQejRPxkP-dgLMHS-vqw_0imBvMLBuyLlg0,5829
|
|
8
|
+
mapFolding/reference/flattened.py,sha256=S6D9wiFTlbeoetEqaMLOcA-R22BHOzjqPRujffNxxUM,14875
|
|
9
|
+
mapFolding/reference/hunterNumba.py,sha256=jDS0ORHkIhcJ1rzA5hT49sZHKf3rgJOoGesUCcbKFFY,6054
|
|
10
|
+
mapFolding/reference/irvineJavaPort.py,sha256=7GvBU0tnS6wpFgkYad3465do9jBQW-2bYvbCYyABPHM,3341
|
|
11
|
+
mapFolding/reference/jax.py,sha256=7ji9YWia6Kof0cjcNdiS1GG1rMbC5SBjcyVr_07AeUk,13845
|
|
12
|
+
mapFolding/reference/lunnan.py,sha256=iAbJELfW6RKNMdPcBY9b6rGQ-z1zoRf-1XCurCRMOo8,3951
|
|
13
|
+
mapFolding/reference/lunnanNumpy.py,sha256=rwVP3WIDXimpAuaxhRIuBYU56nVDTKlfGiclw_FkgUU,3765
|
|
14
|
+
mapFolding/reference/lunnanWhile.py,sha256=uRrMT23jTJvoQDlD_FzeIQe_pfMXJG6_bRvs7uhC8z0,3271
|
|
15
|
+
mapFolding/reference/rotatedEntryPoint.py,sha256=USZY3n3zwhSE68ATscUuN66t1qShuEbMI790Gz9JFTw,9352
|
|
16
|
+
mapFolding/reference/total_countPlus1vsPlusN.py,sha256=wpgay-uqPOBd64Z4Pg6tg40j7-4pzWHGMM6v0bnmjhE,6288
|
|
17
|
+
mapFolding/someAssemblyRequired/__init__.py,sha256=wtec_hIz-AKz0_hGdXsWnCKTcCxdMV9-WK6SiIriAeU,396
|
|
18
|
+
mapFolding/someAssemblyRequired/getLLVMforNoReason.py,sha256=nX8tghZClYt7zJd6RpZBXhE_h-CGRHOS17biqiEdf-o,855
|
|
19
|
+
mapFolding/someAssemblyRequired/makeJob.py,sha256=neb_sFvYMx6dlZxKVmwGjKNrEsK0XaHyE1AJD9S9-nA,2408
|
|
20
|
+
mapFolding/someAssemblyRequired/synthesizeModuleJAX.py,sha256=21Wos8ynlly577EUDqWbbNc9R1qc19r5ysWaz86bCvg,1210
|
|
21
|
+
mapFolding/someAssemblyRequired/synthesizeNumba.py,sha256=6bVbZMnszgz5J81KF-_LQyi6Sw9SwUBD-k8u-mFKADo,16940
|
|
22
|
+
mapFolding/someAssemblyRequired/synthesizeNumbaGeneralized.py,sha256=vu6oYqoZGLNzbd3i8H9B2cEtL9bM1dhmbIpcJeF1NKE,16666
|
|
23
|
+
mapFolding/someAssemblyRequired/synthesizeNumbaJob.py,sha256=YRFLuEWcE7Fz4D7vgEwwof5xsrTRY2tIFl69GrFYke8,9050
|
|
24
|
+
mapFolding/someAssemblyRequired/synthesizeNumbaModules.py,sha256=3oUCPU4nnfynhEqSFqIC8BZ1x0lXK0_0_o-hIx8MCPw,5504
|
|
25
|
+
mapFolding/syntheticModules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
|
+
mapFolding/syntheticModules/numbaCount.py,sha256=447sbrCINu6wMfpJENguUyAxd6Vej3w98WzyVelz8eg,12900
|
|
27
|
+
mapFolding/syntheticModules/numba_doTheNeedful.py,sha256=8utsCDlcIvOlrjGugaD6DgecoDICIo5_BKhkYtwv-74,1150
|
|
28
|
+
tests/__init__.py,sha256=eg9smg-6VblOr0kisM40CpGnuDtU2JgEEWGDTFVOlW8,57
|
|
29
|
+
tests/conftest.py,sha256=rorOpl3Q1ksGQB-8UyLdUDkYBl9O3M19CvOKrnnzr-4,12296
|
|
30
|
+
tests/test_computations.py,sha256=67dcIj94VM69m912cY1L8HuqnXWl9NFVNhjx3zRNjvA,2831
|
|
31
|
+
tests/test_oeis.py,sha256=4EPJrd359kO019e6whDnERU-gnvMeOeUsHFgor7bA1Y,4686
|
|
32
|
+
tests/test_other.py,sha256=x34TGMWY7YmVtTduC_hlmISMVYemcx_z8_UcMcaNyIk,8375
|
|
33
|
+
tests/test_tasks.py,sha256=J8CET4Z-SYZGdy1-nj-pvVqMl6ujTXJR5ZCYkU4gbUc,2389
|
|
34
|
+
mapFolding-0.5.0.dist-info/LICENSE,sha256=NxH5Y8BdC-gNU-WSMwim3uMbID2iNDXJz7fHtuTdXhk,19346
|
|
35
|
+
mapFolding-0.5.0.dist-info/METADATA,sha256=rLrgAmUzYgyLQV_mh749XXhiD1RLrol0iHXZpA_10DU,7678
|
|
36
|
+
mapFolding-0.5.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
37
|
+
mapFolding-0.5.0.dist-info/entry_points.txt,sha256=F3OUeZR1XDTpoH7k3wXuRb3KF_kXTTeYhu5AGK1SiOQ,146
|
|
38
|
+
mapFolding-0.5.0.dist-info/top_level.txt,sha256=1gP2vFaqPwHujGwb3UjtMlLEGN-943VSYFR7V4gDqW8,17
|
|
39
|
+
mapFolding-0.5.0.dist-info/RECORD,,
|