mapFolding 0.17.1__py3-none-any.whl → 0.18.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.
- easyRun/NOTcountingFolds.py +7 -11
- easyRun/countFolds.py +11 -10
- easyRun/meanders.py +6 -8
- mapFolding/__init__.py +24 -36
- mapFolding/_e/Z0Z_analysisPython/SORTZ0Z_hypothesis.py +189 -0
- mapFolding/_e/Z0Z_analysisPython/SORTZ0Z_p2d6.py +143 -0
- mapFolding/_e/Z0Z_analysisPython/__init__.py +4 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/__init__.py +0 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200.py +369 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/2001.py +694 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/270/211.py +514 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/270/2111.py +480 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/272/214.py +511 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/272/2141.py +515 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/272/214/344/270/211.py +485 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/272/214/344/270/2111.py +442 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/211.py +313 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/2111.py +343 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/272/214.py +400 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/272/2141.py +497 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/272/214/344/270/211.py +463 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/272/214/344/270/2111.py +441 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266.py +35 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/2661.py +35 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200.py +382 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/2001.py +630 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/270/211.py +488 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/270/2111.py +475 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/272/214.py +473 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/272/2141.py +500 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211.py +465 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111.py +439 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/211.py +599 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/2111.py +536 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/272/214.py +506 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/272/2141.py +533 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/272/214/344/270/211.py +489 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/272/214/344/270/2111.py +474 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200.py +1186 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/2001.py +2158 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/2001Negative.py +2158 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200Negative.py +1186 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/270/211.py +1397 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/270/2111.py +1291 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/270/2111Negative.py +1291 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/270/211Negative.py +1397 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214.py +1240 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/2141.py +1420 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/2141Negative.py +1420 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214Negative.py +1240 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214/344/270/211.py +1366 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214/344/270/2111.py +1274 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214/344/270/2111Negative.py +1274 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214/344/270/211Negative.py +1366 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/211.py +1186 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/2111.py +1186 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/2111Negative.py +1186 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/211Negative.py +1186 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214.py +1102 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/2141.py +1422 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/2141Negative.py +1422 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214Negative.py +1102 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214/344/270/211.py +1240 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214/344/270/2111.py +1228 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214/344/270/2111Negative.py +1228 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214/344/270/211Negative.py +1240 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266.py +32 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/2661.py +1162 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/2661Negative.py +1162 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266Negative.py +32 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200.py +1186 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/2001.py +1926 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/2001Negative.py +1926 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200Negative.py +1186 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/270/211.py +1291 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/270/2111.py +1176 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/270/2111Negative.py +1176 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/270/211Negative.py +1291 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214.py +1228 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/2141.py +1324 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/2141Negative.py +1324 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214Negative.py +1228 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211.py +1274 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111.py +1038 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111Negative.py +1038 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211Negative.py +1274 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/211.py +2158 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/2111.py +1926 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/2111Negative.py +1926 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/211Negative.py +2158 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214.py +1422 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/2141.py +1364 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/2141Negative.py +1364 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214Negative.py +1422 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214/344/270/211.py +1420 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214/344/270/2111.py +1324 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214/344/270/2111Negative.py +1324 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214/344/270/211Negative.py +1420 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200.py +3133 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/2001.py +6039 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/2001Negative.py +6039 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200Negative.py +3133 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/270/211.py +3527 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/270/2111.py +2300 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/270/2111Negative.py +2300 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/270/211Negative.py +3527 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214.py +3597 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/2141.py +3317 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/2141Negative.py +3317 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214Negative.py +3597 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214/344/270/211.py +3161 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214/344/270/2111.py +2877 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214/344/270/2111Negative.py +2877 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214/344/270/211Negative.py +3161 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/211.py +2981 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/2111.py +3055 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/2111Negative.py +3055 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/211Negative.py +2981 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214.py +3221 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/2141.py +3988 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/2141Negative.py +3988 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214Negative.py +3221 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214/344/270/211.py +3652 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214/344/270/2111.py +2863 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214/344/270/2111Negative.py +2863 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214/344/270/211Negative.py +3652 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200.py +2485 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/2001.py +4566 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/2001Negative.py +4566 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200Negative.py +2485 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/270/211.py +3006 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/270/2111.py +2485 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/270/2111Negative.py +2485 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/270/211Negative.py +3006 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214.py +3304 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/2141.py +3015 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/2141Negative.py +3015 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214Negative.py +3304 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211.py +2939 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111.py +2589 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111Negative.py +2589 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211Negative.py +2939 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/211.py +3899 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/2111.py +2996 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/2111Negative.py +2996 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/211Negative.py +3899 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214.py +3223 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/2141.py +3020 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/2141Negative.py +3020 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214Negative.py +3223 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214/344/270/211.py +3250 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214/344/270/2111.py +2667 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214/344/270/2111Negative.py +2667 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214/344/270/211Negative.py +3250 -0
- mapFolding/_e/Z0Z_analysisPython/measure.py +162 -0
- mapFolding/_e/Z0Z_analysisPython/positionAnalysis.py +403 -0
- mapFolding/_e/Z0Z_analysisPython/positionAnalysisPileRanges2d6.py +110 -0
- mapFolding/_e/Z0Z_analysisPython/theExcluderBeast.py +640 -0
- mapFolding/_e/Z0Z_analysisPython/toolkit.py +166 -0
- mapFolding/_e/Z0Z_analysisPython/toolkitCSVsequences.py +188 -0
- mapFolding/_e/Z0Z_analysisPython/workBenchPatternFinder.py +284 -0
- mapFolding/_e/Z0Z_notes/__init__.py +0 -0
- mapFolding/_e/Z0Z_notes/knowledgeDump.py +214 -0
- mapFolding/_e/__init__.py +45 -0
- mapFolding/_e/_beDRY.py +547 -0
- mapFolding/_e/_dataDynamic.py +1164 -0
- mapFolding/_e/_measure.py +579 -0
- mapFolding/_e/_semiotics.py +363 -0
- mapFolding/_e/_theTypes.py +31 -0
- mapFolding/_e/algorithms/__init__.py +1 -0
- mapFolding/_e/algorithms/constraintPropagation.py +158 -0
- mapFolding/_e/algorithms/elimination.py +118 -0
- mapFolding/_e/algorithms/eliminationCrease.py +66 -0
- mapFolding/_e/algorithms/iff.py +584 -0
- mapFolding/_e/basecamp.py +89 -0
- mapFolding/_e/dataBaskets.py +123 -0
- mapFolding/_e/dataRaw/__init__.py +0 -0
- mapFolding/_e/easyRun/__init__.py +0 -0
- mapFolding/_e/easyRun/eliminateFolds.py +72 -0
- mapFolding/_e/easyRun/pinning.py +62 -0
- mapFolding/_e/filters.py +384 -0
- mapFolding/_e/pin2/344/270/212nDimensions.py +882 -0
- mapFolding/_e/pin2/344/270/212nDimensionsAnnex.py +551 -0
- mapFolding/_e/pin2/344/270/212nDimensionsByCrease.py +190 -0
- mapFolding/_e/pin2/344/270/212nDimensionsByDomain.py +459 -0
- mapFolding/_e/pinIt.py +436 -0
- mapFolding/_semiotics.py +42 -0
- mapFolding/_theSSOT.py +11 -56
- mapFolding/_theTypes.py +52 -67
- mapFolding/algorithms/matrixMeandersNumPyndas.py +18 -18
- mapFolding/algorithms/oeisIDbyFormula.py +4 -4
- mapFolding/algorithms/zCuzDocStoopidoeisIDbyFormula.py +3 -3
- mapFolding/basecamp.py +11 -80
- mapFolding/beDRY.py +107 -111
- mapFolding/dataBaskets.py +0 -56
- mapFolding/filesystemToolkit.py +15 -11
- mapFolding/oeis.py +17 -16
- mapFolding/reference/matrixMeandersAnalysis/prefixNotationNotes.py +2 -2
- mapFolding/reference/meandersDumpingGround/matrixMeandersBaselineV2.py +0 -1
- mapFolding/reference/meandersDumpingGround/matrixMeandersNumPyV1finalForm.py +8 -10
- mapFolding/someAssemblyRequired/RecipeJob.py +5 -5
- mapFolding/someAssemblyRequired/makeJobTheorem2Numba.py +5 -2
- mapFolding/someAssemblyRequired/makeJobTheorem2codon.py +9 -11
- mapFolding/someAssemblyRequired/mapFoldingModules/makeMapFoldingModules.py +2 -1
- mapFolding/someAssemblyRequired/transformationTools.py +1 -1
- mapFolding/tests/Z0Z_test_e_excluder.py +155 -0
- mapFolding/tests/conftest.py +193 -314
- mapFolding/tests/dataSamples/A001417.py +455 -0
- mapFolding/tests/dataSamples/__init__.py +1 -0
- mapFolding/tests/dataSamples/measurementData.py +1818 -0
- mapFolding/tests/dataSamples/p2DnDomain3_2_/351/246/226/344/270/200_/351/246/226/351/233/266/344/270/200.py +17 -0
- mapFolding/tests/dataSamples/p2DnDomain3_/351/246/226/344/270/200.py +17 -0
- mapFolding/tests/dataSamples/p2DnDomain5_4.py +17 -0
- mapFolding/tests/dataSamples/p2DnDomain6_5.py +17 -0
- mapFolding/tests/dataSamples/p2DnDomain6_7_5_4.py +17 -0
- mapFolding/tests/dataSamples/p2DnDomain7_6.py +17 -0
- mapFolding/tests/dataSamples/p2DnDomain/351/246/226/344/272/214_/351/246/226/351/233/266/344/270/200/344/272/214.py +17 -0
- mapFolding/tests/dataSamples/p2DnDomain/351/246/226/344/272/214_/351/246/226/351/233/266/344/272/214_/351/246/226/351/233/266/344/270/200/344/272/214_/351/246/226/344/270/200/344/272/214.py +17 -0
- mapFolding/tests/dataSamples/p2DnDomain/351/246/226/351/233/266/344/270/200/344/272/214_/351/246/226/344/270/200/344/272/214.py +15 -0
- mapFolding/tests/dataSamples/p2DnDomain/351/246/226/351/233/266/344/272/214_/351/246/226/344/272/214.py +15 -0
- mapFolding/tests/dataSamples/semioticsData.py +135 -0
- mapFolding/tests/test_computations.py +134 -80
- mapFolding/tests/test_e_computations.py +42 -0
- mapFolding/tests/test_e_dataDynamic.py +189 -0
- mapFolding/tests/test_e_measurements.py +257 -0
- mapFolding/tests/test_e_pinning.py +61 -0
- mapFolding/tests/test_e_semiotics.py +128 -0
- mapFolding/tests/test_filesystem.py +39 -17
- mapFolding/tests/{test_other.py → test_parameterValidation.py} +3 -3
- mapFolding/tests/{test_tasks.py → test_taskDivisions.py} +42 -23
- mapFolding/zCuzDocStoopid/makeDocstrings.py +3 -2
- {mapfolding-0.17.1.dist-info → mapfolding-0.18.0.dist-info}/METADATA +11 -8
- mapfolding-0.18.0.dist-info/RECORD +305 -0
- {mapfolding-0.17.1.dist-info → mapfolding-0.18.0.dist-info}/WHEEL +1 -1
- easyRun/eliminateFolds.py +0 -60
- mapFolding/algorithms/constraintPropagation.py +0 -184
- mapFolding/algorithms/elimination.py +0 -131
- mapFolding/algorithms/eliminationCount.py +0 -26
- mapFolding/algorithms/eliminationPinned.py +0 -35
- mapFolding/algorithms/iff.py +0 -206
- mapFolding/algorithms/patternFinder.py +0 -280
- mapFolding/algorithms/pinning2Dn.py +0 -345
- mapFolding/algorithms/pinning2DnAnnex.py +0 -43
- mapFolding/tests/verify.py +0 -323
- mapfolding-0.17.1.dist-info/RECORD +0 -112
- {mapfolding-0.17.1.dist-info → mapfolding-0.18.0.dist-info}/entry_points.txt +0 -0
- {mapfolding-0.17.1.dist-info → mapfolding-0.18.0.dist-info}/licenses/LICENSE +0 -0
- {mapfolding-0.17.1.dist-info → mapfolding-0.18.0.dist-info}/top_level.txt +0 -0
mapFolding/_theTypes.py
CHANGED
|
@@ -5,15 +5,52 @@ from numpy import dtype, int_ as numpy_int, integer, ndarray, uint64 as numpy_ui
|
|
|
5
5
|
from types import EllipsisType
|
|
6
6
|
from typing import Any, Final, NamedTuple, TypeAlias, TypedDict, TypeVar
|
|
7
7
|
|
|
8
|
+
#======== Metadata management for OEIS sequences =======
|
|
9
|
+
|
|
10
|
+
class MetadataOEISidMapFoldingManuallySet(TypedDict):
|
|
11
|
+
"""Settings that are best selected by a human instead of algorithmically."""
|
|
12
|
+
|
|
13
|
+
getMapShape: Callable[[int], tuple[int, ...]]
|
|
14
|
+
"""Function to convert the OEIS sequence index, 'n', to its `mapShape` tuple."""
|
|
15
|
+
|
|
16
|
+
class MetadataOEISidMapFolding(TypedDict):
|
|
17
|
+
"""Settings for an OEIS ID that may be computed by a multidimensional map folding algorithm."""
|
|
18
|
+
|
|
19
|
+
description: str
|
|
20
|
+
"""The OEIS.org description of the integer sequence."""
|
|
21
|
+
getMapShape: Callable[[int], tuple[int, ...]]
|
|
22
|
+
"""Function to convert the OEIS sequence index, 'n', to its `mapShape` tuple."""
|
|
23
|
+
offset: int
|
|
24
|
+
"""The starting index, 'n', of the sequence, typically 0 or 1."""
|
|
25
|
+
valuesKnown: dict[int, int]
|
|
26
|
+
"""Dictionary of sequence indices, 'n', to their known values, `foldsTotal`."""
|
|
27
|
+
valueUnknown: int
|
|
28
|
+
"""The smallest value of 'n' for for which `foldsTotal` is unknown."""
|
|
29
|
+
|
|
30
|
+
class MetadataOEISidManuallySet(TypedDict, total=False):
|
|
31
|
+
"""Placeholder for future manually curated OEIS metadata."""
|
|
32
|
+
|
|
33
|
+
class MetadataOEISid(TypedDict):
|
|
34
|
+
"""Settings for an implemented OEIS sequence."""
|
|
35
|
+
|
|
36
|
+
description: str
|
|
37
|
+
"""The OEIS.org description of the integer sequence."""
|
|
38
|
+
offset: int
|
|
39
|
+
"""The starting index, 'n', of the sequence, typically 0 or 1."""
|
|
40
|
+
valuesKnown: dict[int, int]
|
|
41
|
+
"""Dictionary of sequence indices, 'n', to their known values, `foldsTotal`."""
|
|
42
|
+
valueUnknown: int
|
|
43
|
+
"""The smallest value of 'n' for for which `foldsTotal` is unknown."""
|
|
44
|
+
|
|
45
|
+
#======== `TypeVar` indicates when a NumPy integer type is mandatory =======
|
|
46
|
+
|
|
8
47
|
NumPyIntegerType = TypeVar('NumPyIntegerType', bound=integer[Any], covariant=True)
|
|
9
48
|
"""Any NumPy integer type, which is usually between 8-bit signed and 64-bit unsigned."""
|
|
10
49
|
|
|
50
|
+
#======== Flexible `TypeAlias` for granular control over fixed-width integers =======
|
|
11
51
|
DatatypeLeavesTotal: TypeAlias = int # noqa: UP040 The TypeAlias may be used to construct ("cast") a value to the type. And the identifier may be changed to a different type.
|
|
12
52
|
"""Use on unsigned integers that will never exceed the magnitude of `leavesTotal`."""
|
|
13
53
|
|
|
14
|
-
NumPyLeavesTotal: TypeAlias = numpy_int # noqa: UP040 The TypeAlias may be used to construct ("cast") a value to the type. And the identifier may be changed to a different type.
|
|
15
|
-
"""Use in NumPy data structures whose elements are unsigned integers that will never exceed the magnitude of `leavesTotal`."""
|
|
16
|
-
|
|
17
54
|
DatatypeElephino: TypeAlias = int # noqa: UP040 The TypeAlias may be used to construct ("cast") a value to the type. And the identifier may be changed to a different type.
|
|
18
55
|
"""Use on unsigned integers that will exceed the magnitude of `leavesTotal` but that are not "colossal."
|
|
19
56
|
|
|
@@ -27,12 +64,17 @@ Colossal values are found with the cross humpy inequality:
|
|
|
27
64
|
|
|
28
65
|
"""
|
|
29
66
|
|
|
30
|
-
NumPyElephino: TypeAlias = numpy_int # noqa: UP040 The TypeAlias may be used to construct ("cast") a value to the type. And the identifier may be changed to a different type.
|
|
31
|
-
"""Use in NumPy data structures whose elements are unsigned integers that might exceed the magnitude of `leavesTotal` but that are not 'colossal.'"""
|
|
32
|
-
|
|
33
67
|
DatatypeFoldsTotal: TypeAlias = int # noqa: UP040 The TypeAlias may be used to construct ("cast") a value to the type. And the identifier may be changed to a different type.
|
|
34
68
|
"""Use on unsigned integers that might have colossal magnitudes similar to `foldsTotal`."""
|
|
35
69
|
|
|
70
|
+
#-------- Additional `TypeAlias` with NumPy types as their default ----------
|
|
71
|
+
|
|
72
|
+
NumPyLeavesTotal: TypeAlias = numpy_int # noqa: UP040 The TypeAlias may be used to construct ("cast") a value to the type. And the identifier may be changed to a different type.
|
|
73
|
+
"""Use in NumPy data structures whose elements are unsigned integers that will never exceed the magnitude of `leavesTotal`."""
|
|
74
|
+
|
|
75
|
+
NumPyElephino: TypeAlias = numpy_int # noqa: UP040 The TypeAlias may be used to construct ("cast") a value to the type. And the identifier may be changed to a different type.
|
|
76
|
+
"""Use in NumPy data structures whose elements are unsigned integers that might exceed the magnitude of `leavesTotal` but that are not 'colossal.'"""
|
|
77
|
+
|
|
36
78
|
NumPyFoldsTotal: TypeAlias = numpy_uint64 # noqa: UP040 The TypeAlias may be used to construct ("cast") a value to the type. And the identifier may be changed to a different type.
|
|
37
79
|
"""Use in NumPy data structures whose elements are unsigned integers that might have colossal magnitudes similar to `foldsTotal`.
|
|
38
80
|
|
|
@@ -41,6 +83,9 @@ Note well
|
|
|
41
83
|
If your element values might exceed 1.8 x 10^19, then you should take extra steps to ensure the integrity of the data in NumPy or use a
|
|
42
84
|
different data structure."""
|
|
43
85
|
|
|
86
|
+
#-------- Yet more `TypeAlias` with NumPy `ndarray` types ----------
|
|
87
|
+
# Reminder: you can override the types with anything you want, not just `ndarray`. See, e.g., `makeJobTheorem2Numba`.
|
|
88
|
+
|
|
44
89
|
Array3DLeavesTotal: TypeAlias = ndarray[tuple[int, int, int], dtype[NumPyLeavesTotal]] # noqa: UP040 The TypeAlias may be used to construct ("cast") a value to the type. And the identifier may be changed to a different type.
|
|
45
90
|
"""A `numpy.ndarray` with three axes and elements of type `NumPyLeavesTotal`."""
|
|
46
91
|
|
|
@@ -56,67 +101,7 @@ Array1DElephino: TypeAlias = ndarray[tuple[int], dtype[NumPyElephino]] # noqa:
|
|
|
56
101
|
Array1DFoldsTotal: TypeAlias = ndarray[tuple[int], dtype[NumPyFoldsTotal]] # noqa: UP040 The TypeAlias may be used to construct ("cast") a value to the type. And the identifier may be changed to a different type.
|
|
57
102
|
"""A `numpy.ndarray` with one axis and elements of type `NumPyFoldsTotal`."""
|
|
58
103
|
|
|
59
|
-
|
|
60
|
-
"""Settings that are best selected by a human instead of algorithmically."""
|
|
61
|
-
|
|
62
|
-
getMapShape: Callable[[int], tuple[int, ...]]
|
|
63
|
-
"""Function to convert the OEIS sequence index, 'n', to its `mapShape` tuple."""
|
|
64
|
-
valuesBenchmark: list[int]
|
|
65
|
-
"""List of index values, 'n', to use when benchmarking the algorithm performance."""
|
|
66
|
-
valuesTestParallelization: list[int]
|
|
67
|
-
"""List of index values, 'n', to use when testing parallelization performance."""
|
|
68
|
-
valuesTestValidation: list[int]
|
|
69
|
-
"""List of index values, 'n', to use when testing validation performance."""
|
|
70
|
-
|
|
71
|
-
class MetadataOEISidMapFolding(TypedDict):
|
|
72
|
-
"""Settings for an OEIS ID that may be computed by a multidimensional map folding algorithm."""
|
|
73
|
-
|
|
74
|
-
description: str
|
|
75
|
-
"""The OEIS.org description of the integer sequence."""
|
|
76
|
-
getMapShape: Callable[[int], tuple[int, ...]]
|
|
77
|
-
"""Function to convert the OEIS sequence index, 'n', to its `mapShape` tuple."""
|
|
78
|
-
offset: int
|
|
79
|
-
"""The starting index, 'n', of the sequence, typically 0 or 1."""
|
|
80
|
-
valuesBenchmark: list[int]
|
|
81
|
-
"""List of index values, 'n', to use when benchmarking the algorithm performance."""
|
|
82
|
-
valuesKnown: dict[int, int]
|
|
83
|
-
"""Dictionary of sequence indices, 'n', to their known values, `foldsTotal`."""
|
|
84
|
-
valuesTestParallelization: list[int]
|
|
85
|
-
"""List of index values, 'n', to use when testing parallelization performance."""
|
|
86
|
-
valuesTestValidation: list[int]
|
|
87
|
-
"""List of index values, 'n', to use when testing validation performance."""
|
|
88
|
-
valueUnknown: int
|
|
89
|
-
"""The smallest value of 'n' for for which `foldsTotal` is unknown."""
|
|
90
|
-
|
|
91
|
-
# ruff: noqa: ERA001
|
|
92
|
-
class MetadataOEISidManuallySet(TypedDict):
|
|
93
|
-
"""Settings that are best selected by a human instead of algorithmically."""
|
|
94
|
-
|
|
95
|
-
# valuesBenchmark: list[int]
|
|
96
|
-
"""List of index values, 'n', to use when benchmarking the algorithm performance."""
|
|
97
|
-
# valuesTestParallelization: list[int]
|
|
98
|
-
"""List of index values, 'n', to use when testing parallelization performance."""
|
|
99
|
-
valuesTestValidation: list[int]
|
|
100
|
-
"""List of index values, 'n', to use when testing validation performance."""
|
|
101
|
-
|
|
102
|
-
class MetadataOEISid(TypedDict):
|
|
103
|
-
"""Settings for an implemented OEIS sequence."""
|
|
104
|
-
|
|
105
|
-
description: str
|
|
106
|
-
"""The OEIS.org description of the integer sequence."""
|
|
107
|
-
offset: int
|
|
108
|
-
"""The starting index, 'n', of the sequence, typically 0 or 1."""
|
|
109
|
-
# valuesBenchmark: list[int]
|
|
110
|
-
"""List of index values, 'n', to use when benchmarking the algorithm performance."""
|
|
111
|
-
valuesKnown: dict[int, int]
|
|
112
|
-
"""Dictionary of sequence indices, 'n', to their known values, `foldsTotal`."""
|
|
113
|
-
# valuesTestParallelization: list[int]
|
|
114
|
-
"""List of index values, 'n', to use when testing parallelization performance."""
|
|
115
|
-
valuesTestValidation: list[int]
|
|
116
|
-
"""List of index values, 'n', to use when testing validation performance."""
|
|
117
|
-
valueUnknown: int
|
|
118
|
-
"""The smallest value of 'n' for for which `foldsTotal` is unknown."""
|
|
119
|
-
|
|
104
|
+
#======== Managing data structures in `matrixMeandersNumPyndas` algorithm =======
|
|
120
105
|
# TODO Figure out how to have a SSOT for the axis order.
|
|
121
106
|
axisOfLength: Final[int] = 0
|
|
122
107
|
|
|
@@ -327,10 +327,10 @@ def countNumPy(state: MatrixMeandersNumPyState) -> MatrixMeandersNumPyState:
|
|
|
327
327
|
state.boundary -= 1
|
|
328
328
|
state.setMAXIMUMarcCode()
|
|
329
329
|
|
|
330
|
-
|
|
330
|
+
#================ analyze aligned ===== if bitsAlpha > 1 and bitsZulu > 1 =============================================
|
|
331
331
|
# NOTE In other versions, this analysis step is last because I modify the data. In this version, I don't modify the data.
|
|
332
332
|
arrayBitsAlpha: NDArray[numpy.uint64] = bitwise_and(state.arrayArcCodes, state.bitsLocator) # NOTE extra array
|
|
333
|
-
|
|
333
|
+
#======== > * > bitsAlpha 1 bitsZulu 1 ====================
|
|
334
334
|
greater(arrayBitsAlpha, 1, out=prepArea)
|
|
335
335
|
bitsZuluStack: NDArray[numpy.uint64] = makeStorage(state.arrayArcCodes, state, arrayAnalyzed, indexCrossings)
|
|
336
336
|
bitwise_right_shift(bitsZuluStack, 1, out=bitsZuluStack) # O indexArcCode X indexCrossings
|
|
@@ -339,7 +339,7 @@ def countNumPy(state: MatrixMeandersNumPyState) -> MatrixMeandersNumPyState:
|
|
|
339
339
|
greater(prepArea, 1, out=prepArea)
|
|
340
340
|
selectorGreaterThan1: NDArray[numpy.uint64] = makeStorage(prepArea, state, arrayAnalyzed, indexArcCode)
|
|
341
341
|
# X indexArcCode X indexCrossings
|
|
342
|
-
|
|
342
|
+
#======== if bitsAlphaAtEven and not bitsZuluAtEven ======= #======== ^ & | ^ & bitsZulu 1 1 bitsAlpha 1 1 ============
|
|
343
343
|
bitwise_and(bitsZuluStack, 1, out=prepArea)
|
|
344
344
|
del bitsZuluStack # X indexArcCode O indexCrossings
|
|
345
345
|
bitwise_xor(prepArea, 1, out=prepArea)
|
|
@@ -353,7 +353,7 @@ def countNumPy(state: MatrixMeandersNumPyState) -> MatrixMeandersNumPyState:
|
|
|
353
353
|
arrayBitsAlpha[selectorAlignAlpha] = flipTheExtra_0b1AsUfunc(arrayBitsAlpha[selectorAlignAlpha])
|
|
354
354
|
del selectorAlignAlpha # X indexArcCode O indexCrossings
|
|
355
355
|
|
|
356
|
-
|
|
356
|
+
#======== if bitsZuluAtEven and not bitsAlphaAtEven ======= #======== ^ & | ^ & bitsAlpha 1 1 bitsZulu 1 1 ============
|
|
357
357
|
bitsAlphaStack: NDArray[numpy.uint64] = makeStorage(state.arrayArcCodes, state, arrayAnalyzed, indexCrossings)
|
|
358
358
|
bitwise_and(bitsAlphaStack, state.bitsLocator, out=bitsAlphaStack)
|
|
359
359
|
bitwise_and(bitsAlphaStack, 1, out=prepArea)
|
|
@@ -370,7 +370,7 @@ def countNumPy(state: MatrixMeandersNumPyState) -> MatrixMeandersNumPyState:
|
|
|
370
370
|
bitwise_and(selectorGreaterThan1, prepArea, out=prepArea)
|
|
371
371
|
selectorAlignZulu: NDArray[numpy.intp] = makeStorage(numpy.flatnonzero(prepArea), state, arrayAnalyzed, indexCrossings)
|
|
372
372
|
# X indexArcCode X indexCrossings
|
|
373
|
-
|
|
373
|
+
#======== bitsAlphaAtEven or bitsZuluAtEven =============== #======== ^ & & bitsAlpha 1 bitsZulu 1 ====================
|
|
374
374
|
bitwise_and(state.arrayArcCodes, state.bitsLocator, out=prepArea)
|
|
375
375
|
bitwise_and(prepArea, 1, out=prepArea)
|
|
376
376
|
sherpaBitsZulu: NDArray[numpy.uint64] = bitwise_right_shift(state.arrayArcCodes, 1) # NOTE 2° extra array
|
|
@@ -392,7 +392,7 @@ def countNumPy(state: MatrixMeandersNumPyState) -> MatrixMeandersNumPyState:
|
|
|
392
392
|
|
|
393
393
|
bitsZuluStack: NDArray[numpy.uint64] = makeStorage(prepArea, state, arrayAnalyzed, indexCrossings)
|
|
394
394
|
|
|
395
|
-
|
|
395
|
+
#======== (bitsZulu >> 2 << 3 | bitsAlpha) >> 2 =========== #======== >> | << >> bitsZulu 2 3 bitsAlpha 2 =============
|
|
396
396
|
bitwise_right_shift(bitsZuluStack, 2, out=prepArea)
|
|
397
397
|
del bitsZuluStack # X indexArcCode O indexCrossings
|
|
398
398
|
bitwise_left_shift(prepArea, 3, out=prepArea)
|
|
@@ -405,10 +405,10 @@ def countNumPy(state: MatrixMeandersNumPyState) -> MatrixMeandersNumPyState:
|
|
|
405
405
|
|
|
406
406
|
state = recordAnalysis(arrayAnalyzed, state, prepArea)
|
|
407
407
|
|
|
408
|
-
|
|
408
|
+
#------------------ analyze bitsAlpha ------- (1 - (bitsAlpha & 1)) << 1 | bitsAlpha >> 2 | bitsZulu << 3 ---------
|
|
409
409
|
bitsAlphaStack: NDArray[numpy.uint64] = makeStorage(state.arrayArcCodes, state, arrayAnalyzed, indexArcCode)
|
|
410
410
|
bitwise_and(bitsAlphaStack, state.bitsLocator, out=bitsAlphaStack) # X indexArcCode O indexCrossings
|
|
411
|
-
|
|
411
|
+
#-------- >> | << | (<< - 1 & bitsAlpha 1 1) << bitsZulu 3 2 bitsAlpha 2 ----------
|
|
412
412
|
bitwise_and(bitsAlphaStack, 1, out=bitsAlphaStack)
|
|
413
413
|
subtract(1, bitsAlphaStack, out=bitsAlphaStack)
|
|
414
414
|
bitwise_left_shift(bitsAlphaStack, 1, out=bitsAlphaStack)
|
|
@@ -425,7 +425,7 @@ def countNumPy(state: MatrixMeandersNumPyState) -> MatrixMeandersNumPyState:
|
|
|
425
425
|
bitwise_or(bitsAlphaStack, prepArea, out=prepArea)
|
|
426
426
|
bitwise_right_shift(prepArea, 2, out=prepArea)
|
|
427
427
|
|
|
428
|
-
|
|
428
|
+
#-------- if bitsAlpha > 1 ------------ > bitsAlpha 1 -----
|
|
429
429
|
less_equal(bitsAlphaStack, 1, out=bitsAlphaStack)
|
|
430
430
|
selectorUnderLimit: NDArray[numpy.intp] = makeStorage(numpy.flatnonzero(bitsAlphaStack), state, arrayAnalyzed, indexArcCode)
|
|
431
431
|
del bitsAlphaStack # X indexArcCode O indexCrossings
|
|
@@ -434,11 +434,11 @@ def countNumPy(state: MatrixMeandersNumPyState) -> MatrixMeandersNumPyState:
|
|
|
434
434
|
|
|
435
435
|
state = recordAnalysis(arrayAnalyzed, state, prepArea)
|
|
436
436
|
|
|
437
|
-
|
|
437
|
+
#------------------ analyze bitsZulu ---------- (1 - (bitsZulu & 1)) | bitsAlpha << 2 | bitsZulu >> 1 -------------
|
|
438
438
|
arrayBitsZulu: NDArray[numpy.uint64] = makeStorage(state.arrayArcCodes, state, arrayAnalyzed, indexCrossings)
|
|
439
439
|
arrayBitsZulu = bitwise_right_shift(arrayBitsZulu, 1) # O indexArcCode X indexCrossings
|
|
440
440
|
arrayBitsZulu = bitwise_and(arrayBitsZulu, state.bitsLocator)
|
|
441
|
-
|
|
441
|
+
#-------- >> | << | (- 1 & bitsZulu 1) << bitsAlpha 2 1 bitsZulu 1 ----------
|
|
442
442
|
bitwise_and(arrayBitsZulu, 1, out=arrayBitsZulu)
|
|
443
443
|
subtract(1, arrayBitsZulu, out=arrayBitsZulu)
|
|
444
444
|
bitsAlphaStack: NDArray[numpy.uint64] = makeStorage(state.arrayArcCodes, state, arrayAnalyzed, indexArcCode)
|
|
@@ -454,7 +454,7 @@ def countNumPy(state: MatrixMeandersNumPyState) -> MatrixMeandersNumPyState:
|
|
|
454
454
|
bitwise_or(bitsZuluStack, prepArea, out=prepArea)
|
|
455
455
|
bitwise_right_shift(prepArea, 1, out=prepArea)
|
|
456
456
|
|
|
457
|
-
|
|
457
|
+
#-------- if bitsZulu > 1 ------------- > bitsZulu 1 ------
|
|
458
458
|
less_equal(bitsZuluStack, 1, out=bitsZuluStack)
|
|
459
459
|
selectorUnderLimit = makeStorage(numpy.flatnonzero(bitsZuluStack), state, arrayAnalyzed, indexArcCode)
|
|
460
460
|
del bitsZuluStack # X indexArcCode O indexCrossings
|
|
@@ -463,11 +463,11 @@ def countNumPy(state: MatrixMeandersNumPyState) -> MatrixMeandersNumPyState:
|
|
|
463
463
|
|
|
464
464
|
state = recordAnalysis(arrayAnalyzed, state, prepArea)
|
|
465
465
|
|
|
466
|
-
|
|
466
|
+
#------------------ analyze simple ------------------------ (bitsZulu << 1 | bitsAlpha) << 2 | 3 ------------------
|
|
467
467
|
bitsZuluStack: NDArray[numpy.uint64] = makeStorage(state.arrayArcCodes, state, arrayAnalyzed, indexCrossings)
|
|
468
468
|
bitwise_right_shift(bitsZuluStack, 1, out=bitsZuluStack) # O indexArcCode X indexCrossings
|
|
469
469
|
bitwise_and(bitsZuluStack, state.bitsLocator, out=bitsZuluStack)
|
|
470
|
-
|
|
470
|
+
#-------- | << | bitsAlpha << bitsZulu 1 2 3 --------------
|
|
471
471
|
bitwise_left_shift(bitsZuluStack, 1, out=prepArea)
|
|
472
472
|
del bitsZuluStack # O indexArcCode O indexCrossings
|
|
473
473
|
bitsAlphaStack: NDArray[numpy.uint64] = makeStorage(state.arrayArcCodes, state, arrayAnalyzed, indexArcCode)
|
|
@@ -480,7 +480,7 @@ def countNumPy(state: MatrixMeandersNumPyState) -> MatrixMeandersNumPyState:
|
|
|
480
480
|
state = recordAnalysis(arrayAnalyzed, state, prepArea)
|
|
481
481
|
|
|
482
482
|
del prepArea, arrayPrepArea
|
|
483
|
-
|
|
483
|
+
#------------------------------------------------ aggregation ---------------------------------------------------------
|
|
484
484
|
state.arrayArcCodes = numpy.zeros((0,), dtype=state.datatypeArcCode)
|
|
485
485
|
arrayAnalyzed.resize((state.indexTarget, indicesAnalyzed))
|
|
486
486
|
|
|
@@ -536,7 +536,7 @@ def countPandas(state: MatrixMeandersNumPyState) -> MatrixMeandersNumPyState:
|
|
|
536
536
|
arcCode = (bitsAlpha >> 2) | ((bitsZulu >> 2) << 1)
|
|
537
537
|
```
|
|
538
538
|
"""
|
|
539
|
-
|
|
539
|
+
#--------- Step 1 drop unqualified rows ---------------------------
|
|
540
540
|
dataframeMeanders['analyzed'] = dataframeMeanders['arcCode'].copy()
|
|
541
541
|
dataframeMeanders['analyzed'] &= state.bitsLocator # `bitsAlpha`
|
|
542
542
|
|
|
@@ -565,7 +565,7 @@ def countPandas(state: MatrixMeandersNumPyState) -> MatrixMeandersNumPyState:
|
|
|
565
565
|
|
|
566
566
|
dataframeMeanders = dataframeMeanders.loc[(dataframeMeanders['analyzed'] > 0)] # `if (bitsAlphaIsEven or bitsZuluIsEven)`
|
|
567
567
|
|
|
568
|
-
|
|
568
|
+
#-------- Step 2 modify rows --------------------------------------
|
|
569
569
|
# Make a selector for bitsZuluAtOdd, so you can modify bitsAlpha
|
|
570
570
|
dataframeMeanders.loc[:, 'analyzed'] = dataframeMeanders['arcCode'].copy()
|
|
571
571
|
dataframeMeanders.loc[:, 'analyzed'] //= 2**1 # Truncated conversion to `bitsZulu`
|
|
@@ -586,7 +586,7 @@ def countPandas(state: MatrixMeandersNumPyState) -> MatrixMeandersNumPyState:
|
|
|
586
586
|
dataframeMeanders.loc[((dataframeMeanders.loc[:, 'arcCode'] & 1) > 0), 'analyzed'] = state.datatypeArcCode(
|
|
587
587
|
flipTheExtra_0b1AsUfunc(dataframeMeanders.loc[((dataframeMeanders.loc[:, 'arcCode'] & 1) > 0), 'analyzed']))
|
|
588
588
|
|
|
589
|
-
|
|
589
|
+
#--------- Step 3 compute `arcCode` -------------------------------
|
|
590
590
|
dataframeMeanders.loc[:, 'analyzed'] //= 2**2 # (bitsZulu >> 2)
|
|
591
591
|
dataframeMeanders.loc[:, 'analyzed'] *= 2**3 # (... << 3)
|
|
592
592
|
dataframeMeanders.loc[:, 'analyzed'] |= bitsTarget # (... | bitsAlpha)
|
|
@@ -7,7 +7,7 @@ TODO A301620 a(n) = Sum_{k=3..floor((n+3)/2)} (A259689(n+1,k)*(k-2)). - _Roger F
|
|
|
7
7
|
NOTE: This is a generated file; edit the source file.
|
|
8
8
|
"""
|
|
9
9
|
from functools import cache
|
|
10
|
-
from mapFolding import dictionaryOEIS
|
|
10
|
+
from mapFolding import dictionaryOEIS, inclusive
|
|
11
11
|
from mapFolding.basecamp import NOTcountingFolds
|
|
12
12
|
|
|
13
13
|
@cache
|
|
@@ -67,7 +67,7 @@ def A001010(n: int) -> int:
|
|
|
67
67
|
"""
|
|
68
68
|
Compute A001010(n) as a function of A000682 or A007822.
|
|
69
69
|
|
|
70
|
-
*The On-Line Encyclopedia of Integer Sequences* (OEIS) description of A001010 is: "Number of symmetric foldings of a strip of n stamps."
|
|
70
|
+
*The On-Line Encyclopedia of Integer Sequences* (OEIS) description of A001010 is: "Number of symmetric foldings of a strip of n blank stamps."
|
|
71
71
|
|
|
72
72
|
The domain of A001010 starts at 1, therefore for values of `n` < 1, a(n) is undefined. The smallest value of n for which a(n)
|
|
73
73
|
has not yet been computed is 53.
|
|
@@ -80,7 +80,7 @@ def A001010(n: int) -> int:
|
|
|
80
80
|
Returns
|
|
81
81
|
-------
|
|
82
82
|
a(n) : int
|
|
83
|
-
Number of symmetric foldings of a strip of n stamps.
|
|
83
|
+
Number of symmetric foldings of a strip of n blank stamps.
|
|
84
84
|
|
|
85
85
|
Would You Like to Know More?
|
|
86
86
|
----------------------------
|
|
@@ -270,7 +270,7 @@ def A178961(n: int) -> int:
|
|
|
270
270
|
"""
|
|
271
271
|
A001010valuesKnown: dict[int, int] = dictionaryOEIS['A001010']['valuesKnown']
|
|
272
272
|
countTotal: int = 0
|
|
273
|
-
for n下i in range(1, n +
|
|
273
|
+
for n下i in range(1, n + inclusive):
|
|
274
274
|
countTotal += A001010valuesKnown[n下i]
|
|
275
275
|
return countTotal
|
|
276
276
|
|
|
@@ -5,7 +5,7 @@ TODO A223094 For n >= 3: a(n) = n! - Sum_{k=3..n-1} (a(k)*n!/k!) - A000682(n+1).
|
|
|
5
5
|
TODO A301620 a(n) = Sum_{k=3..floor((n+3)/2)} (A259689(n+1,k)*(k-2)). - _Roger Ford_, Dec 10 2018
|
|
6
6
|
"""
|
|
7
7
|
from functools import cache
|
|
8
|
-
from mapFolding import dictionaryOEIS
|
|
8
|
+
from mapFolding import dictionaryOEIS, inclusive
|
|
9
9
|
from mapFolding.basecamp import NOTcountingFolds
|
|
10
10
|
|
|
11
11
|
# ruff: noqa: D400
|
|
@@ -72,7 +72,7 @@ def A178961(n: int) -> int:
|
|
|
72
72
|
"""A001010"""
|
|
73
73
|
A001010valuesKnown: dict[int, int] = dictionaryOEIS['A001010']['valuesKnown']
|
|
74
74
|
countTotal: int = 0
|
|
75
|
-
for n下i in range(1, n+
|
|
75
|
+
for n下i in range(1, n + inclusive):
|
|
76
76
|
countTotal += A001010valuesKnown[n下i]
|
|
77
77
|
return countTotal
|
|
78
78
|
|
|
@@ -92,7 +92,7 @@ def A301620(n: int) -> int:
|
|
|
92
92
|
"""A000682"""
|
|
93
93
|
return _A000682(n + 2) - 2 * _A000682(n + 1)
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
#================== Not formulas ==========================
|
|
96
96
|
|
|
97
97
|
@cache
|
|
98
98
|
def _A000682(n: int) -> int:
|
mapFolding/basecamp.py
CHANGED
|
@@ -8,7 +8,7 @@ from pathlib import Path, PurePath
|
|
|
8
8
|
from typing import Literal
|
|
9
9
|
|
|
10
10
|
# ruff: noqa: PLC0415
|
|
11
|
-
"""TODO new flow paradigm, incomplete
|
|
11
|
+
"""# TODO new flow paradigm, incomplete
|
|
12
12
|
|
|
13
13
|
- I don't want to FORCE people to use the meaningless OEIS ids without providing the definition of the ID at the same time.
|
|
14
14
|
- On the other hand, I don't have any evidence that anyone is using this package except me.
|
|
@@ -128,7 +128,7 @@ def countFolds(listDimensions: Sequence[int] | None = None
|
|
|
128
128
|
computation time. If logicalCores >= `leavesTotal`, it will probably be faster. If logicalCores <= 2 * `leavesTotal`, it
|
|
129
129
|
will almost certainly be slower for all map dimensions.
|
|
130
130
|
"""
|
|
131
|
-
|
|
131
|
+
#-------- mapShape ---------------------------------------------------------------------
|
|
132
132
|
|
|
133
133
|
if mapShape:
|
|
134
134
|
pass
|
|
@@ -142,11 +142,11 @@ def countFolds(listDimensions: Sequence[int] | None = None
|
|
|
142
142
|
)
|
|
143
143
|
raise ValueError(message)
|
|
144
144
|
|
|
145
|
-
|
|
145
|
+
#-------- task division instructions -----------------------------------------------------
|
|
146
146
|
|
|
147
147
|
if computationDivisions:
|
|
148
|
-
from mapFolding.beDRY import getLeavesTotal, getTaskDivisions
|
|
149
|
-
concurrencyLimit: int =
|
|
148
|
+
from mapFolding.beDRY import defineProcessorLimit, getLeavesTotal, getTaskDivisions
|
|
149
|
+
concurrencyLimit: int = defineProcessorLimit(CPUlimit, packageSettings.concurrencyPackage)
|
|
150
150
|
leavesTotal: int = getLeavesTotal(mapShape)
|
|
151
151
|
taskDivisions: int = getTaskDivisions(computationDivisions, concurrencyLimit, leavesTotal)
|
|
152
152
|
del leavesTotal
|
|
@@ -154,7 +154,7 @@ def countFolds(listDimensions: Sequence[int] | None = None
|
|
|
154
154
|
concurrencyLimit = 1
|
|
155
155
|
taskDivisions = 0
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
#-------- memorialization instructions ---------------------------------------------
|
|
158
158
|
|
|
159
159
|
if pathLikeWriteFoldsTotal is not None:
|
|
160
160
|
pathFilenameFoldsTotal: Path | None = getPathFilenameFoldsTotal(mapShape, pathLikeWriteFoldsTotal)
|
|
@@ -162,7 +162,7 @@ def countFolds(listDimensions: Sequence[int] | None = None
|
|
|
162
162
|
else:
|
|
163
163
|
pathFilenameFoldsTotal = None
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
#-------- Algorithm version -----------------------------------------------------
|
|
166
166
|
if taskDivisions > 1:
|
|
167
167
|
from mapFolding.dataBaskets import ParallelMapFoldingState
|
|
168
168
|
from mapFolding.syntheticModules.countParallelNumba import doTheNeedful
|
|
@@ -174,7 +174,7 @@ def countFolds(listDimensions: Sequence[int] | None = None
|
|
|
174
174
|
|
|
175
175
|
# ruff: noqa: E701
|
|
176
176
|
else:
|
|
177
|
-
if all(dimension
|
|
177
|
+
if all(dimension <= 2 for dimension in mapShape):
|
|
178
178
|
from mapFolding.algorithms.daoOfMapFolding import doTheNeedful
|
|
179
179
|
else:
|
|
180
180
|
match flow:
|
|
@@ -189,76 +189,7 @@ def countFolds(listDimensions: Sequence[int] | None = None
|
|
|
189
189
|
mapFoldingState = doTheNeedful(mapFoldingState)
|
|
190
190
|
foldsTotal = mapFoldingState.foldsTotal
|
|
191
191
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
if pathFilenameFoldsTotal is not None:
|
|
195
|
-
saveFoldsTotal(pathFilenameFoldsTotal, foldsTotal)
|
|
196
|
-
|
|
197
|
-
return foldsTotal
|
|
198
|
-
|
|
199
|
-
def eliminateFolds(mapShape: tuple[int, ...]
|
|
200
|
-
, pathLikeWriteFoldsTotal: PathLike[str] | PurePath | None = None
|
|
201
|
-
# , * # TODO improve `standardizedEqualToCallableReturn` so it will work with keyword arguments
|
|
202
|
-
, CPUlimit: bool | float | int | None = None # noqa: FBT001
|
|
203
|
-
, flow: str | None = None
|
|
204
|
-
) -> int:
|
|
205
|
-
"""
|
|
206
|
-
Compute foldsTotal by elimination.
|
|
207
|
-
|
|
208
|
-
Parameters
|
|
209
|
-
----------
|
|
210
|
-
mapShape : tuple[int, ...] | None = None
|
|
211
|
-
Tuple of integers representing the dimensions of the map to be folded. Mathematicians almost always use the term
|
|
212
|
-
"dimensions", such as in the seminal paper, "Multi-dimensional map-folding". Nevertheless, in contemporary Python
|
|
213
|
-
programming, in the context of these algorithms, the term "shape" makes it much easier to align the mathematics with the
|
|
214
|
-
syntax of the programming language.
|
|
215
|
-
pathLikeWriteFoldsTotal : PathLike[str] | PurePath | None = None
|
|
216
|
-
A filename, a path of only directories, or a path with directories and a filename to which `countFolds` will write the
|
|
217
|
-
value of `foldsTotal`. If `pathLikeWriteFoldsTotal` is a path of only directories, `countFolds` creates a filename based
|
|
218
|
-
on the map dimensions.
|
|
219
|
-
CPUlimit : bool | float | int | None = None
|
|
220
|
-
If relevant, whether and how to limit the number of processors `countFolds` will use.
|
|
221
|
-
- `False`, `None`, or `0`: No limits on processor usage; uses all available processors. All other values will
|
|
222
|
-
potentially limit processor usage.
|
|
223
|
-
- `True`: Yes, limit the processor usage; limits to 1 processor.
|
|
224
|
-
- `int >= 1`: The maximum number of available processors to use.
|
|
225
|
-
- `0 < float < 1`: The maximum number of processors to use expressed as a fraction of available processors.
|
|
226
|
-
- `-1 < float < 0`: The number of processors to *not* use expressed as a fraction of available processors.
|
|
227
|
-
- `int <= -1`: The number of available processors to *not* use.
|
|
228
|
-
- If the value of `CPUlimit` is a `float` greater than 1 or less than -1, `countFolds` truncates the value to an `int`
|
|
229
|
-
with the same sign as the `float`.
|
|
230
|
-
flow : str | None = None
|
|
231
|
-
My stupid way of selecting the version of the algorithm to use in the computation.
|
|
232
|
-
|
|
233
|
-
Returns
|
|
234
|
-
-------
|
|
235
|
-
foldsTotal : int
|
|
236
|
-
Number of distinct ways to fold a map of the given dimensions.
|
|
237
|
-
"""
|
|
238
|
-
from mapFolding.beDRY import setProcessorLimit
|
|
239
|
-
concurrencyLimit: int = setProcessorLimit(CPUlimit, packageSettings.concurrencyPackage)
|
|
240
|
-
|
|
241
|
-
# ------- memorialization instructions ---------------------------------------------
|
|
242
|
-
|
|
243
|
-
if pathLikeWriteFoldsTotal is not None:
|
|
244
|
-
pathFilenameFoldsTotal: Path | None = getPathFilenameFoldsTotal(mapShape, pathLikeWriteFoldsTotal)
|
|
245
|
-
saveFoldsTotalFAILearly(pathFilenameFoldsTotal)
|
|
246
|
-
else:
|
|
247
|
-
pathFilenameFoldsTotal = None
|
|
248
|
-
|
|
249
|
-
# ------- Algorithm version -----------------------------------------------------
|
|
250
|
-
# ruff: noqa: E701
|
|
251
|
-
match flow:
|
|
252
|
-
case 'constraintPropagation': from mapFolding.algorithms.constraintPropagation import doTheNeedful
|
|
253
|
-
case 'pinned': from mapFolding.algorithms.eliminationPinned import doTheNeedful
|
|
254
|
-
case 'elimination' | _: from mapFolding.algorithms.elimination import doTheNeedful
|
|
255
|
-
|
|
256
|
-
from mapFolding.dataBaskets import EliminationState
|
|
257
|
-
eliminationState: EliminationState = EliminationState(mapShape)
|
|
258
|
-
eliminationState = doTheNeedful(eliminationState, concurrencyLimit)
|
|
259
|
-
foldsTotal = eliminationState.foldsTotal
|
|
260
|
-
|
|
261
|
-
# ------- Follow memorialization instructions ---------------------------------------------
|
|
192
|
+
#-------- Follow memorialization instructions ---------------------------------------------
|
|
262
193
|
|
|
263
194
|
if pathFilenameFoldsTotal is not None:
|
|
264
195
|
saveFoldsTotal(pathFilenameFoldsTotal, foldsTotal)
|
|
@@ -338,8 +269,8 @@ def NOTcountingFolds(oeisID: str, oeis_n: int, flow: str | None = None
|
|
|
338
269
|
countTotal = doTheNeedful(state) # pyright: ignore[reportArgumentType]
|
|
339
270
|
case 'A007822':
|
|
340
271
|
mapShape: tuple[Literal[1], int] = (1, 2 * oeis_n)
|
|
341
|
-
from mapFolding import
|
|
342
|
-
concurrencyLimit: int =
|
|
272
|
+
from mapFolding import defineProcessorLimit
|
|
273
|
+
concurrencyLimit: int = defineProcessorLimit(CPUlimit)
|
|
343
274
|
|
|
344
275
|
from mapFolding.dataBaskets import SymmetricFoldsState
|
|
345
276
|
symmetricState: SymmetricFoldsState = SymmetricFoldsState(mapShape)
|