mapFolding 0.15.4__py3-none-any.whl → 0.16.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.
Files changed (58) hide show
  1. mapFolding/__init__.py +7 -9
  2. mapFolding/_theSSOT.py +1 -0
  3. mapFolding/algorithms/daoOfMapFolding.py +1 -2
  4. mapFolding/algorithms/getBucketsTotal.py +137 -0
  5. mapFolding/algorithms/matrixMeanders.py +457 -286
  6. mapFolding/algorithms/oeisIDbyFormula.py +310 -76
  7. mapFolding/algorithms/zCuzDocStoopidoeisIDbyFormula.py +84 -0
  8. mapFolding/basecamp.py +99 -14
  9. mapFolding/dataBaskets.py +74 -0
  10. mapFolding/oeis.py +3 -2
  11. mapFolding/reference/A000682facts.py +662 -0
  12. mapFolding/reference/A005316facts.py +62 -0
  13. mapFolding/reference/matrixMeandersAnalysis/__init__.py +1 -0
  14. mapFolding/reference/matrixMeandersAnalysis/evenEven.py +144 -0
  15. mapFolding/reference/matrixMeandersAnalysis/oddEven.py +54 -0
  16. mapFolding/someAssemblyRequired/A007822/A007822rawMaterials.py +55 -0
  17. mapFolding/someAssemblyRequired/A007822/__init__.py +0 -0
  18. mapFolding/someAssemblyRequired/A007822/makeA007822AsynchronousModules.py +185 -0
  19. mapFolding/someAssemblyRequired/A007822/makeA007822Modules.py +71 -0
  20. mapFolding/someAssemblyRequired/RecipeJob.py +2 -2
  21. mapFolding/someAssemblyRequired/__init__.py +9 -2
  22. mapFolding/someAssemblyRequired/_toolIfThis.py +4 -3
  23. mapFolding/someAssemblyRequired/_toolkitContainers.py +8 -8
  24. mapFolding/someAssemblyRequired/infoBooth.py +27 -30
  25. mapFolding/someAssemblyRequired/makeJobTheorem2Numba.py +1 -1
  26. mapFolding/someAssemblyRequired/makeJobTheorem2codon.py +5 -2
  27. mapFolding/someAssemblyRequired/makingModules_count.py +301 -0
  28. mapFolding/someAssemblyRequired/makingModules_doTheNeedful.py +120 -0
  29. mapFolding/someAssemblyRequired/mapFolding/__init__.py +0 -0
  30. mapFolding/someAssemblyRequired/mapFolding/makeMapFoldingModules.py +220 -0
  31. mapFolding/someAssemblyRequired/toolkitMakeModules.py +152 -0
  32. mapFolding/someAssemblyRequired/toolkitNumba.py +1 -1
  33. mapFolding/someAssemblyRequired/transformationTools.py +1 -0
  34. mapFolding/syntheticModules/A007822/__init__.py +1 -0
  35. mapFolding/syntheticModules/{algorithmA007822Numba.py → A007822/algorithmNumba.py} +2 -4
  36. mapFolding/syntheticModules/A007822/asynchronous.py +148 -0
  37. mapFolding/syntheticModules/A007822/asynchronousAnnex.py +68 -0
  38. mapFolding/syntheticModules/A007822/asynchronousTheorem2.py +53 -0
  39. mapFolding/syntheticModules/A007822/asynchronousTrimmed.py +47 -0
  40. mapFolding/syntheticModules/dataPackingA007822.py +1 -1
  41. mapFolding/tests/test_computations.py +2 -2
  42. mapFolding/trim_memory.py +62 -0
  43. mapFolding/zCuzDocStoopid/__init__.py +1 -0
  44. mapFolding/zCuzDocStoopid/makeDocstrings.py +63 -0
  45. {mapfolding-0.15.4.dist-info → mapfolding-0.16.0.dist-info}/METADATA +9 -2
  46. mapfolding-0.16.0.dist-info/RECORD +100 -0
  47. mapFolding/someAssemblyRequired/A007822rawMaterials.py +0 -46
  48. mapFolding/someAssemblyRequired/makeAllModules.py +0 -764
  49. mapfolding-0.15.4.dist-info/RECORD +0 -78
  50. /mapFolding/syntheticModules/{algorithmA007822.py → A007822/algorithm.py} +0 -0
  51. /mapFolding/syntheticModules/{initializeStateA007822.py → A007822/initializeState.py} +0 -0
  52. /mapFolding/syntheticModules/{theorem2A007822.py → A007822/theorem2.py} +0 -0
  53. /mapFolding/syntheticModules/{theorem2A007822Numba.py → A007822/theorem2Numba.py} +0 -0
  54. /mapFolding/syntheticModules/{theorem2A007822Trimmed.py → A007822/theorem2Trimmed.py} +0 -0
  55. {mapfolding-0.15.4.dist-info → mapfolding-0.16.0.dist-info}/WHEEL +0 -0
  56. {mapfolding-0.15.4.dist-info → mapfolding-0.16.0.dist-info}/entry_points.txt +0 -0
  57. {mapfolding-0.15.4.dist-info → mapfolding-0.16.0.dist-info}/licenses/LICENSE +0 -0
  58. {mapfolding-0.15.4.dist-info → mapfolding-0.16.0.dist-info}/top_level.txt +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
