mapFolding 0.13.0__py3-none-any.whl → 0.14.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 (43) hide show
  1. mapFolding/_oeisFormulas/A000136.py +4 -0
  2. mapFolding/_oeisFormulas/A000560.py +4 -0
  3. mapFolding/_oeisFormulas/A000682.py +17 -0
  4. mapFolding/_oeisFormulas/A005315.py +4 -0
  5. mapFolding/_oeisFormulas/A005316.py +10 -0
  6. mapFolding/_oeisFormulas/A223094.py +7 -0
  7. mapFolding/_oeisFormulas/A259702.py +4 -0
  8. mapFolding/_oeisFormulas/A301620.py +6 -0
  9. mapFolding/_oeisFormulas/Z0Z_aOFn.py +19 -0
  10. mapFolding/_oeisFormulas/Z0Z_oeisMeanders.py +53 -0
  11. mapFolding/_oeisFormulas/__init__.py +1 -0
  12. mapFolding/_oeisFormulas/matrixMeanders.py +65 -0
  13. mapFolding/_oeisFormulas/matrixMeandersAnnex.py +84 -0
  14. mapFolding/_theSSOT.py +68 -26
  15. mapFolding/basecamp.py +2 -2
  16. mapFolding/beDRY.py +1 -1
  17. mapFolding/oeis.py +56 -167
  18. mapFolding/reference/A005316JavaPort.py +134 -0
  19. mapFolding/reference/A005316imperative.py +101 -0
  20. mapFolding/reference/A005316intOptimized.py +122 -0
  21. mapFolding/reference/A005316optimized128bit.py +79 -0
  22. mapFolding/reference/A005316primitiveOptimized.py +97 -0
  23. mapFolding/reference/A005316redis.py +118 -0
  24. mapFolding/reference/A005316write2disk.py +169 -0
  25. mapFolding/reference/irvineJavaPort.py +4 -8
  26. mapFolding/reference/matrixMeandersBaseline.py +65 -0
  27. mapFolding/reference/matrixMeandersBaselineAnnex.py +84 -0
  28. mapFolding/someAssemblyRequired/RecipeJob.py +3 -4
  29. mapFolding/someAssemblyRequired/_toolkitContainers.py +3 -3
  30. mapFolding/someAssemblyRequired/makeAllModules.py +2 -2
  31. mapFolding/someAssemblyRequired/makeJobTheorem2codon.py +109 -141
  32. mapFolding/someAssemblyRequired/toolkitNumba.py +9 -7
  33. mapFolding/tests/conftest.py +13 -13
  34. mapFolding/tests/test_computations.py +4 -4
  35. mapFolding/tests/test_oeis.py +7 -14
  36. mapfolding-0.14.0.dist-info/METADATA +78 -0
  37. mapfolding-0.14.0.dist-info/RECORD +76 -0
  38. mapfolding-0.13.0.dist-info/METADATA +0 -154
  39. mapfolding-0.13.0.dist-info/RECORD +0 -54
  40. {mapfolding-0.13.0.dist-info → mapfolding-0.14.0.dist-info}/WHEEL +0 -0
  41. {mapfolding-0.13.0.dist-info → mapfolding-0.14.0.dist-info}/entry_points.txt +0 -0
  42. {mapfolding-0.13.0.dist-info → mapfolding-0.14.0.dist-info}/licenses/LICENSE +0 -0
  43. {mapfolding-0.13.0.dist-info → mapfolding-0.14.0.dist-info}/top_level.txt +0 -0
@@ -26,7 +26,7 @@ which is crucial for maintaining package reliability in production environments.
26
26
 
27
27
  from contextlib import redirect_stdout
28
28
  from mapFolding.oeis import (
29
- clearOEIScache, getOEISids, OEIS_for_n, oeisIDfor_n, oeisIDsImplemented, settingsOEIS, validateOEISid)
29
+ _standardizeOEISid, clearOEIScache, dictionaryOEIS, getOEISids, OEIS_for_n, oeisIDfor_n, oeisIDsImplemented)
30
30
  from mapFolding.tests.conftest import standardizedEqualToCallableReturn, standardizedSystemExit
31
31
  from typing import Any
32
32
  import io
@@ -35,20 +35,13 @@ import random
35
35
  import re as regex
36
36
  import unittest.mock
37
37
 
38
- @pytest.mark.parametrize("badID", ["A999999", " A999999 ", "A999999extra"])
39
- def test__validateOEISid_invalid_id(badID: str) -> None:
40
- standardizedEqualToCallableReturn(KeyError, validateOEISid, badID)
41
-
42
- def test__validateOEISid_partially_valid(oeisID_1random: str) -> None:
43
- standardizedEqualToCallableReturn(KeyError, validateOEISid, f"{oeisID_1random}extra")
44
-
45
38
  def test__validateOEISid_valid_id(oeisID: str) -> None:
46
- standardizedEqualToCallableReturn(oeisID, validateOEISid, oeisID)
39
+ standardizedEqualToCallableReturn(oeisID, _standardizeOEISid, oeisID)
47
40
 
48
41
  def test__validateOEISid_valid_id_case_insensitive(oeisID: str) -> None:
