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.
Files changed (248) hide show
  1. easyRun/NOTcountingFolds.py +7 -11
  2. easyRun/countFolds.py +11 -10
  3. easyRun/meanders.py +6 -8
  4. mapFolding/__init__.py +24 -36
  5. mapFolding/_e/Z0Z_analysisPython/SORTZ0Z_hypothesis.py +189 -0
  6. mapFolding/_e/Z0Z_analysisPython/SORTZ0Z_p2d6.py +143 -0
  7. mapFolding/_e/Z0Z_analysisPython/__init__.py +4 -0
  8. mapFolding/_e/Z0Z_analysisPython/exclusionData/__init__.py +0 -0
  9. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200.py +369 -0
  10. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/2001.py +694 -0
  11. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/270/211.py +514 -0
  12. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/270/2111.py +480 -0
  13. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/272/214.py +511 -0
  14. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/272/2141.py +515 -0
  15. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/272/214/344/270/211.py +485 -0
  16. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/272/214/344/270/2111.py +442 -0
  17. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/211.py +313 -0
  18. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/2111.py +343 -0
  19. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/272/214.py +400 -0
  20. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/272/2141.py +497 -0
  21. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/272/214/344/270/211.py +463 -0
  22. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/272/214/344/270/2111.py +441 -0
  23. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266.py +35 -0
  24. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/2661.py +35 -0
  25. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200.py +382 -0
  26. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/2001.py +630 -0
  27. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/270/211.py +488 -0
  28. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/270/2111.py +475 -0
  29. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/272/214.py +473 -0
  30. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/272/2141.py +500 -0
  31. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211.py +465 -0
  32. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111.py +439 -0
  33. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/211.py +599 -0
  34. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/2111.py +536 -0
  35. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/272/214.py +506 -0
  36. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/272/2141.py +533 -0
  37. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/272/214/344/270/211.py +489 -0
  38. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/272/214/344/270/2111.py +474 -0
  39. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200.py +1186 -0
  40. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/2001.py +2158 -0
  41. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/2001Negative.py +2158 -0
  42. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200Negative.py +1186 -0
  43. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/270/211.py +1397 -0
  44. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/270/2111.py +1291 -0
  45. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/270/2111Negative.py +1291 -0
  46. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/270/211Negative.py +1397 -0
  47. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214.py +1240 -0
  48. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/2141.py +1420 -0
  49. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/2141Negative.py +1420 -0
  50. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214Negative.py +1240 -0
  51. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214/344/270/211.py +1366 -0
  52. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214/344/270/2111.py +1274 -0
  53. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214/344/270/2111Negative.py +1274 -0
  54. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214/344/270/211Negative.py +1366 -0
  55. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/211.py +1186 -0
  56. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/2111.py +1186 -0
  57. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/2111Negative.py +1186 -0
  58. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/211Negative.py +1186 -0
  59. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214.py +1102 -0
  60. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/2141.py +1422 -0
  61. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/2141Negative.py +1422 -0
  62. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214Negative.py +1102 -0
  63. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214/344/270/211.py +1240 -0
  64. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214/344/270/2111.py +1228 -0
  65. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214/344/270/2111Negative.py +1228 -0
  66. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214/344/270/211Negative.py +1240 -0
  67. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266.py +32 -0
  68. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/2661.py +1162 -0
  69. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/2661Negative.py +1162 -0
  70. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266Negative.py +32 -0
  71. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200.py +1186 -0
  72. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/2001.py +1926 -0
  73. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/2001Negative.py +1926 -0
  74. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200Negative.py +1186 -0
  75. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/270/211.py +1291 -0
  76. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/270/2111.py +1176 -0
  77. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/270/2111Negative.py +1176 -0
  78. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/270/211Negative.py +1291 -0
  79. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214.py +1228 -0
  80. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/2141.py +1324 -0
  81. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/2141Negative.py +1324 -0
  82. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214Negative.py +1228 -0
  83. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211.py +1274 -0
  84. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111.py +1038 -0
  85. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111Negative.py +1038 -0
  86. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211Negative.py +1274 -0
  87. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/211.py +2158 -0
  88. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/2111.py +1926 -0
  89. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/2111Negative.py +1926 -0
  90. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/211Negative.py +2158 -0
  91. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214.py +1422 -0
  92. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/2141.py +1364 -0
  93. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/2141Negative.py +1364 -0
  94. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214Negative.py +1422 -0
  95. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214/344/270/211.py +1420 -0
  96. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214/344/270/2111.py +1324 -0
  97. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214/344/270/2111Negative.py +1324 -0
  98. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214/344/270/211Negative.py +1420 -0
  99. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200.py +3133 -0
  100. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/2001.py +6039 -0
  101. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/2001Negative.py +6039 -0
  102. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200Negative.py +3133 -0
  103. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/270/211.py +3527 -0
  104. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/270/2111.py +2300 -0
  105. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/270/2111Negative.py +2300 -0
  106. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/270/211Negative.py +3527 -0
  107. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214.py +3597 -0
  108. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/2141.py +3317 -0
  109. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/2141Negative.py +3317 -0
  110. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214Negative.py +3597 -0
  111. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214/344/270/211.py +3161 -0
  112. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214/344/270/2111.py +2877 -0
  113. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214/344/270/2111Negative.py +2877 -0
  114. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214/344/270/211Negative.py +3161 -0
  115. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/211.py +2981 -0
  116. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/2111.py +3055 -0
  117. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/2111Negative.py +3055 -0
  118. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/211Negative.py +2981 -0
  119. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214.py +3221 -0
  120. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/2141.py +3988 -0
  121. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/2141Negative.py +3988 -0
  122. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214Negative.py +3221 -0
  123. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214/344/270/211.py +3652 -0
  124. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214/344/270/2111.py +2863 -0
  125. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214/344/270/2111Negative.py +2863 -0
  126. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214/344/270/211Negative.py +3652 -0
  127. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200.py +2485 -0
  128. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/2001.py +4566 -0
  129. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/2001Negative.py +4566 -0
  130. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200Negative.py +2485 -0
  131. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/270/211.py +3006 -0
  132. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/270/2111.py +2485 -0
  133. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/270/2111Negative.py +2485 -0
  134. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/270/211Negative.py +3006 -0
  135. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214.py +3304 -0
  136. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/2141.py +3015 -0
  137. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/2141Negative.py +3015 -0
  138. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214Negative.py +3304 -0
  139. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211.py +2939 -0
  140. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111.py +2589 -0
  141. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111Negative.py +2589 -0
  142. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211Negative.py +2939 -0
  143. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/211.py +3899 -0
  144. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/2111.py +2996 -0
  145. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/2111Negative.py +2996 -0
  146. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/211Negative.py +3899 -0
  147. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214.py +3223 -0
  148. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/2141.py +3020 -0
  149. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/2141Negative.py +3020 -0
  150. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214Negative.py +3223 -0
  151. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214/344/270/211.py +3250 -0
  152. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214/344/270/2111.py +2667 -0
  153. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214/344/270/2111Negative.py +2667 -0
  154. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214/344/270/211Negative.py +3250 -0
  155. mapFolding/_e/Z0Z_analysisPython/measure.py +162 -0
  156. mapFolding/_e/Z0Z_analysisPython/positionAnalysis.py +403 -0
  157. mapFolding/_e/Z0Z_analysisPython/positionAnalysisPileRanges2d6.py +110 -0
  158. mapFolding/_e/Z0Z_analysisPython/theExcluderBeast.py +640 -0
  159. mapFolding/_e/Z0Z_analysisPython/toolkit.py +166 -0
  160. mapFolding/_e/Z0Z_analysisPython/toolkitCSVsequences.py +188 -0
  161. mapFolding/_e/Z0Z_analysisPython/workBenchPatternFinder.py +284 -0
  162. mapFolding/_e/Z0Z_notes/__init__.py +0 -0
  163. mapFolding/_e/Z0Z_notes/knowledgeDump.py +214 -0
  164. mapFolding/_e/__init__.py +45 -0
  165. mapFolding/_e/_beDRY.py +547 -0
  166. mapFolding/_e/_dataDynamic.py +1164 -0
  167. mapFolding/_e/_measure.py +579 -0
  168. mapFolding/_e/_semiotics.py +363 -0
  169. mapFolding/_e/_theTypes.py +31 -0
  170. mapFolding/_e/algorithms/__init__.py +1 -0
  171. mapFolding/_e/algorithms/constraintPropagation.py +158 -0
  172. mapFolding/_e/algorithms/elimination.py +118 -0
  173. mapFolding/_e/algorithms/eliminationCrease.py +66 -0
  174. mapFolding/_e/algorithms/iff.py +584 -0
  175. mapFolding/_e/basecamp.py +89 -0
  176. mapFolding/_e/dataBaskets.py +123 -0
  177. mapFolding/_e/dataRaw/__init__.py +0 -0
  178. mapFolding/_e/easyRun/__init__.py +0 -0
  179. mapFolding/_e/easyRun/eliminateFolds.py +72 -0
  180. mapFolding/_e/easyRun/pinning.py +62 -0
  181. mapFolding/_e/filters.py +384 -0
  182. mapFolding/_e/pin2/344/270/212nDimensions.py +882 -0
  183. mapFolding/_e/pin2/344/270/212nDimensionsAnnex.py +551 -0
  184. mapFolding/_e/pin2/344/270/212nDimensionsByCrease.py +190 -0
  185. mapFolding/_e/pin2/344/270/212nDimensionsByDomain.py +459 -0
  186. mapFolding/_e/pinIt.py +436 -0
  187. mapFolding/_semiotics.py +42 -0
  188. mapFolding/_theSSOT.py +11 -56
  189. mapFolding/_theTypes.py +52 -67
  190. mapFolding/algorithms/matrixMeandersNumPyndas.py +18 -18
  191. mapFolding/algorithms/oeisIDbyFormula.py +4 -4
  192. mapFolding/algorithms/zCuzDocStoopidoeisIDbyFormula.py +3 -3
  193. mapFolding/basecamp.py +11 -80
  194. mapFolding/beDRY.py +107 -111
  195. mapFolding/dataBaskets.py +0 -56
  196. mapFolding/filesystemToolkit.py +15 -11
  197. mapFolding/oeis.py +17 -16
  198. mapFolding/reference/matrixMeandersAnalysis/prefixNotationNotes.py +2 -2
  199. mapFolding/reference/meandersDumpingGround/matrixMeandersBaselineV2.py +0 -1
  200. mapFolding/reference/meandersDumpingGround/matrixMeandersNumPyV1finalForm.py +8 -10
  201. mapFolding/someAssemblyRequired/RecipeJob.py +5 -5
  202. mapFolding/someAssemblyRequired/makeJobTheorem2Numba.py +5 -2
  203. mapFolding/someAssemblyRequired/makeJobTheorem2codon.py +9 -11
  204. mapFolding/someAssemblyRequired/mapFoldingModules/makeMapFoldingModules.py +2 -1
  205. mapFolding/someAssemblyRequired/transformationTools.py +1 -1
  206. mapFolding/tests/Z0Z_test_e_excluder.py +155 -0
  207. mapFolding/tests/conftest.py +193 -314
  208. mapFolding/tests/dataSamples/A001417.py +455 -0
  209. mapFolding/tests/dataSamples/__init__.py +1 -0
  210. mapFolding/tests/dataSamples/measurementData.py +1818 -0
  211. mapFolding/tests/dataSamples/p2DnDomain3_2_/351/246/226/344/270/200_/351/246/226/351/233/266/344/270/200.py +17 -0
  212. mapFolding/tests/dataSamples/p2DnDomain3_/351/246/226/344/270/200.py +17 -0
  213. mapFolding/tests/dataSamples/p2DnDomain5_4.py +17 -0
  214. mapFolding/tests/dataSamples/p2DnDomain6_5.py +17 -0
  215. mapFolding/tests/dataSamples/p2DnDomain6_7_5_4.py +17 -0
  216. mapFolding/tests/dataSamples/p2DnDomain7_6.py +17 -0
  217. 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
  218. 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
  219. 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
  220. mapFolding/tests/dataSamples/p2DnDomain/351/246/226/351/233/266/344/272/214_/351/246/226/344/272/214.py +15 -0
  221. mapFolding/tests/dataSamples/semioticsData.py +135 -0
  222. mapFolding/tests/test_computations.py +134 -80
  223. mapFolding/tests/test_e_computations.py +42 -0
  224. mapFolding/tests/test_e_dataDynamic.py +189 -0
  225. mapFolding/tests/test_e_measurements.py +257 -0
  226. mapFolding/tests/test_e_pinning.py +61 -0
  227. mapFolding/tests/test_e_semiotics.py +128 -0
  228. mapFolding/tests/test_filesystem.py +39 -17
  229. mapFolding/tests/{test_other.py → test_parameterValidation.py} +3 -3
  230. mapFolding/tests/{test_tasks.py → test_taskDivisions.py} +42 -23
  231. mapFolding/zCuzDocStoopid/makeDocstrings.py +3 -2
  232. {mapfolding-0.17.1.dist-info → mapfolding-0.18.0.dist-info}/METADATA +11 -8
  233. mapfolding-0.18.0.dist-info/RECORD +305 -0
  234. {mapfolding-0.17.1.dist-info → mapfolding-0.18.0.dist-info}/WHEEL +1 -1
  235. easyRun/eliminateFolds.py +0 -60
  236. mapFolding/algorithms/constraintPropagation.py +0 -184
  237. mapFolding/algorithms/elimination.py +0 -131
  238. mapFolding/algorithms/eliminationCount.py +0 -26
  239. mapFolding/algorithms/eliminationPinned.py +0 -35
  240. mapFolding/algorithms/iff.py +0 -206
  241. mapFolding/algorithms/patternFinder.py +0 -280
  242. mapFolding/algorithms/pinning2Dn.py +0 -345
  243. mapFolding/algorithms/pinning2DnAnnex.py +0 -43
  244. mapFolding/tests/verify.py +0 -323
  245. mapfolding-0.17.1.dist-info/RECORD +0 -112
  246. {mapfolding-0.17.1.dist-info → mapfolding-0.18.0.dist-info}/entry_points.txt +0 -0
  247. {mapfolding-0.17.1.dist-info → mapfolding-0.18.0.dist-info}/licenses/LICENSE +0 -0
  248. {mapfolding-0.17.1.dist-info → mapfolding-0.18.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,882 @@
1
+ """You can use this module to pin `PermutationSpace` dictionaries for $(2,) * n$ map shapes.
2
+
3
+ (AI generated docstring)
4
+
5
+ This module uses process-based concurrency from `concurrent.futures` [1]. This
6
+ module uses `partition` [2] to split open and closed `PermutationSpace` dictionaries.
7
+ This module uses `tqdm` [3] to show progress. This module uses `operator` [4] for
8
+ arithmetic helpers. This module uses `hunterMakesPy` [5] for parameter parsing.
9
+
10
+ This module refines `EliminationState.listPermutationSpace` [6] by pinning specific
11
+ `pile` values or specific `leaf` values. Core deconstruction logic lives in
12
+ `mapFolding._e.pin2上nDimensionsAnnex` [7] and `mapFolding._e.pinIt` [8].
13
+
14
+ Contents
15
+ --------
16
+ pinLeaf首零Plus零
17
+ Pin `leaf` `首零(state.dimensionsTotal) + 零` using `getLeaf首零Plus零Domain`.
18
+ pinLeavesDimension0
19
+ Pin `leafOrigin` and `首零(state.dimensionsTotal)` using `_pinLeavesByDomain`.
20
+ pinLeavesDimension一
21
+ Pin the dimension-一 leaves using `getDomainDimension一`.
22
+ pinLeavesDimension二
23
+ Pin the dimension-二 leaves using `getDomainDimension二`.
24
+ pinLeavesDimension零
25
+ Pin the dimension-零 leaves using `pinLeaf首零Plus零`.
26
+ pinLeavesDimension首二
27
+ Pin the head-二 leaves using `getDomainDimension首二`.
28
+ pinLeavesDimensions0零一
29
+ Pin the dimension-0, dimension-零, and dimension-一 leaves.
30
+ pinPile零Ante首零
31
+ Pin `pile` `neg(零) + 首零(state.dimensionsTotal)`.
32
+ pinPilesAtEnds
33
+ Pin piles near both ends of the pile sequence.
34
+
35
+ References
36
+ ----------
37
+ [1] Python `concurrent.futures` documentation.
38
+ https://docs.python.org/3/library/concurrent.futures.html
39
+ [2] more-itertools `partition`.
40
+ https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.partition
41
+ [3] tqdm documentation.
42
+ https://tqdm.github.io/
43
+ [4] Python `operator` module documentation.
44
+ https://docs.python.org/3/library/operator.html
45
+ [5] hunterMakesPy - Context7.
46
+ https://context7.com/hunterhogan/huntermakespy
47
+ [6] mapFolding._e.dataBaskets.EliminationState.
48
+ Internal package reference.
49
+ [7] mapFolding._e.pin2上nDimensionsAnnex.
50
+ Internal package reference.
51
+ [8] mapFolding._e.pinIt.
52
+ Internal package reference.
53
+
54
+ """
55
+
56
+ from collections import deque
57
+ from collections.abc import Callable, Iterable, Iterator
58
+ from concurrent.futures import as_completed, Future, ProcessPoolExecutor
59
+ from functools import partial
60
+ from hunterMakesPy.parseParameters import intInnit
61
+ from itertools import filterfalse
62
+ from mapFolding import defineProcessorLimit
63
+ from mapFolding._e import (
64
+ addPileRangesOfLeaves, DOTvalues, getDomainDimension一, getDomainDimension二, getDomainDimension首二, getLeaf首零Plus零Domain,
65
+ Leaf, leafOrigin, mapShapeIs2上nDimensions, PermutationSpace, Pile, pileOrigin, 一, 二, 零, 首一, 首一二, 首二, 首零, 首零一, 首零一二,
66
+ 首零二)
67
+ from mapFolding._e.algorithms.iff import removeIFFViolationsFromEliminationState
68
+ from mapFolding._e.dataBaskets import EliminationState
69
+ from mapFolding._e.filters import pileIsOpen
70
+ from mapFolding._e.pin2上nDimensionsAnnex import (
71
+ reduceAllPermutationSpaceInEliminationState as reduceAllPermutationSpaceInEliminationState)
72
+ from mapFolding._e.pin2上nDimensionsByCrease import (
73
+ pinPile一Ante首ByCrease, pinPile一ByCrease, pinPile一零ByCrease, pinPile二Ante首ByCrease, pinPile二ByCrease,
74
+ pinPile零一Ante首ByCrease)
75
+ from mapFolding._e.pin2上nDimensionsByDomain import pinPile零Ante首零AfterDepth4
76
+ from mapFolding._e.pinIt import (
77
+ deconstructPermutationSpaceAtPile, deconstructPermutationSpaceByDomainOfLeaf,
78
+ deconstructPermutationSpaceByDomainsCombined, disqualifyAppendingLeafAtPile, moveFoldingToListFolding)
79
+ from more_itertools import partition
80
+ from operator import getitem, neg
81
+ from tqdm import tqdm
82
+
83
+ #======== Pin by `pile` ===========================================
84
+
85
+ #-------- Shared logic ---------------------------------------
86
+
87
+ def _pinPiles(state: EliminationState, maximumSizeListPermutationSpace: int, pileProcessingOrder: deque[Pile], *, CPUlimit: bool | float | int | None = None) -> EliminationState:
88
+ """You can pin each `pile` in `pileProcessingOrder` by deconstructing open `PermutationSpace` dictionaries.
89
+
90
+ (AI generated docstring)
91
+
92
+ This function iterates over each `pile` value in `pileProcessingOrder`. For each
93
+ `pile` value, this function partitions `state.listPermutationSpace` into the
94
+ `PermutationSpace` dictionaries that are open at `pile` and the `PermutationSpace`
95
+ dictionaries that are not open at `pile`.
96
+
97
+ This function uses `partition` [1] and `pileIsOpen` [2] to compute the partition.
98
+ This function uses `ProcessPoolExecutor` [3] and `tqdm` [4] to concurrently
99
+ deconstruct open `PermutationSpace` dictionaries.
100
+
101
+ This function keeps the closed `PermutationSpace` dictionaries, and concurrently
102
+ deconstructs each open `PermutationSpace` dictionary at `pile` by calling
103
+ `deconstructPermutationSpaceAtPile` [5].
104
+
105
+ Parameters
106
+ ----------
107
+ state : EliminationState
108
+ State that owns `state.listPermutationSpace` and map-shape metadata.
109
+ maximumSizeListPermutationSpace : int
110
+ Stop once `len(state.listPermutationSpace)` reaches `maximumSizeListPermutationSpace`.
111
+ pileProcessingOrder : deque[Pile]
112
+ Processing order for `pile` values.
113
+ CPUlimit : bool | float | int | None = None
114
+ Optional limit for worker processes as accepted by `defineProcessorLimit` [6].
115
+
116
+ Returns
117
+ -------
118
+ state : EliminationState
119
+ Updated state with an updated `state.listPermutationSpace`.
120
+
121
+ References
122
+ ----------
123
+ [1] more-itertools `partition`.
124
+ https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.partition
125
+ [2] mapFolding._e.filters.pileIsOpen.
126
+ Internal package reference.
127
+ [3] Python `concurrent.futures` documentation.
128
+ https://docs.python.org/3/library/concurrent.futures.html
129
+ [4] tqdm documentation.
130
+ https://tqdm.github.io/
131
+ [5] mapFolding._e.pinIt.deconstructPermutationSpaceAtPile.
132
+ Internal package reference.
133
+ [6] mapFolding.defineProcessorLimit.
134
+ Internal package reference.
135
+
136
+ """
137
+ workersMaximum: int = defineProcessorLimit(CPUlimit)
138
+
139
+ while pileProcessingOrder and (len(state.listPermutationSpace) < maximumSizeListPermutationSpace):
140
+ pile: Pile = pileProcessingOrder.popleft()
141
+
142
+ thesePilesAreOpen: tuple[Iterator[PermutationSpace], Iterator[PermutationSpace]] = partition(pileIsOpen(pile=pile), state.listPermutationSpace)
143
+ state.listPermutationSpace = list(thesePilesAreOpen[False])
144
+
145
+ with ProcessPoolExecutor(workersMaximum) as concurrencyManager:
146
+ listClaimTickets: list[Future[EliminationState]] = [
147
+ concurrencyManager.submit(_pinPilesConcurrentTask, EliminationState(mapShape=state.mapShape, permutationSpace=permutationSpace, pile=pile))
148
+ for permutationSpace in thesePilesAreOpen[True]
149
+ ]
150
+
151
+ for claimTicket in tqdm(as_completed(listClaimTickets), total=len(listClaimTickets), desc=f"Pinning pile {pile:3d} of {state.pileLast:3d}", disable=False):
152
+ state.listPermutationSpace.extend(claimTicket.result().listPermutationSpace)
153
+ state.listFolding.extend(claimTicket.result().listFolding)
154
+
155
+ return state
156
+
157
+ def _pinPilesConcurrentTask(state: EliminationState) -> EliminationState:
158
+ """You can deconstruct `state.permutationSpace` at `state.pile` using `_getLeavesAtPile`.
159
+
160
+ (AI generated docstring)
161
+
162
+ This function calls `deconstructPermutationSpaceAtPile` [1] with
163
+ `leavesToPin` selected by `_getLeavesAtPile` [2].
164
+
165
+ Parameters
166
+ ----------
167
+ state : EliminationState
168
+ State that provides `state.pile` and `state.permutationSpace`.
169
+
170
+ Returns
171
+ -------
172
+ statePinned : EliminationState
173
+ State returned by `deconstructPermutationSpaceAtPile`.
174
+
175
+ References
176
+ ----------
177
+ [1] mapFolding._e.pinIt.deconstructPermutationSpaceAtPile.
178
+ Internal package reference.
179
+ [2] mapFolding._e.pin2上nDimensions._getLeavesAtPile.
180
+ Internal package reference.
181
+
182
+ """
183
+ state.listPermutationSpace.extend(DOTvalues(deconstructPermutationSpaceAtPile(state.permutationSpace, state.pile, filterfalse(disqualifyAppendingLeafAtPile(state), _getLeavesAtPile(state)))))
184
+ return moveFoldingToListFolding(removeIFFViolationsFromEliminationState(reduceAllPermutationSpaceInEliminationState(state)))
185
+
186
+ def _getLeavesAtPile(state: EliminationState) -> Iterable[Leaf]:
187
+ """You can select an `Iterable` of `Leaf` values to pin at `state.pile`.
188
+
189
+ (AI generated docstring)
190
+
191
+ This function selects `leavesToPin` based on `state.pile`. This function uses
192
+ `operator.neg` [1] when comparing `state.pile` values.
193
+
194
+ For certain `pile` values, `leavesToPin` is a fixed singleton set. For other
195
+ `pile` values, `leavesToPin` is computed by a crease-based pinning function [2]
196
+ or a domain-based post-depth function [3].
197
+
198
+ Parameters
199
+ ----------
200
+ state : EliminationState
201
+ State that provides `state.pile`, `state.首`, and `state.dimensionsTotal`.
202
+
203
+ Returns
204
+ -------
205
+ leavesToPin : Iterable[Leaf]
206
+ Leaves that should be used by `deconstructPermutationSpaceAtPile`.
207
+
208
+ References
209
+ ----------
210
+ [1] Python `operator` module documentation.
211
+ https://docs.python.org/3/library/operator.html
212
+ [2] mapFolding._e.pin2上nDimensionsByCrease.
213
+ Internal package reference.
214
+ [3] mapFolding._e.pin2上nDimensionsByDomain.pinPile零Ante首零AfterDepth4.
215
+ Internal package reference.
216
+
217
+ """
218
+ leavesToPin: Iterable[Leaf] = frozenset()
219
+ if state.pile == pileOrigin:
220
+ leavesToPin = frozenset([leafOrigin])
221
+ elif state.pile == 零:
222
+ leavesToPin = frozenset([零])
223
+ elif state.pile == neg(零)+state.首:
224
+ leavesToPin = frozenset([首零(state.dimensionsTotal)])
225
+ elif state.pile == 一:
226
+ leavesToPin = pinPile一ByCrease(state)
227
+ elif state.pile == neg(一)+state.首:
228
+ leavesToPin = pinPile一Ante首ByCrease(state)
229
+ elif state.pile == 一+零:
230
+ leavesToPin = pinPile一零ByCrease(state)
231
+ elif state.pile == neg(零+一)+state.首:
232
+ leavesToPin = pinPile零一Ante首ByCrease(state)
233
+ elif state.pile == 二:
234
+ leavesToPin = pinPile二ByCrease(state)
235
+ elif state.pile == neg(二)+state.首:
236
+ leavesToPin = pinPile二Ante首ByCrease(state)
237
+ elif state.pile == neg(零)+首零(state.dimensionsTotal):
238
+ leavesToPin = pinPile零Ante首零AfterDepth4(state)
239
+ return leavesToPin
240
+
241
+ #-------- Plebian functions -----------------------------------------
242
+
243
+ def pinPilesAtEnds(state: EliminationState, pileDepth: int = 4, maximumSizeListPermutationSpace: int = 2**14, *, CPUlimit: bool | float | int | None = None) -> EliminationState:
244
+ """You can pin piles near both ends of the pile sequence for $(2,) * n$ map shapes.
245
+
246
+ This function returns `state` unchanged when `mapShapeIs2上nDimensions(state.mapShape)`
247
+ fails [1].
248
+
249
+ This function seeds `state.listPermutationSpace` using `addPileRangesOfLeaves` [2]
250
+ when `state.listPermutationSpace` is empty. This function validates `pileDepth`
251
+ using `intInnit` from `hunterMakesPy` [3] and `operator.getitem` [4]. This
252
+ function then chooses a symmetric sequence of `pile` values near both ends of the
253
+ pile order, and pins each `pile` value by calling `_pinPiles` [5].
254
+
255
+ This function forwards `CPUlimit` to `defineProcessorLimit` through `_pinPiles` [6].
256
+
257
+ Parameters
258
+ ----------
259
+ state : EliminationState
260
+ State that owns `state.listPermutationSpace` and map-shape metadata.
261
+ pileDepth : int = 4
262
+ Depth of the symmetric `pile` list. A larger `pileDepth` pins more piles.
263
+ maximumSizeListPermutationSpace : int = 2**14
264
+ Maximum size allowed for `state.listPermutationSpace` while pinning.
265
+ CPUlimit : bool | float | int | None = None
266
+ Optional limit for worker processes as accepted by `defineProcessorLimit`.
267
+
268
+ Returns
269
+ -------
270
+ state : EliminationState
271
+ Updated state with an updated `state.listPermutationSpace`.
272
+
273
+ Raises
274
+ ------
275
+ ValueError
276
+ Raised when `pileDepth` is less than 0.
277
+
278
+ Examples
279
+ --------
280
+ The following usage appears in `mapFolding/_e/easyRun/pinning.py`.
281
+
282
+ >>> from mapFolding._e.dataBaskets import EliminationState
283
+ >>> from mapFolding._e.pin2上nDimensions import pinLeavesDimension首二, pinPilesAtEnds
284
+ >>> state = EliminationState((2,) * 5)
285
+ >>> state = pinPilesAtEnds(state, 4)
286
+ >>> state = pinLeavesDimension首二(state)
287
+
288
+ References
289
+ ----------
290
+ [1] mapFolding._e._beDRY.mapShapeIs2上nDimensions.
291
+ Internal package reference.
292
+ [2] mapFolding._e._beDRY.addPileRangesOfLeaves.
293
+ Internal package reference.
294
+ [3] hunterMakesPy - Context7.
295
+ https://context7.com/hunterhogan/huntermakespy
296
+ [4] Python `operator` module documentation.
297
+ https://docs.python.org/3/library/operator.html
298
+ [5] mapFolding._e.pin2上nDimensions._pinPiles.
299
+ Internal package reference.
300
+ [6] mapFolding.defineProcessorLimit.
301
+ Internal package reference.
302
+
303
+ """
304
+ if not mapShapeIs2上nDimensions(state.mapShape):
305
+ return state
306
+
307
+ if not state.listPermutationSpace:
308
+ # NOTE `nextPermutationSpaceWorkbench` can't handle an empty `state.listPermutationSpace`.
309
+ state.permutationSpace = {}
310
+ state.listPermutationSpace = [addPileRangesOfLeaves(state).permutationSpace]
311
+
312
+ depth: int = getitem(intInnit((pileDepth,), 'pileDepth', int), 0)
313
+ if depth < 0:
314
+ message: str = f"I received `{pileDepth = }`, but I need a value greater than or equal to 0."
315
+ raise ValueError(message)
316
+
317
+ pileProcessingOrder: deque[Pile] = deque()
318
+ if 0 < depth:
319
+ pileProcessingOrder.extend([pileOrigin])
320
+ if 1 <= depth:
321
+ pileProcessingOrder.extend([零, neg(零)+state.首])
322
+ if 2 <= depth:
323
+ pileProcessingOrder.extend([一, neg(一)+state.首])
324
+ if 3 <= depth:
325
+ pileProcessingOrder.extend([一+零, neg(零+一)+state.首])
326
+ if 4 <= depth:
327
+ youMustBeDimensionsTallToPinThis = 4
328
+ if youMustBeDimensionsTallToPinThis < state.dimensionsTotal:
329
+ pileProcessingOrder.extend([二])
330
+ youMustBeDimensionsTallToPinThis = 5
331
+ if youMustBeDimensionsTallToPinThis < state.dimensionsTotal:
332
+ pileProcessingOrder.extend([neg(二)+state.首])
333
+
334
+ return _pinPiles(state, maximumSizeListPermutationSpace, pileProcessingOrder, CPUlimit=CPUlimit)
335
+
336
+ def pinPile零Ante首零(state: EliminationState, maximumSizeListPermutationSpace: int = 2**14, *, CPUlimit: bool | float | int | None = None) -> EliminationState:
337
+ """You can pin `pile` `neg(零) + 首零(state.dimensionsTotal)` for $(2,) * n$ map shapes.
338
+
339
+ This function returns `state` unchanged when `mapShapeIs2上nDimensions(state.mapShape)`
340
+ fails [1].
341
+
342
+ This function first ensures that `state.listPermutationSpace` is non-empty by
343
+ calling `pinPilesAtEnds(state, 0)` [2] when needed. This function then performs
344
+ the depth-4 end pinning step via `pinPilesAtEnds(state, 4, maximumSizeListPermutationSpace)`
345
+ [2].
346
+
347
+ If the map shape satisfies `mapShapeIs2上nDimensions(..., youMustBeDimensionsTallToPinThis=5)`
348
+ [1], this function pins the additional `pile` value `neg(零) + 首零(state.dimensionsTotal)`.
349
+ This function uses `operator.neg` [3] to construct the target `pile` value.
350
+
351
+ This function forwards `CPUlimit` through `_pinPiles` [4] to `defineProcessorLimit` [5].
352
+
353
+ Parameters
354
+ ----------
355
+ state : EliminationState
356
+ State that owns `state.listPermutationSpace` and map-shape metadata.
357
+ maximumSizeListPermutationSpace : int = 2**14
358
+ Maximum size allowed for `state.listPermutationSpace` while pinning.
359
+ CPUlimit : bool | float | int | None = None
360
+ Optional limit for worker processes as accepted by `defineProcessorLimit`.
361
+
362
+ Returns
363
+ -------
364
+ state : EliminationState
365
+ Updated state with an updated `state.listPermutationSpace`.
366
+
367
+ Examples
368
+ --------
369
+ The following usage appears in `mapFolding/_e/easyRun/pinning.py`.
370
+
371
+ >>> from mapFolding._e.dataBaskets import EliminationState
372
+ >>> from mapFolding._e.pin2上nDimensions import pinLeavesDimensions0零一, pinPile零Ante首零
373
+ >>> state = EliminationState((2,) * 5)
374
+ >>> state = pinPile零Ante首零(state)
375
+ >>> state = pinLeavesDimensions0零一(state)
376
+
377
+ References
378
+ ----------
379
+ [1] mapFolding._e._beDRY.mapShapeIs2上nDimensions.
380
+ Internal package reference.
381
+ [2] mapFolding._e.pin2上nDimensions.pinPilesAtEnds.
382
+ Internal package reference.
383
+ [3] Python `operator` module documentation.
384
+ https://docs.python.org/3/library/operator.html
385
+ [4] mapFolding._e.pin2上nDimensions._pinPiles.
386
+ Internal package reference.
387
+ [5] mapFolding.defineProcessorLimit.
388
+ Internal package reference.
389
+
390
+ """
391
+ if not mapShapeIs2上nDimensions(state.mapShape):
392
+ return state
393
+
394
+ if not state.listPermutationSpace:
395
+ state = pinPilesAtEnds(state, 0)
396
+
397
+ state = pinPilesAtEnds(state, 4, maximumSizeListPermutationSpace)
398
+
399
+ if not mapShapeIs2上nDimensions(state.mapShape, youMustBeDimensionsTallToPinThis=5):
400
+ return state
401
+
402
+ pileProcessingOrder: deque[Pile] = deque([neg(零)+首零(state.dimensionsTotal)])
403
+
404
+ return _pinPiles(state, maximumSizeListPermutationSpace, pileProcessingOrder, CPUlimit=CPUlimit)
405
+
406
+ #======== Pin by `leaf` ======================================================
407
+
408
+ #-------- Shared logic ---------------------------------------------
409
+ def _pinLeavesByDomain(state: EliminationState, leaves: tuple[Leaf, ...], leavesDomain: tuple[tuple[Pile, ...], ...], *, youMustBeDimensionsTallToPinThis: int = 3, CPUlimit: bool | float | int | None = None) -> EliminationState:
410
+ """You can pin multiple `leaf` values by deconstructing each `PermutationSpace` using combined leaf domains.
411
+
412
+ (AI generated docstring)
413
+
414
+ This function uses `deconstructPermutationSpaceByDomainsCombined` [1] to deconstruct
415
+ each `PermutationSpace` dictionary in `state.listPermutationSpace` into a refined
416
+ list. The deconstruction is performed concurrently across a `ProcessPoolExecutor` [2]
417
+ and aggregated with `as_completed` [2]. This function uses `tqdm` [3] to show
418
+ progress.
419
+
420
+ This function calls `pinPilesAtEnds(state, 0)` [4] when `state.listPermutationSpace`
421
+ is empty. This function uses `functools.partial` [5] to bind `leaves` and
422
+ `leavesDomain` for worker calls.
423
+
424
+ This function returns `state` unchanged when `mapShapeIs2上nDimensions(state.mapShape, ...)`
425
+ fails [6].
426
+
427
+ This function forwards `CPUlimit` to `defineProcessorLimit` [7].
428
+
429
+ Parameters
430
+ ----------
431
+ state : EliminationState
432
+ State that owns `state.listPermutationSpace` and map-shape metadata.
433
+ leaves : tuple[Leaf, ...]
434
+ Leaves to pin.
435
+ leavesDomain : tuple[tuple[Pile, ...], ...]
436
+ Domains associated with `leaves`.
437
+ youMustBeDimensionsTallToPinThis : int = 3
438
+ Minimum `state.dimensionsTotal` required by `mapShapeIs2上nDimensions`.
439
+ CPUlimit : bool | float | int | None = None
440
+ Optional limit for worker processes as accepted by `defineProcessorLimit`.
441
+
442
+ Returns
443
+ -------
444
+ state : EliminationState
445
+ Updated state with a refined `state.listPermutationSpace`.
446
+
447
+ References
448
+ ----------
449
+ [1] mapFolding._e.pinIt.deconstructPermutationSpaceByDomainsCombined.
450
+ Internal package reference.
451
+ [2] Python `concurrent.futures` documentation.
452
+ https://docs.python.org/3/library/concurrent.futures.html
453
+ [3] tqdm documentation.
454
+ https://tqdm.github.io/
455
+ [4] mapFolding._e.pin2上nDimensions.pinPilesAtEnds.
456
+ Internal package reference.
457
+ [5] Python `functools.partial` documentation.
458
+ https://docs.python.org/3/library/functools.html#functools.partial
459
+ [6] mapFolding._e._beDRY.mapShapeIs2上nDimensions.
460
+ Internal package reference.
461
+ [7] mapFolding.defineProcessorLimit.
462
+ Internal package reference.
463
+
464
+ """
465
+ if not mapShapeIs2上nDimensions(state.mapShape, youMustBeDimensionsTallToPinThis=youMustBeDimensionsTallToPinThis):
466
+ return state
467
+
468
+ if not state.listPermutationSpace:
469
+ state = pinPilesAtEnds(state, 0)
470
+
471
+ intWidth: int = len(str(state.leavesTotal))
472
+ leavesDescriptor: str = ", ".join(f"{aLeaf:{intWidth}d}" for aLeaf in leaves)
473
+
474
+ workersMaximum: int = defineProcessorLimit(CPUlimit)
475
+
476
+ listPermutationSpace: list[PermutationSpace] = state.listPermutationSpace
477
+ state.listPermutationSpace = []
478
+
479
+ assemblyLine: Callable[[EliminationState], EliminationState] = partial(_pinLeavesByDomainConcurrentTask, leaves=leaves, leavesDomain=leavesDomain)
480
+
481
+ with ProcessPoolExecutor(workersMaximum) as concurrencyManager:
482
+
483
+ listClaimTickets: list[Future[EliminationState]] = [
484
+ concurrencyManager.submit(assemblyLine, state=EliminationState(mapShape=state.mapShape, permutationSpace=permutationSpace))
485
+ for permutationSpace in listPermutationSpace
486
+ ]
487
+
488
+ for claimTicket in tqdm(as_completed(listClaimTickets), total=len(listClaimTickets), desc=f"Pinning leaves {leavesDescriptor} of {state.leafLast:{intWidth}d}", disable=False):
489
+ state.listPermutationSpace.extend(claimTicket.result().listPermutationSpace)
490
+ state.listFolding.extend(claimTicket.result().listFolding)
491
+
492
+ return state
493
+
494
+ def _pinLeavesByDomainConcurrentTask(state: EliminationState, leaves: tuple[Leaf, ...], leavesDomain: tuple[tuple[Pile, ...], ...]) -> EliminationState:
495
+ """You can deconstruct `state.permutationSpace` by `leaves` and `leavesDomain` into `state.listPermutationSpace`.
496
+
497
+ This function calls `deconstructPermutationSpaceByDomainsCombined` [1] to build
498
+ `state.listPermutationSpace`, and then normalizes and filters `state.listPermutationSpace`
499
+ by calling `reduceAllPermutationSpaceInEliminationState` [2] and
500
+ `removeIFFViolationsFromEliminationState` [3].
501
+
502
+ Parameters
503
+ ----------
504
+ state : EliminationState
505
+ State that owns `state.permutationSpace`.
506
+ leaves : tuple[Leaf, ...]
507
+ Leaves to pin.
508
+ leavesDomain : tuple[tuple[Pile, ...], ...]
509
+ Domains associated with `leaves`.
510
+
511
+ Returns
512
+ -------
513
+ state : EliminationState
514
+ Updated state with a populated `state.listPermutationSpace`.
515
+
516
+ References
517
+ ----------
518
+ [1] mapFolding._e.pinIt.deconstructPermutationSpaceByDomainsCombined.
519
+ Internal package reference.
520
+ [2] mapFolding._e.pin2上nDimensionsAnnex.reduceAllPermutationSpaceInEliminationState.
521
+ Internal package reference.
522
+ [3] mapFolding._e.algorithms.iff.removeIFFViolationsFromEliminationState.
523
+ Internal package reference.
524
+
525
+ """
526
+ state.listPermutationSpace = deconstructPermutationSpaceByDomainsCombined(state.permutationSpace, leaves, leavesDomain)
527
+ return moveFoldingToListFolding(removeIFFViolationsFromEliminationState(reduceAllPermutationSpaceInEliminationState(state)))
528
+
529
+ #--- Logic that wants to join the shared logic ---
530
+
531
+ def _pinLeafByDomain(state: EliminationState, leaf: Leaf, getLeafDomain: Callable[[EliminationState, Leaf], tuple[Pile, ...]], *, youMustBeDimensionsTallToPinThis: int = 3, CPUlimit: bool | float | int | None = None) -> EliminationState:
532
+ """You can pin one `leaf` value by deconstructing each `PermutationSpace` using a computed leaf domain.
533
+
534
+ (AI generated docstring)
535
+
536
+ This function computes `leavesDomain` for each input `PermutationSpace` dictionary
537
+ by calling `getLeafDomain(EliminationState(...), leaf)`. This function then
538
+ concurrently deconstructs each `PermutationSpace` dictionary using
539
+ `deconstructPermutationSpaceByDomainOfLeaf` [1] inside a `ProcessPoolExecutor` [2]
540
+ and aggregates results with `as_completed` [2]. This function uses `tqdm` [3] to
541
+ show progress.
542
+
543
+ This function calls `pinPilesAtEnds(state, 0)` [4] when `state.listPermutationSpace`
544
+ is empty.
545
+
546
+ This function returns `state` unchanged when `mapShapeIs2上nDimensions(state.mapShape, ...)`
547
+ fails [5].
548
+
549
+ This function forwards `CPUlimit` to `defineProcessorLimit` [6].
550
+
551
+ Parameters
552
+ ----------
553
+ state : EliminationState
554
+ State that owns `state.listPermutationSpace` and map-shape metadata.
555
+ leaf : Leaf
556
+ Leaf to pin.
557
+ getLeafDomain : Callable[[EliminationState, Leaf], tuple[Pile, ...]]
558
+ Callable that computes the domain for `leaf`.
559
+ youMustBeDimensionsTallToPinThis : int = 3
560
+ Minimum `state.dimensionsTotal` required by `mapShapeIs2上nDimensions`.
561
+ CPUlimit : bool | float | int | None = None
562
+ Optional limit for worker processes as accepted by `defineProcessorLimit`.
563
+
564
+ Returns
565
+ -------
566
+ state : EliminationState
567
+ Updated state with a refined `state.listPermutationSpace`.
568
+
569
+ References
570
+ ----------
571
+ [1] mapFolding._e.pinIt.deconstructPermutationSpaceByDomainOfLeaf.
572
+ Internal package reference.
573
+ [2] Python `concurrent.futures` documentation.
574
+ https://docs.python.org/3/library/concurrent.futures.html
575
+ [3] tqdm documentation.
576
+ https://tqdm.github.io/
577
+ [4] mapFolding._e.pin2上nDimensions.pinPilesAtEnds.
578
+ Internal package reference.
579
+ [5] mapFolding._e._beDRY.mapShapeIs2上nDimensions.
580
+ Internal package reference.
581
+ [6] mapFolding.defineProcessorLimit.
582
+ Internal package reference.
583
+
584
+ """
585
+ if not mapShapeIs2上nDimensions(state.mapShape, youMustBeDimensionsTallToPinThis=youMustBeDimensionsTallToPinThis):
586
+ return state
587
+
588
+ if not state.listPermutationSpace:
589
+ state = pinPilesAtEnds(state, 0)
590
+
591
+ workersMaximum: int = defineProcessorLimit(CPUlimit)
592
+
593
+ listPermutationSpace: list[PermutationSpace] = state.listPermutationSpace
594
+ state.listPermutationSpace = []
595
+
596
+ with ProcessPoolExecutor(workersMaximum) as concurrencyManager:
597
+
598
+ listClaimTickets: list[Future[EliminationState]] = [
599
+ concurrencyManager.submit(_pinLeafByDomainConcurrentTask
600
+ , state=EliminationState(mapShape=state.mapShape, permutationSpace=permutationSpace)
601
+ , leaves=leaf
602
+ , leavesDomain=getLeafDomain(EliminationState(mapShape=state.mapShape, permutationSpace=permutationSpace), leaf))
603
+ for permutationSpace in listPermutationSpace
604
+ ]
605
+
606
+ for claimTicket in tqdm(as_completed(listClaimTickets), total=len(listClaimTickets), desc=f"Pinning leaf {leaf:16d} of {state.leafLast:3d}", disable=False):
607
+ state.listPermutationSpace.extend(claimTicket.result().listPermutationSpace)
608
+ state.listFolding.extend(claimTicket.result().listFolding)
609
+
610
+ return state
611
+
612
+ def _pinLeafByDomainConcurrentTask(state: EliminationState, leaves: Leaf, leavesDomain: tuple[Pile, ...]) -> EliminationState:
613
+ """You can deconstruct `state.permutationSpace` by `leaves` and `leavesDomain` into `state.listPermutationSpace`.
614
+
615
+ (AI generated docstring)
616
+
617
+ This function calls `deconstructPermutationSpaceByDomainOfLeaf` [1] to build
618
+ `state.listPermutationSpace`, and then normalizes and filters `state.listPermutationSpace`
619
+ by calling `reduceAllPermutationSpaceInEliminationState` [2] and
620
+ `removeIFFViolationsFromEliminationState` [3].
621
+
622
+ Parameters
623
+ ----------
624
+ state : EliminationState
625
+ State that owns `state.permutationSpace`.
626
+ leaves : Leaf
627
+ Leaf to pin.
628
+ leavesDomain : tuple[Pile, ...]
629
+ Domain associated with `leaves`.
630
+
631
+ Returns
632
+ -------
633
+ state : EliminationState
634
+ Updated state with a populated `state.listPermutationSpace`.
635
+
636
+ References
637
+ ----------
638
+ [1] mapFolding._e.pinIt.deconstructPermutationSpaceByDomainOfLeaf.
639
+ Internal package reference.
640
+ [2] mapFolding._e.pin2上nDimensionsAnnex.reduceAllPermutationSpaceInEliminationState.
641
+ Internal package reference.
642
+ [3] mapFolding._e.algorithms.iff.removeIFFViolationsFromEliminationState.
643
+ Internal package reference.
644
+
645
+ """
646
+ state.listPermutationSpace = deconstructPermutationSpaceByDomainOfLeaf(state.permutationSpace, leaves, leavesDomain)
647
+ return moveFoldingToListFolding(removeIFFViolationsFromEliminationState(reduceAllPermutationSpaceInEliminationState(state)))
648
+
649
+ #-------- Plebian functions -----------------------------------------
650
+
651
+ def pinLeavesDimension0(state: EliminationState, *, CPUlimit: bool | float | int | None = None) -> EliminationState:
652
+ """You can pin `leafOrigin` and `首零(state.dimensionsTotal)` using a fixed two-pile domain.
653
+
654
+ This function calls `_pinLeavesByDomain` [1] with `leaves=(leafOrigin, 首零(state.dimensionsTotal))`
655
+ and `leavesDomain=((pileOrigin, state.pileLast),)`. The domain indicates that
656
+ `leafOrigin` and `首零(state.dimensionsTotal)` are fixed to the end piles.
657
+
658
+ Parameters
659
+ ----------
660
+ state : EliminationState
661
+ State that owns `state.listPermutationSpace` and map-shape metadata.
662
+ CPUlimit : bool | float | int | None = None
663
+ Optional limit for worker processes as accepted by `defineProcessorLimit`.
664
+
665
+ Returns
666
+ -------
667
+ state : EliminationState
668
+ Updated state with a refined `state.listPermutationSpace`.
669
+
670
+ References
671
+ ----------
672
+ [1] mapFolding._e.pin2上nDimensions._pinLeavesByDomain.
673
+ Internal package reference.
674
+
675
+ """
676
+ leaves: tuple[Leaf, Leaf] = (leafOrigin, 首零(state.dimensionsTotal))
677
+ return _pinLeavesByDomain(state, leaves, leavesDomain=((pileOrigin, state.pileLast),), CPUlimit=CPUlimit)
678
+
679
+ def pinLeaf首零Plus零(state: EliminationState, *, CPUlimit: bool | float | int | None = None) -> EliminationState:
680
+ """You can pin `leaf` `首零(state.dimensionsTotal) + 零` using `getLeaf首零Plus零Domain`.
681
+
682
+ (AI generated docstring)
683
+
684
+ This function delegates to `_pinLeafByDomain` [1] by passing
685
+ `leaf = 零 + 首零(state.dimensionsTotal)` and `getLeafDomain = getLeaf首零Plus零Domain` [2].
686
+
687
+ Parameters
688
+ ----------
689
+ state : EliminationState
690
+ State that owns `state.listPermutationSpace` and map-shape metadata.
691
+ CPUlimit : bool | float | int | None = None
692
+ Optional limit for worker processes as accepted by `defineProcessorLimit`.
693
+
694
+ Returns
695
+ -------
696
+ state : EliminationState
697
+ Updated state with a refined `state.listPermutationSpace`.
698
+
699
+ References
700
+ ----------
701
+ [1] mapFolding._e.pin2上nDimensions._pinLeafByDomain.
702
+ Internal package reference.
703
+ [2] mapFolding._e._dataDynamic.getLeaf首零Plus零Domain.
704
+ Internal package reference.
705
+
706
+ """
707
+ leaf: Leaf = (零)+首零(state.dimensionsTotal)
708
+ return _pinLeafByDomain(state, leaf, getLeaf首零Plus零Domain, CPUlimit=CPUlimit)
709
+
710
+ def pinLeavesDimension零(state: EliminationState, *, CPUlimit: bool | float | int | None = None) -> EliminationState:
711
+ """You can pin the dimension-零 leaves by pinning `leaf` `首零(state.dimensionsTotal) + 零`.
712
+
713
+ This function ensures the end-pile seed state by calling `pinPilesAtEnds(state, 0)` [1],
714
+ and then calls `pinLeaf首零Plus零` [2].
715
+
716
+ Parameters
717
+ ----------
718
+ state : EliminationState
719
+ State that owns `state.listPermutationSpace` and map-shape metadata.
720
+ CPUlimit : bool | float | int | None = None
721
+ Optional limit for worker processes as accepted by `defineProcessorLimit`.
722
+
723
+ Returns
724
+ -------
725
+ state : EliminationState
726
+ Updated state with a refined `state.listPermutationSpace`.
727
+
728
+ References
729
+ ----------
730
+ [1] mapFolding._e.pin2上nDimensions.pinPilesAtEnds.
731
+ Internal package reference.
732
+ [2] mapFolding._e.pin2上nDimensions.pinLeaf首零Plus零.
733
+ Internal package reference.
734
+
735
+ """
736
+ state = pinPilesAtEnds(state, 0)
737
+ return pinLeaf首零Plus零(state, CPUlimit=CPUlimit)
738
+
739
+ def pinLeavesDimension一(state: EliminationState, *, CPUlimit: bool | float | int | None = None) -> EliminationState:
740
+ """You can pin the dimension-一 leaves using `getDomainDimension一`.
741
+
742
+ This function pins `leaf` values `(一 + 零, 一, 首一(state.dimensionsTotal), 首零一(state.dimensionsTotal))`
743
+ by calling `_pinLeavesByDomain` [1] with the leaf domains returned by `getDomainDimension一(state)` [2].
744
+
745
+ Parameters
746
+ ----------
747
+ state : EliminationState
748
+ State that owns `state.listPermutationSpace` and map-shape metadata.
749
+ CPUlimit : bool | float | int | None = None
750
+ Optional limit for worker processes as accepted by `defineProcessorLimit`.
751
+
752
+ Returns
753
+ -------
754
+ state : EliminationState
755
+ Updated state with a refined `state.listPermutationSpace`.
756
+
757
+ References
758
+ ----------
759
+ [1] mapFolding._e.pin2上nDimensions._pinLeavesByDomain.
760
+ Internal package reference.
761
+ [2] mapFolding._e._dataDynamic.getDomainDimension一.
762
+ Internal package reference.
763
+
764
+ """
765
+ leaves: tuple[Leaf, Leaf, Leaf, Leaf] = (一+零, 一, 首一(state.dimensionsTotal), 首零一(state.dimensionsTotal))
766
+ return _pinLeavesByDomain(state, leaves, getDomainDimension一(state), CPUlimit=CPUlimit)
767
+
768
+ def pinLeavesDimensions0零一(state: EliminationState, *, CPUlimit: bool | float | int | None = None) -> EliminationState:
769
+ """You can pin the dimension-0, dimension-零, and dimension-一 leaves using a combined call sequence.
770
+
771
+ This function calls `pinLeavesDimension一` [1] and then calls `pinLeavesDimension零` [2].
772
+
773
+ Parameters
774
+ ----------
775
+ state : EliminationState
776
+ State that owns `state.listPermutationSpace` and map-shape metadata.
777
+ CPUlimit : bool | float | int | None = None
778
+ Optional limit for worker processes as accepted by `defineProcessorLimit`.
779
+
780
+ Returns
781
+ -------
782
+ state : EliminationState
783
+ Updated state with a refined `state.listPermutationSpace`.
784
+
785
+ Examples
786
+ --------
787
+ The following usage appears in `mapFolding/_e/easyRun/pinning.py`.
788
+
789
+ >>> from mapFolding._e.dataBaskets import EliminationState
790
+ >>> from mapFolding._e.pin2上nDimensions import pinLeavesDimensions0零一, pinPile零Ante首零
791
+ >>> state = EliminationState((2,) * 5)
792
+ >>> state = pinPile零Ante首零(state)
793
+ >>> state = pinLeavesDimensions0零一(state)
794
+
795
+ References
796
+ ----------
797
+ [1] mapFolding._e.pin2上nDimensions.pinLeavesDimension一.
798
+ Internal package reference.
799
+ [2] mapFolding._e.pin2上nDimensions.pinLeavesDimension零.
800
+ Internal package reference.
801
+
802
+ """
803
+ state = pinLeavesDimension一(state, CPUlimit=CPUlimit)
804
+ return pinLeavesDimension零(state, CPUlimit=CPUlimit)
805
+
806
+ def pinLeavesDimension二(state: EliminationState, *, CPUlimit: bool | float | int | None = None) -> EliminationState:
807
+ """You can pin the dimension-二 leaves using `getDomainDimension二`.
808
+
809
+ This function pins `leaf` values `(二 + 一, 二 + 一 + 零, 二 + 零, 二)` by calling
810
+ `_pinLeavesByDomain` [1] with the leaf domains returned by `getDomainDimension二(state)` [2].
811
+
812
+ Parameters
813
+ ----------
814
+ state : EliminationState
815
+ State that owns `state.listPermutationSpace` and map-shape metadata.
816
+ CPUlimit : bool | float | int | None = None
817
+ Optional limit for worker processes as accepted by `defineProcessorLimit`.
818
+
819
+ Returns
820
+ -------
821
+ state : EliminationState
822
+ Updated state with a refined `state.listPermutationSpace`.
823
+
824
+ Examples
825
+ --------
826
+ The following usage appears in `mapFolding/_e/easyRun/pinning.py`.
827
+
828
+ >>> from mapFolding._e.dataBaskets import EliminationState
829
+ >>> from mapFolding._e.pin2上nDimensions import pinLeavesDimension二
830
+ >>> state = EliminationState((2,) * 5)
831
+ >>> state = pinLeavesDimension二(state)
832
+
833
+ References
834
+ ----------
835
+ [1] mapFolding._e.pin2上nDimensions._pinLeavesByDomain.
836
+ Internal package reference.
837
+ [2] mapFolding._e._dataDynamic.getDomainDimension二.
838
+ Internal package reference.
839
+
840
+ """
841
+ leaves: tuple[Leaf, Leaf, Leaf, Leaf] = (二+一, 二+一+零, 二+零, 二)
842
+ return _pinLeavesByDomain(state, leaves, getDomainDimension二(state), youMustBeDimensionsTallToPinThis=5, CPUlimit=CPUlimit)
843
+
844
+ def pinLeavesDimension首二(state: EliminationState, *, CPUlimit: bool | float | int | None = None) -> EliminationState:
845
+ """You can pin the head-二 leaves using `getDomainDimension首二`.
846
+
847
+ This function pins `leaf` values `(首二(state.dimensionsTotal), 首零二(state.dimensionsTotal), 首零一二(state.dimensionsTotal), 首一二(state.dimensionsTotal))`
848
+ by calling `_pinLeavesByDomain` [1] with the leaf domains returned by `getDomainDimension首二(state)` [2].
849
+
850
+ Parameters
851
+ ----------
852
+ state : EliminationState
853
+ State that owns `state.listPermutationSpace` and map-shape metadata.
854
+ CPUlimit : bool | float | int | None = None
855
+ Optional limit for worker processes as accepted by `defineProcessorLimit`.
856
+
857
+ Returns
858
+ -------
859
+ state : EliminationState
860
+ Updated state with a refined `state.listPermutationSpace`.
861
+
862
+ Examples
863
+ --------
864
+ The following usage appears in `mapFolding/_e/easyRun/pinning.py`.
865
+
866
+ >>> from mapFolding._e.dataBaskets import EliminationState
867
+ >>> from mapFolding._e.pin2上nDimensions import pinLeavesDimension首二, pinPilesAtEnds
868
+ >>> state = EliminationState((2,) * 5)
869
+ >>> state = pinPilesAtEnds(state, 4)
870
+ >>> state = pinLeavesDimension首二(state)
871
+
872
+ References
873
+ ----------
874
+ [1] mapFolding._e.pin2上nDimensions._pinLeavesByDomain.
875
+ Internal package reference.
876
+ [2] mapFolding._e._dataDynamic.getDomainDimension首二.
877
+ Internal package reference.
878
+
879
+ """
880
+ leaves: tuple[Leaf, Leaf, Leaf, Leaf] = (首二(state.dimensionsTotal), 首零二(state.dimensionsTotal), 首零一二(state.dimensionsTotal), 首一二(state.dimensionsTotal))
881
+ return _pinLeavesByDomain(state, leaves, getDomainDimension首二(state), youMustBeDimensionsTallToPinThis=5, CPUlimit=CPUlimit)
882
+