@@ -1,5 +1,5 @@
1
1
  from mapFolding.dataBaskets import Array1DElephino, Array1DLeavesTotal, Array3DLeavesTotal, DatatypeElephino, DatatypeFoldsTotal, DatatypeLeavesTotal, MapFoldingState
2
- from mapFolding.syntheticModules.theorem2A007822Numba import count
2
+ from mapFolding.syntheticModules.A007822.theorem2Numba import count
3
3
 
4
4
  def sequential(state: MapFoldingState) -> MapFoldingState:
5
5
  mapShape: tuple[DatatypeLeavesTotal, ...] = state.mapShape
@@ -28,12 +28,12 @@ which is useful if you're working with the code synthesis features of the packag
28
28
  from mapFolding import countFolds, dictionaryOEISMapFolding, dictionaryOEISMeanders, getFoldsTotalKnown, oeisIDfor_n
29
29
  from mapFolding.algorithms import oeisIDbyFormula
30
30
  from mapFolding.dataBaskets import MapFoldingState
31
- from mapFolding.someAssemblyRequired.makeAllModules import parametersNumbaLight
32
31
  from mapFolding.someAssemblyRequired.RecipeJob import RecipeJobTheorem2
32
+ from mapFolding.someAssemblyRequired.toolkitNumba import parametersNumbaLight
33
33
  from mapFolding.syntheticModules.initializeState import transitionOnGroupsOfFolds
34
34
  from mapFolding.tests.conftest import registrarRecordsTemporaryFilesystemObject, standardizedEqualToCallableReturn
35
35
  from pathlib import Path, PurePosixPath
36
- from typing import Literal, TYPE_CHECKING
36
+ from typing import TYPE_CHECKING
37
37
  import importlib.util
38
38
  import multiprocessing
39
39
  import pytest
