mapFolding 0.17.0__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 +16 -10
- easyRun/__init__.py +1 -0
- easyRun/countFolds.py +17 -9
- easyRun/meanders.py +6 -8
- mapFolding/__init__.py +24 -35
- 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 -68
- mapFolding/algorithms/A086345.py +8 -3
- mapFolding/algorithms/__init__.py +1 -1
- mapFolding/algorithms/matrixMeandersNumPyndas.py +18 -18
- mapFolding/algorithms/oeisIDbyFormula.py +4 -4
- mapFolding/algorithms/zCuzDocStoopidoeisIDbyFormula.py +3 -3
- mapFolding/basecamp.py +13 -28
- mapFolding/beDRY.py +108 -99
- 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 +2 -2
- 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 +133 -88
- 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.0.dist-info → mapfolding-0.18.0.dist-info}/METADATA +15 -9
- mapfolding-0.18.0.dist-info/RECORD +305 -0
- {mapfolding-0.17.0.dist-info → mapfolding-0.18.0.dist-info}/WHEEL +1 -1
- easyRun/A000682.py +0 -25
- easyRun/A005316.py +0 -20
- mapFolding/algorithms/A000136constraintPropagation.py +0 -95
- mapFolding/algorithms/A000136elimination.py +0 -163
- mapFolding/algorithms/A000136eliminationParallel.py +0 -77
- mapfolding-0.17.0.dist-info/RECORD +0 -107
- {mapfolding-0.17.0.dist-info → mapfolding-0.18.0.dist-info}/entry_points.txt +0 -0
- {mapfolding-0.17.0.dist-info → mapfolding-0.18.0.dist-info}/licenses/LICENSE +0 -0
- {mapfolding-0.17.0.dist-info → mapfolding-0.18.0.dist-info}/top_level.txt +0 -0
mapFolding/_e/filters.py
ADDED
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
"""You can use this module to express boolean antecedents and apply antecedents as filters.
|
|
2
|
+
|
|
3
|
+
This module groups small boolean antecedents (predicates) that are convenient to reuse.
|
|
4
|
+
You can use each antecedent in a Python `if` statement, or you can pass an antecedent
|
|
5
|
+
as a predicate argument to a filtering utility such as `filter` [1],
|
|
6
|
+
`cytoolz.dicttoolz.keyfilter` [2], `cytoolz.dicttoolz.itemfilter` [2],
|
|
7
|
+
`cytoolz.dicttoolz.valfilter` [2], `more_itertools.filter_map` [3], or
|
|
8
|
+
`more_itertools.filterfalse` [3].
|
|
9
|
+
|
|
10
|
+
This module also provides a small number of filtering functions that are already
|
|
11
|
+
specialized to the map-folding data structures used by `_e` algorithms.
|
|
12
|
+
|
|
13
|
+
Contents
|
|
14
|
+
--------
|
|
15
|
+
Boolean antecedents
|
|
16
|
+
between
|
|
17
|
+
You can test whether `floor <= comparand <= ceiling`.
|
|
18
|
+
consecutive
|
|
19
|
+
You can test whether the integers in `flatContainer` are consecutive.
|
|
20
|
+
hasDuplicates
|
|
21
|
+
You can test whether `flatContainer` contains duplicate values.
|
|
22
|
+
leafIsInPileRange
|
|
23
|
+
You can test whether a `leaf` is present in `pileRangeOfLeaves`.
|
|
24
|
+
leafIsNotPinned
|
|
25
|
+
You can test whether a `leaf` is absent from `permutationSpace.values()`.
|
|
26
|
+
leafIsPinned
|
|
27
|
+
You can test whether a `leaf` is present in `permutationSpace.values()`.
|
|
28
|
+
mappingHasKey
|
|
29
|
+
You can test whether `key` is present in `lookup`.
|
|
30
|
+
notLeafOriginOrLeaf零
|
|
31
|
+
You can test whether `leaf` is greater than `零`.
|
|
32
|
+
notPileLast
|
|
33
|
+
You can test whether `pile` is not equal to `pileLast`.
|
|
34
|
+
pileIsNotOpen
|
|
35
|
+
You can test whether `permutationSpace[pile]` is a `Leaf`.
|
|
36
|
+
pileIsOpen
|
|
37
|
+
You can test whether `permutationSpace[pile]` is not a `Leaf`.
|
|
38
|
+
thisHasThat
|
|
39
|
+
You can test whether `that` is present in `this`.
|
|
40
|
+
thisIsALeaf
|
|
41
|
+
You can narrow `leafOrPileRangeOfLeaves` to a `Leaf`.
|
|
42
|
+
thisIsAPileRangeOfLeaves
|
|
43
|
+
You can narrow `leafOrPileRangeOfLeaves` to a `PileRangeOfLeaves`.
|
|
44
|
+
|
|
45
|
+
Filter functions
|
|
46
|
+
exclude
|
|
47
|
+
You can yield items from `flatContainer` whose positions are not in `indices`.
|
|
48
|
+
extractPinnedLeaves
|
|
49
|
+
You can extract only `pile: leaf` mappings from a `PermutationSpace`.
|
|
50
|
+
extractPilesWithPileRangeOfLeaves
|
|
51
|
+
You can extract only `pile: pileRangeOfLeaves` mappings from a `PermutationSpace`.
|
|
52
|
+
|
|
53
|
+
References
|
|
54
|
+
----------
|
|
55
|
+
[1] Built-in Functions - `filter` (Python documentation)
|
|
56
|
+
https://docs.python.org/3/library/functions.html#filter
|
|
57
|
+
[2] cytoolz - dicttoolz
|
|
58
|
+
https://toolz.readthedocs.io/en/latest/api.html#module-toolz.dicttoolz
|
|
59
|
+
[3] more-itertools - API Reference
|
|
60
|
+
https://more-itertools.readthedocs.io/en/stable/api.html
|
|
61
|
+
|
|
62
|
+
"""
|
|
63
|
+
from collections.abc import Hashable, Iterable, Iterator, Mapping, Sequence
|
|
64
|
+
from cytoolz.dicttoolz import valfilter as leafFilter
|
|
65
|
+
from cytoolz.functoolz import curry as syntacticCurry
|
|
66
|
+
from gmpy2 import mpz
|
|
67
|
+
from hunterMakesPy import Ordinals
|
|
68
|
+
from mapFolding._e import (
|
|
69
|
+
Leaf, LeafOrPileRangeOfLeaves, PermutationSpace, Pile, PileRangeOfLeaves, PilesWithPileRangeOfLeaves, PinnedLeaves, 零)
|
|
70
|
+
from more_itertools import all_unique as allUnique吗, always_reversible, consecutive_groups, extract
|
|
71
|
+
from typing import Any, overload, TypeGuard
|
|
72
|
+
|
|
73
|
+
#======== Boolean antecedents ================================================
|
|
74
|
+
|
|
75
|
+
@syntacticCurry
|
|
76
|
+
def between[小于: Ordinals](floor: 小于, ceiling: 小于, comparand: 小于) -> bool:
|
|
77
|
+
"""Inclusive `floor <= comparand <= ceiling`."""
|
|
78
|
+
return floor <= comparand <= ceiling
|
|
79
|
+
|
|
80
|
+
def consecutive(flatContainer: Iterable[int]) -> bool:
|
|
81
|
+
"""The integers in the `flatContainer` are consecutive, either ascending or descending."""
|
|
82
|
+
return ((len(list(next(consecutive_groups(flatContainer)))) == len(list(flatContainer)))
|
|
83
|
+
or (len(list(next(consecutive_groups(always_reversible(flatContainer))))) == len(list(flatContainer))))
|
|
84
|
+
|
|
85
|
+
def hasDuplicates(flatContainer: Iterable[Any]) -> bool:
|
|
86
|
+
"""You can test whether `flatContainer` contains duplicate values.
|
|
87
|
+
|
|
88
|
+
You can use `hasDuplicates` in an `if` statement, or you can pass `hasDuplicates` as a
|
|
89
|
+
predicate to a filtering utility described in the module docstring.
|
|
90
|
+
|
|
91
|
+
Parameters
|
|
92
|
+
----------
|
|
93
|
+
flatContainer : Iterable[Any]
|
|
94
|
+
Iterable of values to test for duplicate values.
|
|
95
|
+
|
|
96
|
+
Returns
|
|
97
|
+
-------
|
|
98
|
+
flatContainerHasDuplicates : bool
|
|
99
|
+
`True` if `flatContainer` contains at least one duplicate value.
|
|
100
|
+
|
|
101
|
+
References
|
|
102
|
+
----------
|
|
103
|
+
[1] more-itertools - `all_unique`
|
|
104
|
+
https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.all_unique
|
|
105
|
+
|
|
106
|
+
"""
|
|
107
|
+
return not allUnique吗(flatContainer)
|
|
108
|
+
|
|
109
|
+
@syntacticCurry
|
|
110
|
+
def leafIsInPileRange(leaf: Leaf, pileRangeOfLeaves: PileRangeOfLeaves) -> bool:
|
|
111
|
+
"""You can test whether `leaf` is present in `pileRangeOfLeaves`.
|
|
112
|
+
|
|
113
|
+
You can use `leafIsInPileRange` in an `if` statement, or you can pass `leafIsInPileRange`
|
|
114
|
+
as a predicate to a filtering utility described in the module docstring.
|
|
115
|
+
|
|
116
|
+
Parameters
|
|
117
|
+
----------
|
|
118
|
+
leaf : Leaf
|
|
119
|
+
`leaf` index.
|
|
120
|
+
pileRangeOfLeaves : PileRangeOfLeaves
|
|
121
|
+
Bitset of `leaf` membership for a pile.
|
|
122
|
+
|
|
123
|
+
Returns
|
|
124
|
+
-------
|
|
125
|
+
leafIsPresent : bool
|
|
126
|
+
`True` if `pileRangeOfLeaves` contains `leaf`.
|
|
127
|
+
|
|
128
|
+
References
|
|
129
|
+
----------
|
|
130
|
+
[1] gmpy2 - `mpz` type and methods
|
|
131
|
+
https://gmpy2.readthedocs.io/en/latest/mpz.html
|
|
132
|
+
|
|
133
|
+
"""
|
|
134
|
+
return pileRangeOfLeaves.bit_test(leaf)
|
|
135
|
+
|
|
136
|
+
@syntacticCurry
|
|
137
|
+
def leafIsNotPinned(permutationSpace: PermutationSpace, leaf: Leaf) -> bool:
|
|
138
|
+
"""Return True if `leaf` is not presently pinned in `permutationSpace`.
|
|
139
|
+
|
|
140
|
+
Parameters
|
|
141
|
+
----------
|
|
142
|
+
permutationSpace : PermutationSpace
|
|
143
|
+
Partial folding mapping from pile -> leaf.
|
|
144
|
+
leaf : int
|
|
145
|
+
`leaf` index.
|
|
146
|
+
|
|
147
|
+
Returns
|
|
148
|
+
-------
|
|
149
|
+
leafIsNotPinned : bool
|
|
150
|
+
True if the mapping does not include `leaf`.
|
|
151
|
+
"""
|
|
152
|
+
return leaf not in permutationSpace.values()
|
|
153
|
+
|
|
154
|
+
@overload
|
|
155
|
+
def leafIsPinned(permutationSpace: PermutationSpace, leaf: Leaf) -> bool:...
|
|
156
|
+
@overload
|
|
157
|
+
def leafIsPinned(permutationSpace: PinnedLeaves, leaf: Leaf) -> bool:...
|
|
158
|
+
@syntacticCurry
|
|
159
|
+
def leafIsPinned(permutationSpace: PermutationSpace | PinnedLeaves, leaf: Leaf) -> bool:
|
|
160
|
+
"""Return True if `leaf` is pinned in `permutationSpace`.
|
|
161
|
+
|
|
162
|
+
Parameters
|
|
163
|
+
----------
|
|
164
|
+
permutationSpace : PermutationSpace
|
|
165
|
+
Partial folding mapping from pile -> leaf.
|
|
166
|
+
leaf : int
|
|
167
|
+
`leaf` index.
|
|
168
|
+
|
|
169
|
+
Returns
|
|
170
|
+
-------
|
|
171
|
+
leafIsPinned : bool
|
|
172
|
+
True if the mapping includes `leaf`.
|
|
173
|
+
"""
|
|
174
|
+
return leaf in permutationSpace.values()
|
|
175
|
+
|
|
176
|
+
@syntacticCurry
|
|
177
|
+
def leafIsPinnedAtPile(permutationSpace: PermutationSpace, leaf: Leaf, pile: Pile) -> bool:
|
|
178
|
+
"""Return `True` if `leaf` is presently pinned at `pile` in `permutationSpace`.
|
|
179
|
+
|
|
180
|
+
Parameters
|
|
181
|
+
----------
|
|
182
|
+
permutationSpace : PermutationSpace
|
|
183
|
+
Partial folding mapping from pile -> leaf.
|
|
184
|
+
leaf : int
|
|
185
|
+
`leaf` whose presence at `pile` is being checked.
|
|
186
|
+
pile : int
|
|
187
|
+
`pile` index.
|
|
188
|
+
|
|
189
|
+
Returns
|
|
190
|
+
-------
|
|
191
|
+
leafIsPinnedAtPile : bool
|
|
192
|
+
True if the mapping includes `pile: leaf`.
|
|
193
|
+
"""
|
|
194
|
+
return leaf == permutationSpace.get(pile)
|
|
195
|
+
|
|
196
|
+
@syntacticCurry
|
|
197
|
+
def mappingHasKey[文件: Hashable](lookup: Mapping[文件, Any], key: 文件) -> bool:
|
|
198
|
+
"""Return `True` if `key` is in `lookup`."""
|
|
199
|
+
return key in lookup
|
|
200
|
+
|
|
201
|
+
def notLeafOriginOrLeaf零(leaf: Leaf) -> bool:
|
|
202
|
+
"""You can test whether `leaf` is greater than `零`.
|
|
203
|
+
|
|
204
|
+
You can use `notLeafOriginOrLeaf零` in an `if` statement, or you can pass
|
|
205
|
+
`notLeafOriginOrLeaf零` as a predicate to a filtering utility described in the module
|
|
206
|
+
docstring.
|
|
207
|
+
|
|
208
|
+
Parameters
|
|
209
|
+
----------
|
|
210
|
+
leaf : Leaf
|
|
211
|
+
`leaf` index.
|
|
212
|
+
|
|
213
|
+
Returns
|
|
214
|
+
-------
|
|
215
|
+
leafIsNotOriginOrZero : bool
|
|
216
|
+
`True` if `零 < leaf`.
|
|
217
|
+
|
|
218
|
+
References
|
|
219
|
+
----------
|
|
220
|
+
[1] mapFolding._e.零
|
|
221
|
+
Internal package reference
|
|
222
|
+
|
|
223
|
+
"""
|
|
224
|
+
return 零 < leaf
|
|
225
|
+
|
|
226
|
+
@syntacticCurry
|
|
227
|
+
def notPileLast(pileLast: Pile, pile: Pile) -> bool:
|
|
228
|
+
"""Return True if `pile` is not the last pile.
|
|
229
|
+
|
|
230
|
+
Parameters
|
|
231
|
+
----------
|
|
232
|
+
pileLast : int
|
|
233
|
+
Index of the last pile.
|
|
234
|
+
pile : int
|
|
235
|
+
`pile` index.
|
|
236
|
+
|
|
237
|
+
Returns
|
|
238
|
+
-------
|
|
239
|
+
notPileLast : bool
|
|
240
|
+
True if `pile` is not equal to `pileLast`.
|
|
241
|
+
"""
|
|
242
|
+
return pileLast != pile
|
|
243
|
+
|
|
244
|
+
@syntacticCurry
|
|
245
|
+
def pileIsNotOpen(permutationSpace: PermutationSpace, pile: Pile) -> bool:
|
|
246
|
+
"""Return True if `pile` is not presently pinned in `permutationSpace`.
|
|
247
|
+
|
|
248
|
+
Do you want to know if the pile is open or do you really want to know the Python `type` of the value at that key?
|
|
249
|
+
|
|
250
|
+
Parameters
|
|
251
|
+
----------
|
|
252
|
+
permutationSpace : PermutationSpace
|
|
253
|
+
Partial folding mapping from pile -> leaf.
|
|
254
|
+
pile : int
|
|
255
|
+
`pile` index.
|
|
256
|
+
|
|
257
|
+
Returns
|
|
258
|
+
-------
|
|
259
|
+
pileIsOpen : bool
|
|
260
|
+
True if either `pile` is not a key in `permutationSpace` or `permutationSpace[pile]` is a `PileRangeOfLeaves`.
|
|
261
|
+
|
|
262
|
+
See Also
|
|
263
|
+
--------
|
|
264
|
+
thisIsALeaf, thisIsAPileRangeOfLeaves
|
|
265
|
+
"""
|
|
266
|
+
return thisIsALeaf(permutationSpace.get(pile))
|
|
267
|
+
|
|
268
|
+
@syntacticCurry
|
|
269
|
+
def pileIsOpen(permutationSpace: PermutationSpace, pile: Pile) -> bool:
|
|
270
|
+
"""Return True if `pile` is not presently pinned in `permutationSpace`.
|
|
271
|
+
|
|
272
|
+
Parameters
|
|
273
|
+
----------
|
|
274
|
+
permutationSpace : PermutationSpace
|
|
275
|
+
Partial folding mapping from pile -> leaf.
|
|
276
|
+
pile : int
|
|
277
|
+
`pile` index.
|
|
278
|
+
|
|
279
|
+
Returns
|
|
280
|
+
-------
|
|
281
|
+
pileIsOpen : bool
|
|
282
|
+
True if either `pile` is not a key in `permutationSpace` or `permutationSpace[pile]` is a `PileRangeOfLeaves`.
|
|
283
|
+
"""
|
|
284
|
+
return not thisIsALeaf(permutationSpace.get(pile))
|
|
285
|
+
|
|
286
|
+
@syntacticCurry
|
|
287
|
+
def thisHasThat[个](this: Iterable[个], that: 个) -> bool:
|
|
288
|
+
"""You can test whether `that` is present in `this`.
|
|
289
|
+
|
|
290
|
+
You can use `thisHasThat` in an `if` statement, or you can pass `thisHasThat` as a
|
|
291
|
+
predicate to a filtering utility described in the module docstring.
|
|
292
|
+
|
|
293
|
+
Parameters
|
|
294
|
+
----------
|
|
295
|
+
this : Iterable[个]
|
|
296
|
+
Iterable to search.
|
|
297
|
+
that : 个
|
|
298
|
+
Value to find.
|
|
299
|
+
|
|
300
|
+
Returns
|
|
301
|
+
-------
|
|
302
|
+
thatIsPresent : bool
|
|
303
|
+
`True` if `that in this`.
|
|
304
|
+
|
|
305
|
+
References
|
|
306
|
+
----------
|
|
307
|
+
[1] `operator.contains` (Python documentation)
|
|
308
|
+
https://docs.python.org/3/library/operator.html#operator.contains
|
|
309
|
+
|
|
310
|
+
"""
|
|
311
|
+
return that in this
|
|
312
|
+
|
|
313
|
+
def thisIsALeaf(leafOrPileRangeOfLeaves: LeafOrPileRangeOfLeaves | None) -> TypeGuard[Leaf]:
|
|
314
|
+
"""Return True if `leafOrPileRangeOfLeaves` is a `leaf`.
|
|
315
|
+
|
|
316
|
+
Parameters
|
|
317
|
+
----------
|
|
318
|
+
leafOrPileRangeOfLeaves : LeafOrPileRangeOfLeaves | None
|
|
319
|
+
`leaf`, `pile`-range, or `None` to check.
|
|
320
|
+
|
|
321
|
+
Returns
|
|
322
|
+
-------
|
|
323
|
+
intIsProbablyALeaf : TypeGuard[int]
|
|
324
|
+
Technically, we only know the type is `int`.
|
|
325
|
+
"""
|
|
326
|
+
return (leafOrPileRangeOfLeaves is not None) and isinstance(leafOrPileRangeOfLeaves, int)
|
|
327
|
+
|
|
328
|
+
def thisIsAPileRangeOfLeaves(leafOrPileRangeOfLeaves: LeafOrPileRangeOfLeaves | None) -> TypeGuard[PileRangeOfLeaves]:
|
|
329
|
+
"""Return True if `leafOrPileRangeOfLeaves` is a pile's range of leaves.
|
|
330
|
+
|
|
331
|
+
Parameters
|
|
332
|
+
----------
|
|
333
|
+
leafOrPileRangeOfLeaves : LeafOrPileRangeOfLeaves | None
|
|
334
|
+
`leaf`, `pile`-range, or `None` to check.
|
|
335
|
+
|
|
336
|
+
Returns
|
|
337
|
+
-------
|
|
338
|
+
youHaveAPileRange : TypeGuard[PileRangeOfLeaves]
|
|
339
|
+
Congrats, you have a pile range!
|
|
340
|
+
"""
|
|
341
|
+
return (leafOrPileRangeOfLeaves is not None) and isinstance(leafOrPileRangeOfLeaves, mpz)
|
|
342
|
+
|
|
343
|
+
#======== Filter functions ================================================
|
|
344
|
+
|
|
345
|
+
def exclude[个](flatContainer: Sequence[个], indices: Iterable[int]) -> Iterator[个]:
|
|
346
|
+
"""Yield items from `flatContainer` whose positions are not in `indices`."""
|
|
347
|
+
lengthIterable: int = len(flatContainer)
|
|
348
|
+
def normalizeIndex(index: int) -> int:
|
|
349
|
+
if index < 0:
|
|
350
|
+
index = (index + lengthIterable) % lengthIterable
|
|
351
|
+
return index
|
|
352
|
+
indicesInclude: list[int] = sorted(set(range(lengthIterable)).difference(map(normalizeIndex, indices)))
|
|
353
|
+
return extract(flatContainer, indicesInclude)
|
|
354
|
+
|
|
355
|
+
def extractPinnedLeaves(permutationSpace: PermutationSpace) -> PinnedLeaves:
|
|
356
|
+
"""Create a dictionary *sorted* by `pile` of only `pile: leaf` without `pile: pileRangeOfLeaves`.
|
|
357
|
+
|
|
358
|
+
Parameters
|
|
359
|
+
----------
|
|
360
|
+
permutationSpace : PermutationSpace
|
|
361
|
+
Dictionary of `pile: leaf` and `pile: pileRangeOfLeaves`.
|
|
362
|
+
|
|
363
|
+
Returns
|
|
364
|
+
-------
|
|
365
|
+
dictionaryOfPileLeaf : dict[int, int]
|
|
366
|
+
Dictionary of `pile` with pinned `leaf`, if a `leaf` is pinned at `pile`.
|
|
367
|
+
"""
|
|
368
|
+
return dict(sorted(leafFilter(thisIsALeaf, permutationSpace).items()))
|
|
369
|
+
|
|
370
|
+
def extractPilesWithPileRangeOfLeaves(permutationSpace: PermutationSpace) -> PilesWithPileRangeOfLeaves:
|
|
371
|
+
"""Return a dictionary of all pile-ranges of leaves in `permutationSpace`.
|
|
372
|
+
|
|
373
|
+
Parameters
|
|
374
|
+
----------
|
|
375
|
+
permutationSpace : PermutationSpace
|
|
376
|
+
Dictionary of `pile: leaf` and `pile: pileRangeOfLeaves`.
|
|
377
|
+
|
|
378
|
+
Returns
|
|
379
|
+
-------
|
|
380
|
+
pilesWithPileRangeOfLeaves : dict[int, PileRangeOfLeaves]
|
|
381
|
+
Dictionary of `pile: pileRangeOfLeaves`, if a `pileRangeOfLeaves` is defined at `pile`.
|
|
382
|
+
"""
|
|
383
|
+
return leafFilter(thisIsAPileRangeOfLeaves, permutationSpace)
|
|
384
|
+
|