49
- standardizedEqualToCallableReturn(oeisID.upper(), validateOEISid, oeisID.lower())
50
- standardizedEqualToCallableReturn(oeisID.upper(), validateOEISid, oeisID.upper())
51
- standardizedEqualToCallableReturn(oeisID.upper(), validateOEISid, oeisID.swapcase())
42
+ standardizedEqualToCallableReturn(oeisID.upper(), _standardizeOEISid, oeisID.lower())
43
+ standardizedEqualToCallableReturn(oeisID.upper(), _standardizeOEISid, oeisID.upper())
44
+ standardizedEqualToCallableReturn(oeisID.upper(), _standardizeOEISid, oeisID.swapcase())
52
45
 
53
46
  parameters_test_aOFn_invalid_n = [
54
47
  (-random.randint(1, 100), "randomNegative"), # noqa: S311
@@ -75,7 +68,7 @@ def test_clearOEIScache(mock_unlink: unittest.mock.MagicMock, mock_exists: unitt
75
68
 
76
69
  if cacheExists:
77
70
  # Each OEIS ID has two cache files
78
- expected_calls = len(settingsOEIS) * 2
71
+ expected_calls = len(dictionaryOEIS) * 2
79
72
  assert mock_unlink.call_count == expected_calls
80
73
  mock_unlink.assert_has_calls([unittest.mock.call(missing_ok=True)] * expected_calls)
81
74
  else:
@@ -94,7 +87,7 @@ def testHelpText() -> None:
94
87
  # Verify content
95
88
  for oeisID in oeisIDsImplemented:
96
89
  assert oeisID in helpText
97
- assert settingsOEIS[oeisID]['description'] in helpText
90
+ assert dictionaryOEIS[oeisID]['description'] in helpText
98
91
 
99
92
  # Extract and verify examples
100
93
 
@@ -0,0 +1,78 @@
1
+ Metadata-Version: 2.4
2
+ Name: mapFolding
3
+ Version: 0.14.0
4
+ Summary: Map folding, meanders, stamp folding, semi-meanders. Experiment with algorithm transformations and code optimization.
5
+ Author-email: Hunter Hogan <HunterHogan@pm.me>
6
+ License: CC-BY-NC-4.0
7
+ Project-URL: Donate, https://www.patreon.com/integrated
8
+ Project-URL: Homepage, https://github.com/hunterhogan/mapFolding
9
+ Project-URL: Issues, https://github.com/hunterhogan/mapFolding/issues
10
+ Project-URL: Repository, https://github.com/hunterhogan/mapFolding.git
11
+ Keywords: A000136,A000560,A000682,A001415,A001416,A001417,A001418,A005315,A005316,A195646,A223094,A259702,A301620,abstract syntax tree,algorithmic combinatorics,algorithmic optimization,arch configurations,AST manipulation,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,GPU acceleration,high-performance computing,integer sequences,JIT compilation,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,Numba optimization,numerical algorithms,numerical computation,OEIS,open meandric systems,paper folding mathematics,parallel computing,pattern recognition,performance optimization,permutation patterns,permutations,post-setup optimization,pyproject,Python optimization,scientific computing,semi-meanders,sequence analysis,sequence calculator,sequence enumeration,sequence explorer,sequence generation,source code analysis,stamp folding,symbolic computation,topological combinatorics,topological patterns,typed Python
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Education
16
+ Classifier: Intended Audience :: Science/Research
17
+ Classifier: Natural Language :: English
18
+ Classifier: Operating System :: MacOS
19
+ Classifier: Operating System :: OS Independent
20
+ Classifier: Operating System :: POSIX :: Linux
21
+ Classifier: Programming Language :: Python
22
+ Classifier: Programming Language :: Python :: 3
23
+ Classifier: Programming Language :: Python :: 3 :: Only
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: Programming Language :: Python :: Implementation :: CPython
27
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
28
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
29
+ Classifier: Topic :: Software Development :: Code Generators
30
+ Classifier: Topic :: Software Development :: Compilers
31
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
32
+ Classifier: Topic :: Software Development :: Pre-processors
33
+ Classifier: Typing :: Typed
34
+ Requires-Python: >=3.12
35
+ Description-Content-Type: text/markdown
36
+ License-File: LICENSE
37
+ Requires-Dist: astToolkit>=0.7.1
38
+ Requires-Dist: cytoolz
39
+ Requires-Dist: hunterMakesPy
40
+ Requires-Dist: numba
41
+ Requires-Dist: numpy
42
+ Requires-Dist: platformdirs
43
+ Provides-Extra: development
44
+ Requires-Dist: mypy; extra == "development"
45
+ Requires-Dist: pyupgrade; extra == "development"
46
+ Requires-Dist: setuptools-scm; extra == "development"
47
+ Provides-Extra: numba
48
+ Requires-Dist: numba; extra == "numba"
49
+ Requires-Dist: numba_progress; extra == "numba"
50
+ Provides-Extra: testing
51
+ Requires-Dist: numba; extra == "testing"
52
+ Requires-Dist: pytest-cov; extra == "testing"
53
+ Requires-Dist: pytest-env; extra == "testing"
54
+ Requires-Dist: pytest-xdist; extra == "testing"
55
+ Requires-Dist: pytest; extra == "testing"
56
+ Dynamic: license-file
57
+
58
+ # mapFolding
59
+
60
+ [![pip install mapFolding](https://img.shields.io/badge/pip%20install-mapFolding-gray.svg?colorB=3b434b)](https://pypi.org/project/mapFolding/)
61
+
62
+ Map folding, meanders, stamp folding, semi-meanders. Experiment with algorithm transformations and code optimization.
63
+
64
+ Command line:
65
+
66
+ - getOEISids
67
+ - OEIS_for_n
68
+
69
+ The package is focused on mapFolding and stamp folding. But "mapFolding/_oeisFormulas" has some infrastructure for meanders and semi-meanders.
70
+
71
+ There are innovations and insights in the mapFolding stuff.
72
+
73
+ ## My recovery
74
+
75
+ [![Static Badge](https://img.shields.io/badge/2011_August-Homeless_since-blue?style=flat)](https://HunterThinks.com/support)
76
+ [![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UC3Gx7kz61009NbhpRtPP7tw)](https://www.youtube.com/@HunterHogan)
77
+
78
+ [![CC-BY-NC-4.0](https://github.com/hunterhogan/mapFolding/blob/main/CC-BY-NC-4.0.png)](https://creativecommons.org/licenses/by-nc/4.0/)
@@ -0,0 +1,76 @@
1
+ mapFolding/__init__.py,sha256=dl3HR2zoipFo0UstEJn3iWTkXlA_XeCQw_zfw2fk4qE,3643
2
+ mapFolding/_theSSOT.py,sha256=3tpmiDAgrN9uZ8IuBx-xbtiRjxP9B9_PjEwK0L5Mxm4,4683
3
+ mapFolding/_theTypes.py,sha256=rT8UTm-I_haMQlUGaJ4yvqIMt6FUOvWH-VUYNud6UN4,5495
4
+ mapFolding/basecamp.py,sha256=eG9wz5hPgPIuLLQf9xKizuvTAKyZjFQt1_rbaQJJYO4,9458
5
+ mapFolding/beDRY.py,sha256=JjKrJ97vNg67RIoWfOEKZGGbL55kE3p9B6wrJ1TK-8E,14760
6
+ mapFolding/daoOfMapFolding.py,sha256=ncTIiBfTsM8SNVx9qefZ0bBcBtviWLSk4iPv3Z9nGiE,5442
7
+ mapFolding/dataBaskets.py,sha256=zTpRoGDEysq7ekmgiKCtCV6NOBGzfgs_XMjVngvg3ic,14566
8
+ mapFolding/filesystemToolkit.py,sha256=Ex5tyugRQurXIgUNVtkQYfWMq8fM4e-izX01MBXU5_8,11006
9
+ mapFolding/oeis.py,sha256=_M5Ha0io90apjtm4r1Dd5c38FeirnTymxCtqTFE3h2c,19416
10
+ mapFolding/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
+ mapFolding/_oeisFormulas/A000136.py,sha256=G_vqOdb6s_YBbrCkHKjQDnlYfOZ4suXRtie6bRI7hhE,105
12
+ mapFolding/_oeisFormulas/A000560.py,sha256=sN5-BAjL0oDk7YXZ2kx7ffBDX-gC28mmOj4CxHkM36c,113
13
+ mapFolding/_oeisFormulas/A000682.py,sha256=_Jmy9-0I1evJS2CybtvXalUiCD3X_pu5aMb3i8u1fTk,551
14
+ mapFolding/_oeisFormulas/A005315.py,sha256=g1P52zUuWCLFbTb_i6U75sVzXfUGaCM3rJonXNRgVr4,109
15
+ mapFolding/_oeisFormulas/A005316.py,sha256=3B4_2TT_ip3CcYngEaFS-rTNDx-x2TZ0r_J0f8IMJbQ,234
16
+ mapFolding/_oeisFormulas/A223094.py,sha256=z7t6RcRQlhXdbYImIER15KwG1_W7iV4MNIRDx9Q_Efs,284
17
+ mapFolding/_oeisFormulas/A259702.py,sha256=9hUs8jzwOnJGmBsueS1yGsLjau4YVa0Yd9lYMG8UFso,123
18
+ mapFolding/_oeisFormulas/A301620.py,sha256=pY0OJsCLhIEDHQUKpeSMTZ2SUFvcqt83uCOPE_lZCsw,225
19
+ mapFolding/_oeisFormulas/Z0Z_aOFn.py,sha256=PjSUpcpNh_YXvc4lrC3xzpx6rz0yWbOuYEHugsssmns,572
20
+ mapFolding/_oeisFormulas/Z0Z_oeisMeanders.py,sha256=IDwGgieBJffmC3bAFaCqgIxPC9ZyRmqSxsWJ3VKyY2U,1746
21
+ mapFolding/_oeisFormulas/__init__.py,sha256=n83beVb7HHplXYAM5HveaIAuR7KrJG99OaNHJGMb_uc,44
22
+ mapFolding/_oeisFormulas/matrixMeanders.py,sha256=0QEzcOTvaOb0-6MiKUe1Uxoi-ESVIG5rlZxUA1e_l_s,2965
23
+ mapFolding/_oeisFormulas/matrixMeandersAnnex.py,sha256=sl0UWwivpnbzIfi6E5cD0vSpHlSUu-Htw4yb4aN-Eg4,5809
24
+ mapFolding/reference/A005316JavaPort.py,sha256=6qqTzbD3PTwYGtqaywEURGXtNFx1lp8ofEwpQeEvAHc,4899
25
+ mapFolding/reference/A005316imperative.py,sha256=hhjUxELOktNBmHrwIoxVA-mcFsOWgg01p780OBeqL04,3816
26
+ mapFolding/reference/A005316intOptimized.py,sha256=oO9ktdYeFwtosVp5KliwH8JmCSxfjapjBM1iMECuDAc,4121
27
+ mapFolding/reference/A005316optimized128bit.py,sha256=G48By4Z0iWFeGPEzac2X0uv6Fp42SqMALJoEunqHUS0,3380
28
+ mapFolding/reference/A005316primitiveOptimized.py,sha256=z9mtfKGlVXLplSwg51Qpmu6njZndCufFIxnPTCOVN2U,4064
29
+ mapFolding/reference/A005316redis.py,sha256=NobSrzm1NuDLKk_v1diSZz6viT_2Q7bO5WU3rJ9q0jk,4292
30
+ mapFolding/reference/A005316write2disk.py,sha256=_XT_3jbOOroCOmXyITKJVs7ZFtpkVI_xCt-051405Rg,5597
31
+ mapFolding/reference/__init__.py,sha256=GKcSgYE49NcTISx-JZbELXyq-eRkMeTL5g4DXInWFw0,2206
32
+ mapFolding/reference/flattened.py,sha256=0eHgLFIeIeVUsI5zF5oSy5iWYrjOMzxr7KjDxiTe01k,16078
33
+ mapFolding/reference/hunterNumba.py,sha256=iLfyqwGdAh6c5GbapnKsWhAsNsR3O-fyGGHAdohluLw,7258
34
+ mapFolding/reference/irvineJavaPort.py,sha256=XnsL4g33LRrYwAhcrAVt-ujsP6QD6fbyCsGYzcm9g_k,3724
35
+ mapFolding/reference/jaxCount.py,sha256=TuDNKOnyhQfuixKmIxO9Algv7dvy7KMGhgsV3h96FGE,14853
36
+ mapFolding/reference/lunnonNumpy.py,sha256=mMgrgbrBpe4nmo72ThEI-MGH0OwEHmfMPczSXHp2qKo,4357
37
+ mapFolding/reference/lunnonWhile.py,sha256=ZL8GAQtPs5nJZSgoDl5USrLSS_zs03y98y1Z9E4jOmQ,3799
38
+ mapFolding/reference/matrixMeandersBaseline.py,sha256=0QEzcOTvaOb0-6MiKUe1Uxoi-ESVIG5rlZxUA1e_l_s,2965
39
+ mapFolding/reference/matrixMeandersBaselineAnnex.py,sha256=sl0UWwivpnbzIfi6E5cD0vSpHlSUu-Htw4yb4aN-Eg4,5809
40
+ mapFolding/reference/rotatedEntryPoint.py,sha256=5ughpKUT2JQhoAKgoDUdYNjgWQYPGV8v-7dWEAdDmfE,10274
41
+ mapFolding/reference/total_countPlus1vsPlusN.py,sha256=yJZAVLVdoXqHag2_N6_6CT-Q6HXBgRro-eny93-Rlpw,9307
42
+ mapFolding/reference/jobsCompleted/__init__.py,sha256=TU93ZGUW1xEkT6d9mQFn_rp5DvRy0ZslEB2Q6MF5ZDc,2596
43
+ mapFolding/reference/jobsCompleted/[2x19]/p2x19.py,sha256=_tvYtfzMWVo2VtUbIAieoscb4N8FFflgTdW4-ljBUuA,19626
44
+ mapFolding/reference/jobsCompleted/p2x19/p2x19.py,sha256=eZEw4Me4ocTt6VXoK2-Sbd5SowZtxRIbN9dZmc7OCVg,6395
45
+ mapFolding/someAssemblyRequired/RecipeJob.py,sha256=yGGPHq9JX-Gf7QlJz50EPpkO7sADwGvSZNA1aC_F_PQ,9866
46
+ mapFolding/someAssemblyRequired/__init__.py,sha256=UNDh6O86jT5ywlw9LgeWsUHwOfNvoMJRDAzYXbwCbeM,5779
47
+ mapFolding/someAssemblyRequired/_toolIfThis.py,sha256=VDZC10Xo3E1Y5n6FmaBBbOBR-rinV9DFkpgw8zrDyzg,6339
48
+ mapFolding/someAssemblyRequired/_toolkitContainers.py,sha256=vRmetlZI1Kxhe6qjw7ysHeARn5e6F5hmB6ib2BCRxtE,13614
49
+ mapFolding/someAssemblyRequired/getLLVMforNoReason.py,sha256=tY0-2K0BFkwLAAjSrFJLPoG8CevDHOFc3OH3TxXANzg,2806
50
+ mapFolding/someAssemblyRequired/infoBooth.py,sha256=GWiqnHbqk7te_pvVuk4G_gbFa_W2aeSx19w4pakvqfM,2300
51
+ mapFolding/someAssemblyRequired/makeAllModules.py,sha256=o22qQ35N9M3N3kra16IayOpXMI1bkwVNQ5c04_rxMGw,44295
52
+ mapFolding/someAssemblyRequired/makeJobTheorem2Numba.py,sha256=ZSplXKPwRAbvMA2bvEGcXFdgvuYGBk3Ncxajzk-Zy0A,17170
53
+ mapFolding/someAssemblyRequired/makeJobTheorem2codon.py,sha256=Py6WubBaBz__MdpSTTmdtV9VjMciIx8DWiS_h25OVEI,11300
54
+ mapFolding/someAssemblyRequired/toolkitNumba.py,sha256=nCCVsGidAlcKRVAvA__hu4bXtat3B-cO9YloKtqOAc4,14919
55
+ mapFolding/someAssemblyRequired/transformationTools.py,sha256=nPGZsvb5GquaCCxdDh_XzNIZYSiVJpWKd7wfhfRvxnk,11512
56
+ mapFolding/syntheticModules/__init__.py,sha256=evVFqhCGa-WZKDiLcnQWjs-Bj34eRnfSLqz_d7dFYZY,83
57
+ mapFolding/syntheticModules/countParallel.py,sha256=OK_IB9w4yy9MMAiGvkei5ezPm_00v2nYjPrQZ_IlELg,7733
58
+ mapFolding/syntheticModules/daoOfMapFolding.py,sha256=cfWPABtXyCxJ0BwPI7rhfLh_2UYV_XKAL8lJ4GLNXaQ,5896
59
+ mapFolding/syntheticModules/dataPacking.py,sha256=m_eOZ7sMXIQ9jY5EvC3qgitQTY60n6rksy0ACMJOIC8,2292
60
+ mapFolding/syntheticModules/initializeCount.py,sha256=nWSlJMMfIM3DvZxMn6ISQusUJqRYAjKQyLF5hwLEdBQ,3119
61
+ mapFolding/syntheticModules/theorem2.py,sha256=9jrbZNNX4BWYZW1S0JjvRY2k7RU7I1RNUMV7JdCt1ZY,3017
62
+ mapFolding/syntheticModules/theorem2Numba.py,sha256=-cKjNyxgUMFhEyFVs0VJ7hw4LfrV0WSNK5tPYbQ1oNU,3369
63
+ mapFolding/syntheticModules/theorem2Trimmed.py,sha256=DHW3NxBdtABQYBKm2WRvfQ5kzc2_UwGI2h4ePuYEJoM,2685
64
+ mapFolding/tests/__init__.py,sha256=QVCHSMFVvTxV3mAyYOLkMFAFyBJ514zdoVnDmpBJnTo,1336
65
+ mapFolding/tests/conftest.py,sha256=VZ9l0Vd2d-hdp6cVBmsTkYA7FZIH0cEgdeJx844oe3A,14624
66
+ mapFolding/tests/test_computations.py,sha256=OjX7zECx2Hr6RsIi0hZZSzaiQJa7GBRLUpiASofNp-A,6541
67
+ mapFolding/tests/test_filesystem.py,sha256=0rYQ62f4e3HOoymXrxDWbqNEBJQ7DGN8RUOMI84tE2Q,3892
68
+ mapFolding/tests/test_oeis.py,sha256=ejqaOMB61c1oUEBblPPBG9hFFXffpKuIS0CJMe7Rd1o,5497
69
+ mapFolding/tests/test_other.py,sha256=ScBiJ78LnyAaW-RhxcouX6Xw10wgpSdqfvT4LO3WjnQ,4766
70
+ mapFolding/tests/test_tasks.py,sha256=_pr9JRWjjNKA7sww70XvkJJdGPruBVzubM63RmD_Du0,4013
71
+ mapfolding-0.14.0.dist-info/licenses/LICENSE,sha256=NxH5Y8BdC-gNU-WSMwim3uMbID2iNDXJz7fHtuTdXhk,19346
72
+ mapfolding-0.14.0.dist-info/METADATA,sha256=Y9pEjwsX2B8QeCarplVsfNroHV1PbngK9qej7DcuH40,5122
73
+ mapfolding-0.14.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
74
+ mapfolding-0.14.0.dist-info/entry_points.txt,sha256=F3OUeZR1XDTpoH7k3wXuRb3KF_kXTTeYhu5AGK1SiOQ,146
75
+ mapfolding-0.14.0.dist-info/top_level.txt,sha256=aG3bjFBoxxuaV3Iu1wZAd241Ubs3cdaJtKYBQBDIjsg,11
76
+ mapfolding-0.14.0.dist-info/RECORD,,
@@ -1,154 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: mapFolding
3
- Version: 0.13.0
4
- Summary: Map folding algorithm with code transformation framework for optimizing numerical computations.
5
- Author-email: Hunter Hogan <HunterHogan@pm.me>
6
- License: CC-BY-NC-4.0
7
- Project-URL: Donate, https://www.patreon.com/integrated
8
- Project-URL: Homepage, https://github.com/hunterhogan/mapFolding
9
- Project-URL: Issues, https://github.com/hunterhogan/mapFolding/issues
10
- Project-URL: Repository, https://github.com/hunterhogan/mapFolding.git
11
- Keywords: A000136,A001415,A001416,A001417,A001418,A195646,AST manipulation,Numba optimization,OEIS,algorithmic optimization,code generation,code transformation,codon optimization,combinatorics,computational geometry,dataclass transformation,folding pattern enumeration,just-in-time compilation,map folding,performance optimization,source code analysis,stamp folding
12
- Classifier: Development Status :: 4 - Beta
13
- Classifier: Environment :: Console
14
- Classifier: Intended Audience :: Developers
15
- Classifier: Intended Audience :: Education
16
- Classifier: Intended Audience :: Science/Research
17
- Classifier: Natural Language :: English
18
- Classifier: Operating System :: MacOS
19
- Classifier: Operating System :: OS Independent
20
- Classifier: Operating System :: POSIX :: Linux
21
- Classifier: Programming Language :: Python :: 3 :: Only
22
- Classifier: Programming Language :: Python :: 3.12
23
- Classifier: Programming Language :: Python :: 3.13
24
- Classifier: Programming Language :: Python :: 3
25
- Classifier: Programming Language :: Python :: Implementation :: CPython
26
- Classifier: Programming Language :: Python
27
- Classifier: Topic :: Scientific/Engineering :: Information Analysis
28
- Classifier: Topic :: Scientific/Engineering :: Mathematics
29
- Classifier: Topic :: Software Development :: Code Generators
30
- Classifier: Topic :: Software Development :: Compilers
31
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
32
- Classifier: Topic :: Software Development :: Pre-processors
33
- Classifier: Typing :: Typed
34
- Requires-Python: >=3.12
35
- Description-Content-Type: text/markdown
36
- License-File: LICENSE
37
- Requires-Dist: astToolkit
38
- Requires-Dist: hunterMakesPy
39
- Requires-Dist: numpy
40
- Requires-Dist: platformdirs
41
- Provides-Extra: development
42
- Requires-Dist: mypy; extra == "development"
43
- Requires-Dist: pyupgrade; extra == "development"
44
- Requires-Dist: setuptools-scm; extra == "development"
45
- Provides-Extra: numba
46
- Requires-Dist: numba; extra == "numba"
47
- Requires-Dist: numba_progress; extra == "numba"
48
- Provides-Extra: testing
49
- Requires-Dist: numba; extra == "testing"
50
- Requires-Dist: pytest-cov; extra == "testing"
51
- Requires-Dist: pytest-env; extra == "testing"
52
- Requires-Dist: pytest-xdist; extra == "testing"
53
- Requires-Dist: pytest; extra == "testing"
54
- Dynamic: license-file
55
-
56
- # mapFolding
57
-
58
- [![pip install mapFolding](https://img.shields.io/badge/pip%20install-mapFolding-gray.svg?colorB=3b434b)](https://pypi.org/project/mapFolding/)
59
- [![Python Tests](https://github.com/hunterhogan/mapFolding/actions/workflows/pythonTests.yml/badge.svg)](https://github.com/hunterhogan/mapFolding/actions/workflows/pythonTests.yml)
60
- [![License: CC-BY-NC-4.0](https://img.shields.io/badge/License-CC_BY--NC_4.0-3b434b)](https://creativecommons.org/licenses/by-nc/4.0/)
61
-
62
- A computational framework that starts with Lunnon's 1971 algorithm for counting distinct ways to fold maps and improves it. Plus there is a comprehensive AST transformation system for transforming algorithms for optimization and research.
63
-
64
- (Yo, the rest is AI generated and I don't have the energy to proofread it. This package helped me compute two previously unknown values: I'm sure others can improve it.)
65
-
66
- ## The Mathematical Problem
67
-
68
- Map folding is a combinatorial problem: given a rectangular grid of unit squares, how many distinct ways can you fold it? "Distinct" means that foldings producing identical final shapes are counted as one. This problem connects to combinatorial geometry, integer sequences, and computational complexity theory.
69
-
70
- The calculations extend the Online Encyclopedia of Integer Sequences (OEIS):
71
-
72
- - **A001415**: 2×n strips (computed through n=20 for the first time)
73
- - **A001418**: n×n squares
74
- - **A001416**: 3×n strips
75
- - **A001417**: n-dimensional hypercubes
76
- - **A195646**: 3×3×...×3 hypercubes
77
-
78
- ```python
79
- from mapFolding import oeisIDfor_n
80
-
81
- # How many ways can you fold a 2×4 strip?
82
- foldsTotal = oeisIDfor_n('A001415', 4)
83
- ```
84
-
85
- ## The Computational Challenge
86
-
87
- For larger maps, these calculations require hours or days to complete. A 2×20 strip requires processing leaves through billions of recursive operations. The package addresses this through systematic algorithm transformation: converting readable Python implementations into specialized, Numba-optimized modules that achieve order-of-magnitude performance improvements.
88
-
89
- ## What This Package Provides
90
-
91
- ### Core Functionality
92
-
93
- - **Complete implementation** of Lunnon's recursive algorithm
94
- - **Mathematical validation** through OEIS integration and caching
95
- - **Type-safe computational state** management with automatic initialization
96
- - **Result persistence** for long-running calculations
97
-
98
- ### Algorithm Transformation System
99
-
100
- - **AST manipulation framework** for converting dataclass-based algorithms to optimized implementations
101
- - **Automatic code generation** that produces standalone, highly optimized computation modules
102
- - **Dataclass decomposition** to enable Numba compatibility while preserving readable source code
103
- - **Comprehensive optimization** including dead code elimination, static value embedding, and aggressive compilation settings
104
- - **codon code generation**: compile map folding computation modules using [Codon](https://docs.exaloop.io/start/install/), enabling high-performance native binaries from Python source code.
105
-
106
- ### Educational Resources
107
-
108
- - **Historical implementations** showing algorithm evolution from 1971 to present
109
- - **Performance comparison** studies demonstrating optimization techniques
110
- - **Complete test suite** with patterns for validating custom implementations
111
- - **Reference documentation** for extending the transformation framework
112
-
113
- ## Use Cases
114
-
115
- **Mathematical Research**: Explore folding pattern properties, extend known sequences, or validate theoretical results against computed values.
116
-
117
- **Algorithm Optimization Learning**: Study a complete transformation assembly line that converts high-level algorithms into production-ready optimized code.
118
-
119
- **Performance Computing Education**: Examine techniques for achieving maximum Python performance through Numba integration, AST manipulation, and specialized code generation.
120
-
121
- **Combinatorial Problem Solving**: Use the framework as a template for optimizing other recursive combinatorial algorithms.
122
-
123
- ## Repository Structure
124
-
125
- - `mapFolding/`: Core implementation with modular architecture
126
- - `reference/`: Historical algorithm implementations and performance studies
127
- - `someAssemblyRequired/`: AST transformation framework
128
- - `mapFolding/tests/`: Comprehensive validation suite
129
- - `jobs/`: Generated optimized modules for specific calculations
130
-
131
- ## Performance Characteristics
132
-
133
- - **Pure Python baseline**: Educational implementations for understanding
134
- - **NumPy optimization**: ~10× improvement through vectorized operations
135
- - **Numba compilation**: ~100× improvement through native code generation
136
- - **Specialized modules**: ~1000× improvement through static optimization and embedded constants
137
-
138
- Actual performance varies by map dimensions and available hardware.
139
-
140
- ## My recovery
141
-
142
- [![Static Badge](https://img.shields.io/badge/2011_August-Homeless_since-blue?style=flat)](https://HunterThinks.com/support)
143
- [![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UC3Gx7kz61009NbhpRtPP7tw)](https://www.youtube.com/@HunterHogan)
144
-
145
- ## How to code
146
-
147
- Coding One Step at a Time:
148
-
149
- 0. WRITE CODE.
150
- 1. Don't write stupid code that's hard to revise.
151
- 2. Write good code.
152
- 3. When revising, write better code.
153
-
154
- [![CC-BY-NC-4.0](https://github.com/hunterhogan/mapFolding/blob/main/CC-BY-NC-4.0.svg)](https://creativecommons.org/licenses/by-nc/4.0/)
@@ -1,54 +0,0 @@
1
- mapFolding/__init__.py,sha256=dl3HR2zoipFo0UstEJn3iWTkXlA_XeCQw_zfw2fk4qE,3643
2
- mapFolding/_theSSOT.py,sha256=dloMAsIOhUnIE7-SFJbQYyl6IYo7CdCAyBZPqMuckko,3380
3
- mapFolding/_theTypes.py,sha256=rT8UTm-I_haMQlUGaJ4yvqIMt6FUOvWH-VUYNud6UN4,5495
4
- mapFolding/basecamp.py,sha256=K-h8rBb-lREOe8DAdWLx5Uqbl5eaPjj8lRLk5HIVw40,9454
5
- mapFolding/beDRY.py,sha256=Iikg3U4zQjx6JOKL62R7Tb0CpOm3JkPSIewAByco9GA,14777
6
- mapFolding/daoOfMapFolding.py,sha256=ncTIiBfTsM8SNVx9qefZ0bBcBtviWLSk4iPv3Z9nGiE,5442
7
- mapFolding/dataBaskets.py,sha256=zTpRoGDEysq7ekmgiKCtCV6NOBGzfgs_XMjVngvg3ic,14566
8
- mapFolding/filesystemToolkit.py,sha256=Ex5tyugRQurXIgUNVtkQYfWMq8fM4e-izX01MBXU5_8,11006
9
- mapFolding/oeis.py,sha256=jJjTsngcUNTY0M8et1InbnpP2csglQilFidyVCCm0Ts,23031
10
- mapFolding/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- mapFolding/reference/__init__.py,sha256=GKcSgYE49NcTISx-JZbELXyq-eRkMeTL5g4DXInWFw0,2206
12
- mapFolding/reference/flattened.py,sha256=0eHgLFIeIeVUsI5zF5oSy5iWYrjOMzxr7KjDxiTe01k,16078
13
- mapFolding/reference/hunterNumba.py,sha256=iLfyqwGdAh6c5GbapnKsWhAsNsR3O-fyGGHAdohluLw,7258
14
- mapFolding/reference/irvineJavaPort.py,sha256=UEfIX4QbPLl5jnyfYIyX5YRR3_rYvPUikK8jLehsFko,4076
15
- mapFolding/reference/jaxCount.py,sha256=TuDNKOnyhQfuixKmIxO9Algv7dvy7KMGhgsV3h96FGE,14853
16
- mapFolding/reference/lunnonNumpy.py,sha256=mMgrgbrBpe4nmo72ThEI-MGH0OwEHmfMPczSXHp2qKo,4357
17
- mapFolding/reference/lunnonWhile.py,sha256=ZL8GAQtPs5nJZSgoDl5USrLSS_zs03y98y1Z9E4jOmQ,3799
18
- mapFolding/reference/rotatedEntryPoint.py,sha256=5ughpKUT2JQhoAKgoDUdYNjgWQYPGV8v-7dWEAdDmfE,10274
19
- mapFolding/reference/total_countPlus1vsPlusN.py,sha256=yJZAVLVdoXqHag2_N6_6CT-Q6HXBgRro-eny93-Rlpw,9307
20
- mapFolding/reference/jobsCompleted/__init__.py,sha256=TU93ZGUW1xEkT6d9mQFn_rp5DvRy0ZslEB2Q6MF5ZDc,2596
21
- mapFolding/reference/jobsCompleted/[2x19]/p2x19.py,sha256=_tvYtfzMWVo2VtUbIAieoscb4N8FFflgTdW4-ljBUuA,19626
22
- mapFolding/reference/jobsCompleted/p2x19/p2x19.py,sha256=eZEw4Me4ocTt6VXoK2-Sbd5SowZtxRIbN9dZmc7OCVg,6395
23
- mapFolding/someAssemblyRequired/RecipeJob.py,sha256=Hd1DUMZqfqlQz4jj3eTir5e_xvFW7_O0ILWmNsiQWV8,9913
24
- mapFolding/someAssemblyRequired/__init__.py,sha256=UNDh6O86jT5ywlw9LgeWsUHwOfNvoMJRDAzYXbwCbeM,5779
25
- mapFolding/someAssemblyRequired/_toolIfThis.py,sha256=VDZC10Xo3E1Y5n6FmaBBbOBR-rinV9DFkpgw8zrDyzg,6339
26
- mapFolding/someAssemblyRequired/_toolkitContainers.py,sha256=ymqEWH5oO_gNjvRjpRELCzahXfU74fhHZspnv6GGLiE,13680
27
- mapFolding/someAssemblyRequired/getLLVMforNoReason.py,sha256=tY0-2K0BFkwLAAjSrFJLPoG8CevDHOFc3OH3TxXANzg,2806
28
- mapFolding/someAssemblyRequired/infoBooth.py,sha256=GWiqnHbqk7te_pvVuk4G_gbFa_W2aeSx19w4pakvqfM,2300
29
- mapFolding/someAssemblyRequired/makeAllModules.py,sha256=wbZXlKd0dOkLYHGM_I7VYH9r9yZfS6HDBJ702nggDxM,44353
30
- mapFolding/someAssemblyRequired/makeJobTheorem2Numba.py,sha256=ZSplXKPwRAbvMA2bvEGcXFdgvuYGBk3Ncxajzk-Zy0A,17170
31
- mapFolding/someAssemblyRequired/makeJobTheorem2codon.py,sha256=8Epqg6eLLNWr3wvg9sdwv3WILMUtbR-lha8-OZXU-I8,12714
32
- mapFolding/someAssemblyRequired/toolkitNumba.py,sha256=Wg5CWe2UDeR1Y22loxbcRbPOQn1yHFlD6s4uYPGCYwM,14860
33
- mapFolding/someAssemblyRequired/transformationTools.py,sha256=nPGZsvb5GquaCCxdDh_XzNIZYSiVJpWKd7wfhfRvxnk,11512
34
- mapFolding/syntheticModules/__init__.py,sha256=evVFqhCGa-WZKDiLcnQWjs-Bj34eRnfSLqz_d7dFYZY,83
35
- mapFolding/syntheticModules/countParallel.py,sha256=OK_IB9w4yy9MMAiGvkei5ezPm_00v2nYjPrQZ_IlELg,7733
36
- mapFolding/syntheticModules/daoOfMapFolding.py,sha256=cfWPABtXyCxJ0BwPI7rhfLh_2UYV_XKAL8lJ4GLNXaQ,5896
37
- mapFolding/syntheticModules/dataPacking.py,sha256=m_eOZ7sMXIQ9jY5EvC3qgitQTY60n6rksy0ACMJOIC8,2292
38
- mapFolding/syntheticModules/initializeCount.py,sha256=nWSlJMMfIM3DvZxMn6ISQusUJqRYAjKQyLF5hwLEdBQ,3119
39
- mapFolding/syntheticModules/theorem2.py,sha256=9jrbZNNX4BWYZW1S0JjvRY2k7RU7I1RNUMV7JdCt1ZY,3017
40
- mapFolding/syntheticModules/theorem2Numba.py,sha256=-cKjNyxgUMFhEyFVs0VJ7hw4LfrV0WSNK5tPYbQ1oNU,3369
41
- mapFolding/syntheticModules/theorem2Trimmed.py,sha256=DHW3NxBdtABQYBKm2WRvfQ5kzc2_UwGI2h4ePuYEJoM,2685
42
- mapFolding/tests/__init__.py,sha256=QVCHSMFVvTxV3mAyYOLkMFAFyBJ514zdoVnDmpBJnTo,1336
43
- mapFolding/tests/conftest.py,sha256=f0JB_e5zbpusGLWVJbtYKug9oRm0M8c-GFAp9mhhs9Q,14590
44
- mapFolding/tests/test_computations.py,sha256=7avZjmYjsgJAcTEzQFj3Td1N9q75ANdCRnNvOesFjiw,6535
45
- mapFolding/tests/test_filesystem.py,sha256=0rYQ62f4e3HOoymXrxDWbqNEBJQ7DGN8RUOMI84tE2Q,3892
46
- mapFolding/tests/test_oeis.py,sha256=Sn3jpg6YQJMtAAc1W8Ic2PTbTwSckzBdJnkN1rz_O6w,5834
47
- mapFolding/tests/test_other.py,sha256=ScBiJ78LnyAaW-RhxcouX6Xw10wgpSdqfvT4LO3WjnQ,4766
48
- mapFolding/tests/test_tasks.py,sha256=_pr9JRWjjNKA7sww70XvkJJdGPruBVzubM63RmD_Du0,4013
49
- mapfolding-0.13.0.dist-info/licenses/LICENSE,sha256=NxH5Y8BdC-gNU-WSMwim3uMbID2iNDXJz7fHtuTdXhk,19346
50
- mapfolding-0.13.0.dist-info/METADATA,sha256=S-_yPqTdfIVDdYBVeuUV80YHWW54rfMZiOGXiyJFjQ0,8040
51
- mapfolding-0.13.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
52
- mapfolding-0.13.0.dist-info/entry_points.txt,sha256=F3OUeZR1XDTpoH7k3wXuRb3KF_kXTTeYhu5AGK1SiOQ,146
53
- mapfolding-0.13.0.dist-info/top_level.txt,sha256=aG3bjFBoxxuaV3Iu1wZAd241Ubs3cdaJtKYBQBDIjsg,11
54
- mapfolding-0.13.0.dist-info/RECORD,,