@@ -0,0 +1,62 @@
1
+ """Memory management utilities.
2
+
3
+ https://github.com/pandas-dev/pandas/issues/2659#issuecomment-2452943964
4
+ """
5
+ import ctypes
6
+ import ctypes.wintypes
7
+ import gc
8
+ import logging
9
+ import platform
10
+
11
+ logger = logging.getLogger(__name__)
12
+
13
+ def trim_windows_process_memory(pid: int | None = None) -> bool:
14
+ """Cause effects similar to malloc_trim on -nix."""
15
+ # Define SIZE_T based on the platform (32-bit or 64-bit)
16
+ if ctypes.sizeof(ctypes.c_void_p) == 4:
17
+ SIZE_T = ctypes.c_uint32
18
+ else:
19
+ SIZE_T = ctypes.c_uint64
20
+
21
+ # Get a handle to the current process
22
+ if not pid:
23
+ pid = ctypes.windll.kernel32.GetCurrentProcess()
24
+
25
+ # Define argument and return types for SetProcessWorkingSetSizeEx
26
+ ctypes.windll.kernel32.SetProcessWorkingSetSizeEx.argtypes = [
27
+ ctypes.wintypes.HANDLE, # Process handle
28
+ SIZE_T, # Minimum working set size
29
+ SIZE_T, # Maximum working set size
30
+ ctypes.wintypes.DWORD, # Flags
31
+ ]
32
+ ctypes.windll.kernel32.SetProcessWorkingSetSizeEx.restype = ctypes.wintypes.BOOL
33
+
34
+ # Define constants for SetProcessWorkingSetSizeEx
35
+ QUOTA_LIMITS_HARDWS_MIN_DISABLE = 0x00000002
36
+
37
+ # Attempt to set the working set size
38
+ result = ctypes.windll.kernel32.SetProcessWorkingSetSizeEx(pid, SIZE_T(-1), SIZE_T(-1), QUOTA_LIMITS_HARDWS_MIN_DISABLE)
39
+
40
+ if result == 0:
41
+ # Retrieve the error code
42
+ error_code = ctypes.windll.kernel32.GetLastError()
43
+ message = f"SetProcessWorkingSetSizeEx failed with error code: {error_code}"
44
+ logger.error(message)
45
+ return False
46
+ else:
47
+ return True
48
+
49
+
50
+ def trim_ram() -> None:
51
+ """Force python garbage collection.
52
+
53
+ Most importantly, calls malloc_trim/SetProcessWorkingSetSizeEx, which fixes pandas/libc (?) memory leak.
54
+ """
55
+ gc.collect()
56
+ if platform.system() == "Windows":
57
+ trim_windows_process_memory()
58
+ else:
59
+ try:
60
+ ctypes.CDLL("libc.so.6").malloc_trim(0)
61
+ except Exception:
62
+ logger.exception("malloc_trim attempt failed")
@@ -0,0 +1 @@
1
+ """I mean, you must write docstrings after you write the code because you don't know what the code will do until after you write it."""
@@ -0,0 +1,63 @@
1
+ """Make docstrings."""
2
+ from astToolkit import Grab, IfThis, Make, NodeChanger, parsePathFilename2astModule, Then
3
+ from astToolkit.transformationTools import makeDictionaryFunctionDef
4
+ from hunterMakesPy import raiseIfNone, writeStringToHere
5
+ from mapFolding import dictionaryOEISMapFolding, dictionaryOEISMeanders, packageSettings
6
+ from pathlib import Path
7
+ import ast
8
+
9
+ sourcePrefix: str = 'zCuzDocStoopid'
10
+
11
+ pathRoot: Path = packageSettings.pathPackage / "algorithms"
12
+
13
+ pathFilenameSource: Path = next(iter(pathRoot.glob(f"{sourcePrefix}*.py"))).absolute()
14
+ pathFilenameWrite: Path = pathFilenameSource.with_stem(pathFilenameSource.stem.removeprefix(sourcePrefix))
15
+
16
+ astModule: ast.Module = parsePathFilename2astModule(pathFilenameSource)
17
+ dictionaryFunctionDef: dict[str, ast.FunctionDef] = makeDictionaryFunctionDef(astModule)
18
+
19
+ moduleWarning = """
20
+ NOTE: This is a generated file; edit the source file.
21
+ """
22
+
23
+ oeisID = 'Error during transformation' # `ast.FunctionDef.name` of function in `pathFilenameSource`.
24
+ functionOf: str = 'Error during transformation' # The value of `functionOf` is in the docstring of function `oeisID` in `pathFilenameSource`.
25
+
26
+ for oeisID, FunctionDef in dictionaryFunctionDef.items():
27
+ dictionaryOEIS = dictionaryOEISMapFolding if oeisID in dictionaryOEISMapFolding else dictionaryOEISMeanders
28
+ functionOf = raiseIfNone(ast.get_docstring(FunctionDef))
29
+
30
+ ImaDocstring= f"""
31
+ Compute {oeisID}(n) as a function of {functionOf}.
32
+
33
+ *The On-Line Encyclopedia of Integer Sequences* (OEIS) description of {oeisID} is: "{dictionaryOEIS[oeisID]['description']}"
34
+
35
+ The domain of {oeisID} starts at {dictionaryOEIS[oeisID]['offset']}, therefore for values of `n` < {dictionaryOEIS[oeisID]['offset']}, a(n) is undefined. The smallest value of n for which a(n)
36
+ has not yet been computed is {dictionaryOEIS[oeisID]['valueUnknown']}.
37
+
38
+ Parameters
39
+ ----------
40
+ n : int
41
+ Index (n-dex) for a(n) in the sequence of values. "n" (lower case) and "a(n)" are conventions in mathematics.
42
+
43
+ Returns
44
+ -------
45
+ a(n) : int
46
+ {dictionaryOEIS[oeisID]['description']}
47
+
48
+ Would You Like to Know More?
49
+ ----------------------------
50
+ OEIS : webpage
51
+ https://oeis.org/{oeisID}
52
+ """
53
+
54
+ astExprDocstring = Make.Expr(Make.Constant(ImaDocstring))
55
+
56
+ NodeChanger(
57
+ findThis = IfThis.isFunctionDefIdentifier(oeisID)
58
+ , doThat = Grab.bodyAttribute(Grab.index(0, Then.replaceWith(astExprDocstring)))
59
+ ).visit(astModule)
60
+
61
+ ast.fix_missing_locations(astModule)
62
+
63
+ writeStringToHere((ast.unparse(astModule)+"\n"), pathFilenameWrite)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mapFolding
3
- Version: 0.15.4
3
+ Version: 0.16.0
4
4
  Summary: Map folding, meanders, stamp folding, semi-meanders. Experiment with algorithm transformations and code optimization.
5
5
  Author-email: Hunter Hogan <HunterHogan@pm.me>
6
6
  License: CC-BY-NC-4.0
@@ -8,7 +8,7 @@ Project-URL: Donate, https://www.patreon.com/integrated
8
8
  Project-URL: Homepage, https://github.com/hunterhogan/mapFolding
9
9
  Project-URL: Issues, https://github.com/hunterhogan/mapFolding/issues
10
10
  Project-URL: Repository, https://github.com/hunterhogan/mapFolding.git
11
- Keywords: A000136,A000560,A000682,A001010,A001011,A001415,A001416,A001417,A001418,A005315,A005316,A007822,A195646,A223094,A259702,A301620,AST manipulation,GPU acceleration,JIT compilation,Numba optimization,OEIS,Python optimization,abstract syntax tree,algorithmic combinatorics,algorithmic optimization,arch configurations,automated code generation,bit-packed arrays,bitwise state machines,cache-efficient algorithms,closed meandric numbers,code generation,code optimization,code synthesis,code transformation,codon optimization,combinatorial computing,combinatorial enumeration,combinatorial geometry,combinatorial mathematics,combinatorial problem solver,combinatorics,computational combinatorics,computational geometry,crossing patterns,curve crossings,dataclass transformation,discrete mathematics,dynamic compilation,enumerative combinatorics,folding pattern enumeration,folding problems,high-performance computing,integer sequences,just-in-time compilation,kernel optimization,labeled stamp folding,low-level computation,map folding,mapFolding,mathematical algorithms,mathematical modeling,mathematical optimization,mathematical patterns,mathematical software,mathematical tool,mathematical visualization,meander enumeration,meanders,meandric systems,memory-efficient enumeration,metaprogramming,numerical algorithms,numerical computation,open meandric systems,paper folding mathematics,parallel computing,pattern recognition,performance optimization,permutation patterns,permutations,post-setup optimization,pyproject,scientific computing,semi-meanders,sequence analysis,sequence calculator,sequence enumeration,sequence explorer,sequence generation,source code analysis,stamp folding,symbolic computation,symmetric foldings,topological combinatorics,topological patterns,typed Python
11
+ Keywords: A000136,A000560,A000682,A001010,A001011,A001415,A001416,A001417,A001418,A005315,A005316,A007822,A178961,A195646,A223094,A259702,A301620,AST manipulation,GPU acceleration,JIT compilation,Numba optimization,OEIS,Python optimization,abstract syntax tree,algorithmic combinatorics,algorithmic optimization,arch configurations,automated code generation,bit-packed arrays,bitwise state machines,cache-efficient algorithms,closed meandric numbers,code generation,code optimization,code synthesis,code transformation,codon optimization,combinatorial computing,combinatorial enumeration,combinatorial geometry,combinatorial mathematics,combinatorial problem solver,combinatorics,computational combinatorics,computational geometry,crossing patterns,curve crossings,dataclass transformation,discrete mathematics,dynamic compilation,enumerative combinatorics,folding pattern enumeration,folding problems,high-performance computing,integer sequences,just-in-time compilation,kernel optimization,labeled stamp folding,low-level computation,map folding,mapFolding,mathematical algorithms,mathematical modeling,mathematical optimization,mathematical patterns,mathematical software,mathematical tool,mathematical visualization,meander enumeration,meanders,meandric systems,memory-efficient enumeration,metaprogramming,numerical algorithms,numerical computation,open meandric systems,paper folding mathematics,parallel computing,pattern recognition,performance optimization,permutation patterns,permutations,post-setup optimization,pyproject,scientific computing,semi-meanders,sequence analysis,sequence calculator,sequence enumeration,sequence explorer,sequence generation,source code analysis,stamp folding,symbolic computation,symmetric foldings,topological combinatorics,topological patterns,typed Python
12
12
  Classifier: Development Status :: 4 - Beta
13
13
  Classifier: Environment :: Console
14
14
  Classifier: Intended Audience :: Developers
@@ -35,6 +35,7 @@ Requires-Python: >=3.12
35
35
  Description-Content-Type: text/markdown
36
36
  License-File: LICENSE
37
37
  Requires-Dist: astToolkit
38
+ Requires-Dist: autoflake
38
39
  Requires-Dist: hunterMakesPy
39
40
  Requires-Dist: numpy
40
41
  Requires-Dist: platformdirs
@@ -47,8 +48,14 @@ Requires-Dist: setuptools-scm; extra == "development"
47
48
  Provides-Extra: numba
48
49
  Requires-Dist: numba; extra == "numba"
49
50
  Requires-Dist: numba_progress; extra == "numba"
51
+ Provides-Extra: pandas
52
+ Requires-Dist: pandas; extra == "pandas"
53
+ Requires-Dist: pyarrow; extra == "pandas"
54
+ Requires-Dist: pyarrow-stubs; extra == "pandas"
50
55
  Provides-Extra: testing
51
56
  Requires-Dist: numba; extra == "testing"
57
+ Requires-Dist: pandas; extra == "testing"
58
+ Requires-Dist: pyarrow; extra == "testing"
52
59
  Requires-Dist: pytest-cov; extra == "testing"
53
60
  Requires-Dist: pytest-env; extra == "testing"
54
61
  Requires-Dist: pytest-xdist; extra == "testing"
@@ -0,0 +1,100 @@
1
+ mapFolding/__init__.py,sha256=TDo9hax941LW-ea0hyAZsq0NEdhizAXXlNrWj8qX6dE,4012
2
+ mapFolding/_theSSOT.py,sha256=aZsdI_PPWB8S0wrLDs7HqVvL88OIPOti0STrYG776gg,5279
3
+ mapFolding/_theTypes.py,sha256=F2pCHexrlbHTgMpQn58jDhkwAMFUSBp28gQp21n86o0,6559
4
+ mapFolding/basecamp.py,sha256=x13ZipCO0G-6rZSWEqgInWlMDKC5TtH-n_V-wB7lfac,18795
5
+ mapFolding/beDRY.py,sha256=iYATcrYrAWkKaAecjA_awELBtZP5Q3snU4053dIsEwU,13941
6
+ mapFolding/dataBaskets.py,sha256=myijFYlgJuRXYPGpMSQN7Kg7mzLp7LuRgZZqDfQJku8,18088
7
+ mapFolding/filesystemToolkit.py,sha256=Ex5tyugRQurXIgUNVtkQYfWMq8fM4e-izX01MBXU5_8,11006
8
+ mapFolding/oeis.py,sha256=wtvCGXNkSduvf9RGUCJv8qOQoyNH1P8EYHxD_tf6ANU,18652
9
+ mapFolding/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
+ mapFolding/trim_memory.py,sha256=Do5oPwkMvqbrJ6oS7-7aegB9hVD03S1uLPlWXFrCF2c,2042
11
+ mapFolding/algorithms/__init__.py,sha256=gARPqfySaeSWMfApQ5wSxzy7ZdgLdKYsLqsRSEYWwWI,28
12
+ mapFolding/algorithms/daoOfMapFolding.py,sha256=ncTIiBfTsM8SNVx9qefZ0bBcBtviWLSk4iPv3Z9nGiE,5442
13
+ mapFolding/algorithms/getBucketsTotal.py,sha256=5JCgOb_bC4E5ol45TSs1dQtBWWX04aN3DIkonNU9Nh4,5966
14
+ mapFolding/algorithms/matrixMeanders.py,sha256=DLrzdJzkUiylaIX5yG-xZ7Jq75-St6aFIj_3acs8kQc,21750
15
+ mapFolding/algorithms/oeisIDbyFormula.py,sha256=ia79A1GlNS_7cUFs50B_zBB-F35Kf1Ljviy31XWpqnM,11372
16
+ mapFolding/algorithms/zCuzDocStoopidoeisIDbyFormula.py,sha256=zShTDbRgqBXpMrrdNdQ9ZO9rTV4Fq6X8zSO3YPPiIA4,2068
17
+ mapFolding/reference/A000682facts.py,sha256=AAIdA-YttdbOw6msEH3bgFxPcvKZn075ONOtPIQGjxU,14873
18
+ mapFolding/reference/A005316facts.py,sha256=Bavx1EIZ-uKc5xcp0XNC6lzMheXkapIGE5y-gugwryw,1281
19
+ mapFolding/reference/__init__.py,sha256=GKcSgYE49NcTISx-JZbELXyq-eRkMeTL5g4DXInWFw0,2206
20
+ mapFolding/reference/flattened.py,sha256=0eHgLFIeIeVUsI5zF5oSy5iWYrjOMzxr7KjDxiTe01k,16078
21
+ mapFolding/reference/hunterNumba.py,sha256=iLfyqwGdAh6c5GbapnKsWhAsNsR3O-fyGGHAdohluLw,7258
22
+ mapFolding/reference/irvineJavaPort.py,sha256=XnsL4g33LRrYwAhcrAVt-ujsP6QD6fbyCsGYzcm9g_k,3724
23
+ mapFolding/reference/jaxCount.py,sha256=t8ons45zyWNJQ-nmn1qbhNsTkTnRzf7ATauaYvIlkRI,14853
24
+ mapFolding/reference/lunnonNumpy.py,sha256=mMgrgbrBpe4nmo72ThEI-MGH0OwEHmfMPczSXHp2qKo,4357
25
+ mapFolding/reference/lunnonWhile.py,sha256=ZL8GAQtPs5nJZSgoDl5USrLSS_zs03y98y1Z9E4jOmQ,3799
26
+ mapFolding/reference/rotatedEntryPoint.py,sha256=3IJU7Hc2PDSE71wmSkDs4Z3t0Px9NBSzmCsVrgQuQyU,10274
27
+ mapFolding/reference/total_countPlus1vsPlusN.py,sha256=yJZAVLVdoXqHag2_N6_6CT-Q6HXBgRro-eny93-Rlpw,9307
28
+ mapFolding/reference/jobsCompleted/__init__.py,sha256=TU93ZGUW1xEkT6d9mQFn_rp5DvRy0ZslEB2Q6MF5ZDc,2596
29
+ mapFolding/reference/jobsCompleted/[2x19]/p2x19.py,sha256=_tvYtfzMWVo2VtUbIAieoscb4N8FFflgTdW4-ljBUuA,19626
30
+ mapFolding/reference/jobsCompleted/p2x19/p2x19.py,sha256=eZEw4Me4ocTt6VXoK2-Sbd5SowZtxRIbN9dZmc7OCVg,6395
31
+ mapFolding/reference/matrixMeandersAnalysis/__init__.py,sha256=FQbR63_z3_zd3HMrpUxx3_YIcn9znzA0RIggcMntSC8,35
32
+ mapFolding/reference/matrixMeandersAnalysis/evenEven.py,sha256=KfP9G9AG9Qd0kOG67JyLnauHxGmBqMvGVADxqSAHwTk,5009
33
+ mapFolding/reference/matrixMeandersAnalysis/oddEven.py,sha256=igZLaavoFtQCWAtIepPHohD1dVrLyfg-3rY0m4NFpGc,1759
34
+ mapFolding/reference/meandersDumpingGround/A005316JavaPort.py,sha256=6qqTzbD3PTwYGtqaywEURGXtNFx1lp8ofEwpQeEvAHc,4899
35
+ mapFolding/reference/meandersDumpingGround/A005316imperative.py,sha256=hhjUxELOktNBmHrwIoxVA-mcFsOWgg01p780OBeqL04,3816
36
+ mapFolding/reference/meandersDumpingGround/A005316intOptimized.py,sha256=oO9ktdYeFwtosVp5KliwH8JmCSxfjapjBM1iMECuDAc,4121
37
+ mapFolding/reference/meandersDumpingGround/A005316optimized128bit.py,sha256=6JxmVBIQnN0rH0MQIZtu_wgY1Wbms8hZCWarMe5NLLU,3416
38
+ mapFolding/reference/meandersDumpingGround/A005316primitiveOptimized.py,sha256=iFig6Edv1E774xrlVUFLyscC40DqDhV-oh4hOnG2DLI,4116
39
+ mapFolding/reference/meandersDumpingGround/A005316redis.py,sha256=MPeiobrs3VsNZOOKYBg52oVp0OjVDzLEdsRKfrZ9LrU,4328
40
+ mapFolding/reference/meandersDumpingGround/A005316write2disk.py,sha256=NMVrdhe5KhnXQfaQ5Xr7Pwl5oXYEOM1DrMISDDOCVVw,5633
41
+ mapFolding/reference/meandersDumpingGround/matrixMeanders64retired.py,sha256=oRVgf6zkWRjk7dWR-Px41M_5spdvKy_Pich0qd7oxVA,9270
42
+ mapFolding/reference/meandersDumpingGround/matrixMeandersBaseline.py,sha256=8Z98MMfhTCdoa75HWZz4DO166EiHZCu5eHeFzhgK42s,3003
43
+ mapFolding/reference/meandersDumpingGround/matrixMeandersBaselineAnnex.py,sha256=d2Oh4JZxz53ox_ArhIxpMTOuA7rtE9wnEPojpFcnlfc,5817
44
+ mapFolding/reference/meandersDumpingGround/matrixMeandersBaselineV2.py,sha256=VpRiIGhnk-DbxwsHwCeCwXqcKLSNyHl-iRGLDH9ZGMY,7674
45
+ mapFolding/reference/meandersDumpingGround/matrixMeandersSimpleQueue.py,sha256=pOfaS315OKIBG9GSqSJwUDcEhfnV2XduM9IPqHrBvJg,4083
46
+ mapFolding/reference/meandersDumpingGround/matrixMeandersSlicePop.py,sha256=XyiesSQAH1dRplYx_CdR1FzcXvgmmxzj27V4aIqPp7o,5353
47
+ mapFolding/someAssemblyRequired/RecipeJob.py,sha256=3lMDeb5sU1hkJYwaEMBFtl79xu8WCXca4sjndcQD9Ho,9866
48
+ mapFolding/someAssemblyRequired/__init__.py,sha256=3IF8HFIgFisJBQ1i4sx7Nz2iOqVoAG78jwjNJ9q531U,6272
49
+ mapFolding/someAssemblyRequired/_toolIfThis.py,sha256=QC2cmCea18BZ_WpoWoErYCWhROvmd40_i_nBO7YFRaE,6378
50
+ mapFolding/someAssemblyRequired/_toolkitContainers.py,sha256=RJThCzIBWSk-dUO75QhRJgaJk6xz5Pf4-LBN1wv7hxo,13545
51
+ mapFolding/someAssemblyRequired/getLLVMforNoReason.py,sha256=tY0-2K0BFkwLAAjSrFJLPoG8CevDHOFc3OH3TxXANzg,2806
52
+ mapFolding/someAssemblyRequired/infoBooth.py,sha256=ZWFH37S2jMGRbNlmjhNvoaezIk8abS3DvHhy7qVOaQM,2139
53
+ mapFolding/someAssemblyRequired/makeJobTheorem2Numba.py,sha256=MMB3is5IrKwZbx83OSndvCqtxJgTV1YGLjYpv25K_0g,17197
54
+ mapFolding/someAssemblyRequired/makeJobTheorem2codon.py,sha256=_V5Y5X_Wpwx0XEKdr4FWDsOu8SosH2uMCdaqL9OX4u0,11747
55
+ mapFolding/someAssemblyRequired/makingModules_count.py,sha256=ykTyroYhk2_M20FgDskuX4xEos-ecbZtQ7EytxGA0B0,14489
56
+ mapFolding/someAssemblyRequired/makingModules_doTheNeedful.py,sha256=T5i75G2ZnybITeKLLnyEOJVekNlcM_zFHFdhdjAOO-s,6356
57
+ mapFolding/someAssemblyRequired/toolkitMakeModules.py,sha256=ZzoDENTHbOoSSMq7fbF7jYPlbsgtPcNekSHoTIAB6os,7638
58
+ mapFolding/someAssemblyRequired/toolkitNumba.py,sha256=3ujtBaA27CX8yVApnfNRzFpZd3GvsHv1H1vyTiiJIZk,14905
59
+ mapFolding/someAssemblyRequired/transformationTools.py,sha256=LmyUPy-xADrQVjvWx_ufX_nclVOyJdhpF-htR9-nk7M,11513
60
+ mapFolding/someAssemblyRequired/A007822/A007822rawMaterials.py,sha256=FtDnxoMwbNP9C-fnKYHH6q_2qwhjdPHaVlja3d3pk6c,2955
61
+ mapFolding/someAssemblyRequired/A007822/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
+ mapFolding/someAssemblyRequired/A007822/makeA007822AsynchronousModules.py,sha256=MZD_SgFdIrnG_-mHYYsgsQuhqbbiPkam7iT5XmTcbM0,8389
63
+ mapFolding/someAssemblyRequired/A007822/makeA007822Modules.py,sha256=wIy2qSTp4HDBOLuEQ-81aAuo5LsiWriYNg96BWybqEA,4032
64
+ mapFolding/someAssemblyRequired/mapFolding/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
65
+ mapFolding/someAssemblyRequired/mapFolding/makeMapFoldingModules.py,sha256=SNU7Dpqu1agOmSX9DG3Kv8357mirzZiSvvKxn8XjtnM,16716
66
+ mapFolding/syntheticModules/__init__.py,sha256=evVFqhCGa-WZKDiLcnQWjs-Bj34eRnfSLqz_d7dFYZY,83
67
+ mapFolding/syntheticModules/countParallelNumba.py,sha256=6sHWzGc6ch3HjKVB8krvaBec_KoHv3gpfN_F5Vl1SP8,7870
68
+ mapFolding/syntheticModules/daoOfMapFoldingNumba.py,sha256=5oMb8pttNKslN6wss9JIQXSnmjgE2q_2-3fIrh1pEW0,6033
69
+ mapFolding/syntheticModules/dataPacking.py,sha256=SzRmDNr2OZP6Xk4krLqxTuWAUtUJxBDXmHEqlBHzNPI,2407
70
+ mapFolding/syntheticModules/dataPackingA007822.py,sha256=VA9rDEQfaSVNpgbMAXUvckSmU-5PBY6jPmEETnqH-vc,2469
71
+ mapFolding/syntheticModules/initializeState.py,sha256=OTiVi1Ywnlwk8tbwSIFjPJa_yBCINoapaCzGXDAJq_k,3121
72
+ mapFolding/syntheticModules/theorem2.py,sha256=QeXkBScihDatBk4iEMOMSntvhyJISb0G8zwZMQe7JFc,3031
73
+ mapFolding/syntheticModules/theorem2Numba.py,sha256=AFe-KI97ilPgPFA22ASAhfUetaTA249K7By_vqu1Crs,3416
74
+ mapFolding/syntheticModules/theorem2Trimmed.py,sha256=geKX3So1SqhENlKeEO2dV6S3rGsxBp-AItB4hRbwbBI,2699
75
+ mapFolding/syntheticModules/A007822/__init__.py,sha256=evVFqhCGa-WZKDiLcnQWjs-Bj34eRnfSLqz_d7dFYZY,83
76
+ mapFolding/syntheticModules/A007822/algorithm.py,sha256=rJHwImwcFGAysYoNME79qmNhoa3ebRgXb7ktKZLtSZ8,7074
77
+ mapFolding/syntheticModules/A007822/algorithmNumba.py,sha256=k7w-TicOkjV05bYPNK5s0kzWrBzS3EfVfQafZxBBa1Q,7222
78
+ mapFolding/syntheticModules/A007822/asynchronous.py,sha256=1L-5aa7Ivs-QM8DDI3I9Ulfi8AkJ3fd2KdNS6g7YBLE,6270
79
+ mapFolding/syntheticModules/A007822/asynchronousAnnex.py,sha256=m4k0Z_tlmWWgdalaW2SldLprqioVJtKf4oXAGSZf_6M,2644
80
+ mapFolding/syntheticModules/A007822/asynchronousTheorem2.py,sha256=wp6igfkIs54zqPudRMjYiue0UZE4QAu4QlHGbTLnj5U,3271
81
+ mapFolding/syntheticModules/A007822/asynchronousTrimmed.py,sha256=2m86hM0qlbyAjEks20e_KzxfVyjjQIB0iQkLPaFqo8M,2939
82
+ mapFolding/syntheticModules/A007822/initializeState.py,sha256=qizwxyNqKSgnF4MyBWU8Nca9IRbTnp-rrUAirF-ZL-E,4344
83
+ mapFolding/syntheticModules/A007822/theorem2.py,sha256=HflJuuOj6b_cF6zEKmLy74Nzv_7jFrqLmjsN05XM4KQ,4254
84
+ mapFolding/syntheticModules/A007822/theorem2Numba.py,sha256=GppP_WntOrcFSIpIk6jP7PlAb4PlskzEBqfKOJaisSA,4637
85
+ mapFolding/syntheticModules/A007822/theorem2Trimmed.py,sha256=ekbKQ_FIZgaQ9m7NrxDimx5dM2PBDIReGBtpv23jpNc,3922
86
+ mapFolding/tests/__init__.py,sha256=QVCHSMFVvTxV3mAyYOLkMFAFyBJ514zdoVnDmpBJnTo,1336
87
+ mapFolding/tests/conftest.py,sha256=fLBZFStVJEIfbt6PQNVyAEdMVyck_lwhEB0eZYgQSwU,15255
88
+ mapFolding/tests/test_computations.py,sha256=m0JJq71oSQ0ol-rE99SDLwN9LWXp7yamfkFA3-fY0x0,8286
89
+ mapFolding/tests/test_filesystem.py,sha256=0rYQ62f4e3HOoymXrxDWbqNEBJQ7DGN8RUOMI84tE2Q,3892
90
+ mapFolding/tests/test_oeis.py,sha256=qwi9z_BnpeGO4QwTHj_WOiP21gf2rUgDdxhc90zWsl8,4754
91
+ mapFolding/tests/test_other.py,sha256=ScBiJ78LnyAaW-RhxcouX6Xw10wgpSdqfvT4LO3WjnQ,4766
92
+ mapFolding/tests/test_tasks.py,sha256=_pr9JRWjjNKA7sww70XvkJJdGPruBVzubM63RmD_Du0,4013
93
+ mapFolding/zCuzDocStoopid/__init__.py,sha256=kgbAVyTTSsRBvIOOpO6TMSnrJ06JP4-aLA5AlhUwxEI,136
94
+ mapFolding/zCuzDocStoopid/makeDocstrings.py,sha256=Bq9QLptQ8vxdivTemKNU90ZINTKixFL5EBHijqaVhxA,2593
95
+ mapfolding-0.16.0.dist-info/licenses/LICENSE,sha256=NxH5Y8BdC-gNU-WSMwim3uMbID2iNDXJz7fHtuTdXhk,19346
96
+ mapfolding-0.16.0.dist-info/METADATA,sha256=pxPw3oi1Fn2htgavXy2whDt43OX8f0S3D0eY6GxEUGg,5506
97
+ mapfolding-0.16.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
98
+ mapfolding-0.16.0.dist-info/entry_points.txt,sha256=-mH9DjW9tDRMPaeoSWKKywG35cR28m12H_jtmrB4eY8,98
99
+ mapfolding-0.16.0.dist-info/top_level.txt,sha256=aG3bjFBoxxuaV3Iu1wZAd241Ubs3cdaJtKYBQBDIjsg,11
100
+ mapfolding-0.16.0.dist-info/RECORD,,
@@ -1,46 +0,0 @@
1
- from astToolkit import extractFunctionDef # noqa: D100
2
- from hunterMakesPy import raiseIfNone
3
- from mapFolding.someAssemblyRequired.infoBooth import (
4
- dataclassInstanceIdentifierDEFAULT, sourceCallableIdentifierDEFAULT, theCountingIdentifierDEFAULT)
5
- import ast
6
-
7
- Z0Z_identifier = 'filterAsymmetricFolds'
8
- ImaString = f"""
9
- def {Z0Z_identifier}(state: MapFoldingState) -> MapFoldingState:
10
- state.indexLeaf = 0
11
- leafConnectee = 0
12
- while leafConnectee < state.leavesTotal + 1:
13
- leafNumber = int(state.leafBelow[state.indexLeaf])
14
- state.leafComparison[leafConnectee] = (leafNumber - state.indexLeaf + state.leavesTotal) % state.leavesTotal
15
- state.indexLeaf = leafNumber
16
- leafConnectee += 1
17
-
18
- indexInMiddle = state.leavesTotal // 2
19
- state.indexMiniGap = 0
20
- while state.indexMiniGap < state.leavesTotal + 1:
21
- ImaSymmetricFold = True
22
- leafConnectee = 0
23
- while leafConnectee < indexInMiddle:
24
- if state.leafComparison[(state.indexMiniGap + leafConnectee) % (state.leavesTotal + 1)] != state.leafComparison[(state.indexMiniGap + state.leavesTotal - 1 - leafConnectee) % (state.leavesTotal + 1)]:
25
- ImaSymmetricFold = False
26
- break
27
- leafConnectee += 1
28
- if ImaSymmetricFold:
29
- state.groupsOfFolds += 1
30
- state.indexMiniGap += 1
31
-
32
- return state
33
- """
34
-
35
- FunctionDef_filterAsymmetricFolds: ast.FunctionDef = raiseIfNone(extractFunctionDef(ast.parse(ImaString), Z0Z_identifier))
36
- del ImaString
37
-
38
- ImaString = f"{dataclassInstanceIdentifierDEFAULT} = {Z0Z_identifier}({dataclassInstanceIdentifierDEFAULT})"
39
- Z0Z_incrementCount = ast.parse(ImaString).body[0]
40
- del ImaString
41
-
42
-
43
- ImaString = 'state.groupsOfFolds = (state.groupsOfFolds + 1) // 2'
44
- Z0Z_adjustFoldsTotal = ast.parse(ImaString).body[0]
45
- del ImaString
46
-