passagemath-gap-pkg-semigroups 10.6.30__cp311-cp311-macosx_13_0_arm64.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.

Potentially problematic release.


This version of passagemath-gap-pkg-semigroups might be problematic. Click here for more details.

Files changed (354) hide show
  1. gap/pkg/semigroups/CHANGELOG.md +1699 -0
  2. gap/pkg/semigroups/CONTRIBUTING.md +91 -0
  3. gap/pkg/semigroups/GNUmakefile +110 -0
  4. gap/pkg/semigroups/GNUmakefile.in +110 -0
  5. gap/pkg/semigroups/GPL +674 -0
  6. gap/pkg/semigroups/LICENSE +16 -0
  7. gap/pkg/semigroups/Makefile +26 -0
  8. gap/pkg/semigroups/Makefile.gappkg +225 -0
  9. gap/pkg/semigroups/PackageInfo.g +529 -0
  10. gap/pkg/semigroups/README.md +102 -0
  11. gap/pkg/semigroups/VERSIONS +112 -0
  12. gap/pkg/semigroups/aclocal.m4 +375 -0
  13. gap/pkg/semigroups/autogen.sh +25 -0
  14. gap/pkg/semigroups/bin/aarch64-apple-darwin23-default64-kv10/semigroups.so +0 -0
  15. gap/pkg/semigroups/config.guess +1807 -0
  16. gap/pkg/semigroups/config.log +1158 -0
  17. gap/pkg/semigroups/config.status +1131 -0
  18. gap/pkg/semigroups/config.sub +1960 -0
  19. gap/pkg/semigroups/configure +9742 -0
  20. gap/pkg/semigroups/configure.ac +71 -0
  21. gap/pkg/semigroups/data/doc/greens.pickle +1 -0
  22. gap/pkg/semigroups/data/gens/fullbool-8.pickle.gz +0 -0
  23. gap/pkg/semigroups/data/gens/fullbool.pickle.gz +0 -0
  24. gap/pkg/semigroups/data/gens/hall.pickle.gz +0 -0
  25. gap/pkg/semigroups/data/gens/reflex-6.pickle.gz +0 -0
  26. gap/pkg/semigroups/data/gens/reflex.pickle.gz +0 -0
  27. gap/pkg/semigroups/data/tst/bipart4 +10 -0
  28. gap/pkg/semigroups/data/tst/pperm10 +1 -0
  29. gap/pkg/semigroups/data/tst/tables.gz +0 -0
  30. gap/pkg/semigroups/data/tst/testdata +1 -0
  31. gap/pkg/semigroups/data/tst/testinstall.pickle +1 -0
  32. gap/pkg/semigroups/data/tst/trans3 +7 -0
  33. gap/pkg/semigroups/data/tst/trans3-old +7 -0
  34. gap/pkg/semigroups/environment.yml +7 -0
  35. gap/pkg/semigroups/gap/attributes/acting.gd +15 -0
  36. gap/pkg/semigroups/gap/attributes/acting.gi +297 -0
  37. gap/pkg/semigroups/gap/attributes/attr.gd +91 -0
  38. gap/pkg/semigroups/gap/attributes/attr.gi +1214 -0
  39. gap/pkg/semigroups/gap/attributes/dual.gd +25 -0
  40. gap/pkg/semigroups/gap/attributes/dual.gi +209 -0
  41. gap/pkg/semigroups/gap/attributes/factor.gd +17 -0
  42. gap/pkg/semigroups/gap/attributes/factor.gi +453 -0
  43. gap/pkg/semigroups/gap/attributes/homomorph.gd +84 -0
  44. gap/pkg/semigroups/gap/attributes/homomorph.gi +591 -0
  45. gap/pkg/semigroups/gap/attributes/inverse.gd +38 -0
  46. gap/pkg/semigroups/gap/attributes/inverse.gi +708 -0
  47. gap/pkg/semigroups/gap/attributes/isomorph.gd +16 -0
  48. gap/pkg/semigroups/gap/attributes/isomorph.gi +377 -0
  49. gap/pkg/semigroups/gap/attributes/isorms.gd +49 -0
  50. gap/pkg/semigroups/gap/attributes/isorms.gi +1383 -0
  51. gap/pkg/semigroups/gap/attributes/maximal.gd +16 -0
  52. gap/pkg/semigroups/gap/attributes/maximal.gi +1876 -0
  53. gap/pkg/semigroups/gap/attributes/properties.gd +109 -0
  54. gap/pkg/semigroups/gap/attributes/properties.gi +1658 -0
  55. gap/pkg/semigroups/gap/attributes/rms-translat.gd +39 -0
  56. gap/pkg/semigroups/gap/attributes/rms-translat.gi +1078 -0
  57. gap/pkg/semigroups/gap/attributes/semifp.gd +12 -0
  58. gap/pkg/semigroups/gap/attributes/semifp.gi +84 -0
  59. gap/pkg/semigroups/gap/attributes/translat.gd +474 -0
  60. gap/pkg/semigroups/gap/attributes/translat.gi +1779 -0
  61. gap/pkg/semigroups/gap/congruences/cong.gd +154 -0
  62. gap/pkg/semigroups/gap/congruences/cong.gi +351 -0
  63. gap/pkg/semigroups/gap/congruences/conginv.gd +38 -0
  64. gap/pkg/semigroups/gap/congruences/conginv.gi +589 -0
  65. gap/pkg/semigroups/gap/congruences/conglatt.gd +101 -0
  66. gap/pkg/semigroups/gap/congruences/conglatt.gi +886 -0
  67. gap/pkg/semigroups/gap/congruences/congpairs.gd +21 -0
  68. gap/pkg/semigroups/gap/congruences/congpairs.gi +272 -0
  69. gap/pkg/semigroups/gap/congruences/congpart.gd +90 -0
  70. gap/pkg/semigroups/gap/congruences/congpart.gi +449 -0
  71. gap/pkg/semigroups/gap/congruences/congrees.gd +20 -0
  72. gap/pkg/semigroups/gap/congruences/congrees.gi +313 -0
  73. gap/pkg/semigroups/gap/congruences/congrms.gd +54 -0
  74. gap/pkg/semigroups/gap/congruences/congrms.gi +1467 -0
  75. gap/pkg/semigroups/gap/congruences/congsemigraph.gd +28 -0
  76. gap/pkg/semigroups/gap/congruences/congsemigraph.gi +289 -0
  77. gap/pkg/semigroups/gap/congruences/congsimple.gd +27 -0
  78. gap/pkg/semigroups/gap/congruences/congsimple.gi +236 -0
  79. gap/pkg/semigroups/gap/congruences/conguniv.gd +20 -0
  80. gap/pkg/semigroups/gap/congruences/conguniv.gi +271 -0
  81. gap/pkg/semigroups/gap/congruences/congwordgraph.gd +21 -0
  82. gap/pkg/semigroups/gap/congruences/congwordgraph.gi +250 -0
  83. gap/pkg/semigroups/gap/elements/bipart.gd +71 -0
  84. gap/pkg/semigroups/gap/elements/bipart.gi +995 -0
  85. gap/pkg/semigroups/gap/elements/blocks.gd +31 -0
  86. gap/pkg/semigroups/gap/elements/blocks.gi +134 -0
  87. gap/pkg/semigroups/gap/elements/boolmat.gd +74 -0
  88. gap/pkg/semigroups/gap/elements/boolmat.gi +726 -0
  89. gap/pkg/semigroups/gap/elements/elements.gd +11 -0
  90. gap/pkg/semigroups/gap/elements/elements.gi +121 -0
  91. gap/pkg/semigroups/gap/elements/ffmat.gd +71 -0
  92. gap/pkg/semigroups/gap/elements/ffmat.gi +311 -0
  93. gap/pkg/semigroups/gap/elements/maxplusmat.gd +131 -0
  94. gap/pkg/semigroups/gap/elements/maxplusmat.gi +782 -0
  95. gap/pkg/semigroups/gap/elements/pbr.gd +51 -0
  96. gap/pkg/semigroups/gap/elements/pbr.gi +740 -0
  97. gap/pkg/semigroups/gap/elements/pperm.gd +11 -0
  98. gap/pkg/semigroups/gap/elements/pperm.gi +14 -0
  99. gap/pkg/semigroups/gap/elements/semiringmat.gd +136 -0
  100. gap/pkg/semigroups/gap/elements/semiringmat.gi +717 -0
  101. gap/pkg/semigroups/gap/elements/star.gd +21 -0
  102. gap/pkg/semigroups/gap/elements/star.gi +21 -0
  103. gap/pkg/semigroups/gap/elements/trans.gd +13 -0
  104. gap/pkg/semigroups/gap/elements/trans.gi +50 -0
  105. gap/pkg/semigroups/gap/fp/freeband.gd +22 -0
  106. gap/pkg/semigroups/gap/fp/freeband.gi +502 -0
  107. gap/pkg/semigroups/gap/fp/freeinverse.gd +30 -0
  108. gap/pkg/semigroups/gap/fp/freeinverse.gi +465 -0
  109. gap/pkg/semigroups/gap/fp/tietze.gd +89 -0
  110. gap/pkg/semigroups/gap/fp/tietze.gi +1578 -0
  111. gap/pkg/semigroups/gap/fp/word.gd +15 -0
  112. gap/pkg/semigroups/gap/fp/word.gi +67 -0
  113. gap/pkg/semigroups/gap/greens/acting-inverse.gi +774 -0
  114. gap/pkg/semigroups/gap/greens/acting-regular.gi +553 -0
  115. gap/pkg/semigroups/gap/greens/acting.gd +81 -0
  116. gap/pkg/semigroups/gap/greens/acting.gi +2433 -0
  117. gap/pkg/semigroups/gap/greens/froidure-pin.gd +25 -0
  118. gap/pkg/semigroups/gap/greens/froidure-pin.gi +741 -0
  119. gap/pkg/semigroups/gap/greens/generic.gd +117 -0
  120. gap/pkg/semigroups/gap/greens/generic.gi +630 -0
  121. gap/pkg/semigroups/gap/ideals/acting.gd +17 -0
  122. gap/pkg/semigroups/gap/ideals/acting.gi +1155 -0
  123. gap/pkg/semigroups/gap/ideals/froidure-pin.gd +11 -0
  124. gap/pkg/semigroups/gap/ideals/froidure-pin.gi +105 -0
  125. gap/pkg/semigroups/gap/ideals/ideals.gd +45 -0
  126. gap/pkg/semigroups/gap/ideals/ideals.gi +442 -0
  127. gap/pkg/semigroups/gap/ideals/lambda-rho.gd +16 -0
  128. gap/pkg/semigroups/gap/ideals/lambda-rho.gi +614 -0
  129. gap/pkg/semigroups/gap/libsemigroups/cong.gd +24 -0
  130. gap/pkg/semigroups/gap/libsemigroups/cong.gi +431 -0
  131. gap/pkg/semigroups/gap/libsemigroups/fpsemi.gd +16 -0
  132. gap/pkg/semigroups/gap/libsemigroups/fpsemi.gi +53 -0
  133. gap/pkg/semigroups/gap/libsemigroups/froidure-pin.gd +17 -0
  134. gap/pkg/semigroups/gap/libsemigroups/froidure-pin.gi +945 -0
  135. gap/pkg/semigroups/gap/libsemigroups/sims1.gd +38 -0
  136. gap/pkg/semigroups/gap/libsemigroups/sims1.gi +308 -0
  137. gap/pkg/semigroups/gap/main/acting.gd +36 -0
  138. gap/pkg/semigroups/gap/main/acting.gi +779 -0
  139. gap/pkg/semigroups/gap/main/froidure-pin.gd +72 -0
  140. gap/pkg/semigroups/gap/main/froidure-pin.gi +655 -0
  141. gap/pkg/semigroups/gap/main/graded.gd +26 -0
  142. gap/pkg/semigroups/gap/main/graded.gi +355 -0
  143. gap/pkg/semigroups/gap/main/lambda-rho.gd +29 -0
  144. gap/pkg/semigroups/gap/main/lambda-rho.gi +514 -0
  145. gap/pkg/semigroups/gap/main/orbits.gd +24 -0
  146. gap/pkg/semigroups/gap/main/orbits.gi +512 -0
  147. gap/pkg/semigroups/gap/main/semiact.gd +20 -0
  148. gap/pkg/semigroups/gap/main/semiact.gi +821 -0
  149. gap/pkg/semigroups/gap/main/setup.gd +61 -0
  150. gap/pkg/semigroups/gap/main/setup.gi +1094 -0
  151. gap/pkg/semigroups/gap/obsolete.gd +9 -0
  152. gap/pkg/semigroups/gap/obsolete.gi +14 -0
  153. gap/pkg/semigroups/gap/options.g +55 -0
  154. gap/pkg/semigroups/gap/semigroups/grpperm.gd +12 -0
  155. gap/pkg/semigroups/gap/semigroups/grpperm.gi +177 -0
  156. gap/pkg/semigroups/gap/semigroups/semibipart.gd +28 -0
  157. gap/pkg/semigroups/gap/semigroups/semibipart.gi +570 -0
  158. gap/pkg/semigroups/gap/semigroups/semiboolmat.gd +20 -0
  159. gap/pkg/semigroups/gap/semigroups/semiboolmat.gi +104 -0
  160. gap/pkg/semigroups/gap/semigroups/semicons.gd +52 -0
  161. gap/pkg/semigroups/gap/semigroups/semicons.gi +1194 -0
  162. gap/pkg/semigroups/gap/semigroups/semidp.gd +13 -0
  163. gap/pkg/semigroups/gap/semigroups/semidp.gi +509 -0
  164. gap/pkg/semigroups/gap/semigroups/semieunit.gd +126 -0
  165. gap/pkg/semigroups/gap/semigroups/semieunit.gi +889 -0
  166. gap/pkg/semigroups/gap/semigroups/semiex.gd +104 -0
  167. gap/pkg/semigroups/gap/semigroups/semiex.gi +1590 -0
  168. gap/pkg/semigroups/gap/semigroups/semiffmat.gd +37 -0
  169. gap/pkg/semigroups/gap/semigroups/semiffmat.gi +565 -0
  170. gap/pkg/semigroups/gap/semigroups/semifp.gd +28 -0
  171. gap/pkg/semigroups/gap/semigroups/semifp.gi +1364 -0
  172. gap/pkg/semigroups/gap/semigroups/semigraph.gd +40 -0
  173. gap/pkg/semigroups/gap/semigroups/semigraph.gi +292 -0
  174. gap/pkg/semigroups/gap/semigroups/semigrp.gd +165 -0
  175. gap/pkg/semigroups/gap/semigroups/semigrp.gi +1225 -0
  176. gap/pkg/semigroups/gap/semigroups/semimaxplus.gd +72 -0
  177. gap/pkg/semigroups/gap/semigroups/semimaxplus.gi +710 -0
  178. gap/pkg/semigroups/gap/semigroups/semintmat.gd +13 -0
  179. gap/pkg/semigroups/gap/semigroups/semintmat.gi +74 -0
  180. gap/pkg/semigroups/gap/semigroups/semipbr.gd +19 -0
  181. gap/pkg/semigroups/gap/semigroups/semipbr.gi +139 -0
  182. gap/pkg/semigroups/gap/semigroups/semipperm.gd +27 -0
  183. gap/pkg/semigroups/gap/semigroups/semipperm.gi +711 -0
  184. gap/pkg/semigroups/gap/semigroups/semiquo.gd +14 -0
  185. gap/pkg/semigroups/gap/semigroups/semiquo.gi +97 -0
  186. gap/pkg/semigroups/gap/semigroups/semiringmat.gd +16 -0
  187. gap/pkg/semigroups/gap/semigroups/semiringmat.gi +21 -0
  188. gap/pkg/semigroups/gap/semigroups/semirms.gd +19 -0
  189. gap/pkg/semigroups/gap/semigroups/semirms.gi +977 -0
  190. gap/pkg/semigroups/gap/semigroups/semitrans.gd +49 -0
  191. gap/pkg/semigroups/gap/semigroups/semitrans.gi +909 -0
  192. gap/pkg/semigroups/gap/tools/display.gd +24 -0
  193. gap/pkg/semigroups/gap/tools/display.gi +749 -0
  194. gap/pkg/semigroups/gap/tools/io.gd +17 -0
  195. gap/pkg/semigroups/gap/tools/io.gi +543 -0
  196. gap/pkg/semigroups/gap/tools/iterators.gd +16 -0
  197. gap/pkg/semigroups/gap/tools/iterators.gi +253 -0
  198. gap/pkg/semigroups/gap/tools/utils.gd +19 -0
  199. gap/pkg/semigroups/gap/tools/utils.gi +756 -0
  200. gap/pkg/semigroups/gapbind14/.ccls +18 -0
  201. gap/pkg/semigroups/gapbind14/.clang-format +104 -0
  202. gap/pkg/semigroups/gapbind14/CPPLINT.cfg +5 -0
  203. gap/pkg/semigroups/gapbind14/LICENSE +674 -0
  204. gap/pkg/semigroups/gapbind14/README.md +76 -0
  205. gap/pkg/semigroups/gapbind14/demo/.gitignore +4 -0
  206. gap/pkg/semigroups/gapbind14/demo/LICENSE +293 -0
  207. gap/pkg/semigroups/gapbind14/demo/Makefile.gappkg +220 -0
  208. gap/pkg/semigroups/gapbind14/demo/Makefile.in +19 -0
  209. gap/pkg/semigroups/gapbind14/demo/PackageInfo.g +87 -0
  210. gap/pkg/semigroups/gapbind14/demo/README.md +17 -0
  211. gap/pkg/semigroups/gapbind14/demo/configure +34 -0
  212. gap/pkg/semigroups/gapbind14/demo/gap/gapbind_demo.gd +19 -0
  213. gap/pkg/semigroups/gapbind14/demo/gap/gapbind_demo.gi +10 -0
  214. gap/pkg/semigroups/gapbind14/demo/init.g +16 -0
  215. gap/pkg/semigroups/gapbind14/demo/makedoc.g +10 -0
  216. gap/pkg/semigroups/gapbind14/demo/read.g +6 -0
  217. gap/pkg/semigroups/gapbind14/demo/src/gapbind_demo.cc +142 -0
  218. gap/pkg/semigroups/gapbind14/demo/tst/testall.g +12 -0
  219. gap/pkg/semigroups/gapbind14/include/gapbind14/cpp_fn.hpp +223 -0
  220. gap/pkg/semigroups/gapbind14/include/gapbind14/gap_include.hpp +26 -0
  221. gap/pkg/semigroups/gapbind14/include/gapbind14/gapbind14.hpp +445 -0
  222. gap/pkg/semigroups/gapbind14/include/gapbind14/tame_free_fn.hpp +420 -0
  223. gap/pkg/semigroups/gapbind14/include/gapbind14/tame_mem_fn.hpp +556 -0
  224. gap/pkg/semigroups/gapbind14/include/gapbind14/to_cpp.hpp +162 -0
  225. gap/pkg/semigroups/gapbind14/include/gapbind14/to_gap.hpp +158 -0
  226. gap/pkg/semigroups/gapbind14/src/.clang-format +108 -0
  227. gap/pkg/semigroups/gapbind14/src/gapbind14.cpp +334 -0
  228. gap/pkg/semigroups/init.g +150 -0
  229. gap/pkg/semigroups/m4/ax_append_flag.m4 +50 -0
  230. gap/pkg/semigroups/m4/ax_check_compile_flag.m4 +53 -0
  231. gap/pkg/semigroups/m4/ax_check_hpcombi.m4 +121 -0
  232. gap/pkg/semigroups/m4/ax_check_libsemigroup.m4 +68 -0
  233. gap/pkg/semigroups/m4/ax_compare_version.m4 +177 -0
  234. gap/pkg/semigroups/m4/ax_cxx_compile_stdcxx.m4 +1009 -0
  235. gap/pkg/semigroups/m4/ax_cxx_compile_stdcxx_14.m4 +34 -0
  236. gap/pkg/semigroups/m4/ax_prefix_config_h.m4 +203 -0
  237. gap/pkg/semigroups/m4/ax_pthread.m4 +522 -0
  238. gap/pkg/semigroups/m4/find_gap.m4 +94 -0
  239. gap/pkg/semigroups/makedoc.g +153 -0
  240. gap/pkg/semigroups/prerequisites.sh +62 -0
  241. gap/pkg/semigroups/read.g +105 -0
  242. gap/pkg/semigroups/release.toml +6 -0
  243. gap/pkg/semigroups/tst/extreme/README +2 -0
  244. gap/pkg/semigroups/tst/extreme/attrinv.tst +703 -0
  245. gap/pkg/semigroups/tst/extreme/bipart.tst +2803 -0
  246. gap/pkg/semigroups/tst/extreme/closure.tst +652 -0
  247. gap/pkg/semigroups/tst/extreme/cong.tst +286 -0
  248. gap/pkg/semigroups/tst/extreme/conginv.tst +43 -0
  249. gap/pkg/semigroups/tst/extreme/examples.tst +2449 -0
  250. gap/pkg/semigroups/tst/extreme/freeband.tst +37 -0
  251. gap/pkg/semigroups/tst/extreme/greens-acting-regular.tst +27 -0
  252. gap/pkg/semigroups/tst/extreme/greens-acting.tst +1999 -0
  253. gap/pkg/semigroups/tst/extreme/ideals.tst +858 -0
  254. gap/pkg/semigroups/tst/extreme/inverse.tst +1025 -0
  255. gap/pkg/semigroups/tst/extreme/maximal.tst +856 -0
  256. gap/pkg/semigroups/tst/extreme/misc.tst +4236 -0
  257. gap/pkg/semigroups/tst/extreme/monoid_pkg.tst +1488 -0
  258. gap/pkg/semigroups/tst/extreme/properties.tst +914 -0
  259. gap/pkg/semigroups/tst/extreme/semibipart.tst +2837 -0
  260. gap/pkg/semigroups/tst/extreme/semieunit.tst +49 -0
  261. gap/pkg/semigroups/tst/extreme/semiffmat.tst +353 -0
  262. gap/pkg/semigroups/tst/extreme/semigroups.tst +245 -0
  263. gap/pkg/semigroups/tst/extreme/semiiter.tst +58 -0
  264. gap/pkg/semigroups/tst/extreme/semirms.tst +1091 -0
  265. gap/pkg/semigroups/tst/extreme/transform.tst +305 -0
  266. gap/pkg/semigroups/tst/extreme/translat.tst +44 -0
  267. gap/pkg/semigroups/tst/standard/README +2 -0
  268. gap/pkg/semigroups/tst/standard/attributes/acting.tst +388 -0
  269. gap/pkg/semigroups/tst/standard/attributes/attr.tst +2404 -0
  270. gap/pkg/semigroups/tst/standard/attributes/dual.tst +308 -0
  271. gap/pkg/semigroups/tst/standard/attributes/factor.tst +629 -0
  272. gap/pkg/semigroups/tst/standard/attributes/homomorph.tst +1134 -0
  273. gap/pkg/semigroups/tst/standard/attributes/inverse.tst +1521 -0
  274. gap/pkg/semigroups/tst/standard/attributes/isomorph.tst +435 -0
  275. gap/pkg/semigroups/tst/standard/attributes/isorms.tst +1147 -0
  276. gap/pkg/semigroups/tst/standard/attributes/maximal.tst +853 -0
  277. gap/pkg/semigroups/tst/standard/attributes/properties.tst +2028 -0
  278. gap/pkg/semigroups/tst/standard/attributes/semifp.tst +53 -0
  279. gap/pkg/semigroups/tst/standard/attributes/translat.tst +796 -0
  280. gap/pkg/semigroups/tst/standard/congruences/cong.tst +1044 -0
  281. gap/pkg/semigroups/tst/standard/congruences/conginv.tst +292 -0
  282. gap/pkg/semigroups/tst/standard/congruences/conglatt.tst +421 -0
  283. gap/pkg/semigroups/tst/standard/congruences/congpairs.tst +1011 -0
  284. gap/pkg/semigroups/tst/standard/congruences/congrees.tst +288 -0
  285. gap/pkg/semigroups/tst/standard/congruences/congrms.tst +701 -0
  286. gap/pkg/semigroups/tst/standard/congruences/congsemigraph.tst +422 -0
  287. gap/pkg/semigroups/tst/standard/congruences/congsimple.tst +311 -0
  288. gap/pkg/semigroups/tst/standard/congruences/conguniv.tst +259 -0
  289. gap/pkg/semigroups/tst/standard/congruences/congwordgraph.tst +330 -0
  290. gap/pkg/semigroups/tst/standard/elements/bipart.tst +783 -0
  291. gap/pkg/semigroups/tst/standard/elements/blocks.tst +166 -0
  292. gap/pkg/semigroups/tst/standard/elements/boolmat.tst +608 -0
  293. gap/pkg/semigroups/tst/standard/elements/elements.tst +117 -0
  294. gap/pkg/semigroups/tst/standard/elements/ffmat.tst +349 -0
  295. gap/pkg/semigroups/tst/standard/elements/maxplusmat.tst +613 -0
  296. gap/pkg/semigroups/tst/standard/elements/pbr.tst +506 -0
  297. gap/pkg/semigroups/tst/standard/elements/pperm.tst +32 -0
  298. gap/pkg/semigroups/tst/standard/elements/semiringmat.tst +601 -0
  299. gap/pkg/semigroups/tst/standard/elements/trans.tst +58 -0
  300. gap/pkg/semigroups/tst/standard/fp/freeband.tst +311 -0
  301. gap/pkg/semigroups/tst/standard/fp/freeinverse.tst +147 -0
  302. gap/pkg/semigroups/tst/standard/fp/tietze.tst +780 -0
  303. gap/pkg/semigroups/tst/standard/fp/word.tst +106 -0
  304. gap/pkg/semigroups/tst/standard/greens/acting-inverse.tst +545 -0
  305. gap/pkg/semigroups/tst/standard/greens/acting-regular.tst +396 -0
  306. gap/pkg/semigroups/tst/standard/greens/acting.tst +2033 -0
  307. gap/pkg/semigroups/tst/standard/greens/froidure-pin.tst +1831 -0
  308. gap/pkg/semigroups/tst/standard/greens/generic.tst +1436 -0
  309. gap/pkg/semigroups/tst/standard/ideals/acting.tst +279 -0
  310. gap/pkg/semigroups/tst/standard/ideals/froidure-pin.tst +178 -0
  311. gap/pkg/semigroups/tst/standard/ideals/ideals.tst +380 -0
  312. gap/pkg/semigroups/tst/standard/libsemigroups/cong.tst +310 -0
  313. gap/pkg/semigroups/tst/standard/libsemigroups/froidure-pin.tst +778 -0
  314. gap/pkg/semigroups/tst/standard/libsemigroups/sims1.tst +379 -0
  315. gap/pkg/semigroups/tst/standard/main/acting.tst +411 -0
  316. gap/pkg/semigroups/tst/standard/main/froidure-pin.tst +392 -0
  317. gap/pkg/semigroups/tst/standard/main/semiact.tst +203 -0
  318. gap/pkg/semigroups/tst/standard/main/setup.tst +1144 -0
  319. gap/pkg/semigroups/tst/standard/obsolete.tst +19 -0
  320. gap/pkg/semigroups/tst/standard/options.tst +54 -0
  321. gap/pkg/semigroups/tst/standard/semigroups/grpperm.tst +581 -0
  322. gap/pkg/semigroups/tst/standard/semigroups/semibipart.tst +2635 -0
  323. gap/pkg/semigroups/tst/standard/semigroups/semiboolmat.tst +1871 -0
  324. gap/pkg/semigroups/tst/standard/semigroups/semicons.tst +1173 -0
  325. gap/pkg/semigroups/tst/standard/semigroups/semidp.tst +739 -0
  326. gap/pkg/semigroups/tst/standard/semigroups/semieunit.tst +339 -0
  327. gap/pkg/semigroups/tst/standard/semigroups/semiex.tst +2055 -0
  328. gap/pkg/semigroups/tst/standard/semigroups/semiffmat.tst +746 -0
  329. gap/pkg/semigroups/tst/standard/semigroups/semifp.tst +2702 -0
  330. gap/pkg/semigroups/tst/standard/semigroups/semigraph.tst +133 -0
  331. gap/pkg/semigroups/tst/standard/semigroups/semigrp.tst +1112 -0
  332. gap/pkg/semigroups/tst/standard/semigroups/semimaxplus.tst +654 -0
  333. gap/pkg/semigroups/tst/standard/semigroups/semipbr.tst +2142 -0
  334. gap/pkg/semigroups/tst/standard/semigroups/semipperm.tst +2169 -0
  335. gap/pkg/semigroups/tst/standard/semigroups/semiquo.tst +278 -0
  336. gap/pkg/semigroups/tst/standard/semigroups/semirms.tst +3010 -0
  337. gap/pkg/semigroups/tst/standard/semigroups/semitrans.tst +2758 -0
  338. gap/pkg/semigroups/tst/standard/tools/display.tst +1040 -0
  339. gap/pkg/semigroups/tst/standard/tools/io.tst +363 -0
  340. gap/pkg/semigroups/tst/testinstall.tst +1815 -0
  341. gap/pkg/semigroups/tst/teststandard.g +22 -0
  342. gap/pkg/semigroups/tst/workspaces/load-workspace.tst +142 -0
  343. gap/pkg/semigroups/tst/workspaces/load.g +11 -0
  344. gap/pkg/semigroups/tst/workspaces/save-workspace.tst +166 -0
  345. gap/pkg/semigroups/tst/workspaces/save.g +14 -0
  346. passagemath_gap_pkg_semigroups-10.6.30.dist-info/METADATA +93 -0
  347. passagemath_gap_pkg_semigroups-10.6.30.dist-info/METADATA.bak +94 -0
  348. passagemath_gap_pkg_semigroups-10.6.30.dist-info/RECORD +354 -0
  349. passagemath_gap_pkg_semigroups-10.6.30.dist-info/WHEEL +6 -0
  350. passagemath_gap_pkg_semigroups-10.6.30.dist-info/top_level.txt +1 -0
  351. passagemath_gap_pkg_semigroups.dylibs/libsemigroups.2.dylib +0 -0
  352. sage/all__sagemath_gap_pkg_semigroups.py +1 -0
  353. sage/libs/all__sagemath_gap_pkg_semigroups.py +1 -0
  354. sage/libs/gap_pkg_semigroups.cpython-311-darwin.so +0 -0
@@ -0,0 +1,17 @@
1
+ #############################################################################
2
+ ##
3
+ ## tools/io.gd
4
+ ## Copyright (C) 2013-2022 James D. Mitchell
5
+ ##
6
+ ## Licensing information can be found in the README file of this package.
7
+ ##
8
+ #############################################################################
9
+ ##
10
+
11
+ DeclareGlobalFunction("ReadGenerators");
12
+ DeclareGlobalFunction("WriteGenerators");
13
+ DeclareGlobalFunction("IteratorFromGeneratorsFile");
14
+
15
+ DeclareGlobalFunction("ReadMultiplicationTable");
16
+ DeclareGlobalFunction("WriteMultiplicationTable");
17
+ DeclareGlobalFunction("IteratorFromMultiplicationTableFile");
@@ -0,0 +1,543 @@
1
+ #############################################################################
2
+ ##
3
+ ## tools/io.gi
4
+ ## Copyright (C) 2013-2022 James D. Mitchell
5
+ ##
6
+ ## Licensing information can be found in the README file of this package.
7
+ ##
8
+ #############################################################################
9
+ ##
10
+
11
+ #############################################################################
12
+ # Internal functions - for reading and writing generators to a file
13
+ #############################################################################
14
+
15
+ # This function sets the component <decoder> of the IO file object <f> to a
16
+ # function that can be called on the file object to decode its contents. This
17
+ # is not called before anything is read from <f>.
18
+ SEMIGROUPS.FileDecoder := function(f)
19
+ local char;
20
+
21
+ if not IsBound(f!.decoder) then
22
+ Assert(1, IsBound(f!.rpos) and f!.rpos = 1);
23
+ char := IO_ReadBlock(f, 1);
24
+ if char in ["t", "p", "b"] then
25
+ # Use old style decoding
26
+ f!.decoder := x -> SEMIGROUPS.ReadGeneratorsLine(Chomp(IO_ReadLine(x)));
27
+ else
28
+ # Use IO pickling
29
+ f!.decoder := IO_Unpickle;
30
+ fi;
31
+ # Rewind, this is probably a bad idea.
32
+ f!.rpos := 1;
33
+ f!.rdata := f!.rdata + 1;
34
+ fi;
35
+ return f!.decoder;
36
+ end;
37
+
38
+ # This function converts a line in an old style "generators" file into the
39
+ # corresponding object.
40
+ SEMIGROUPS.ReadGeneratorsLine := function(line)
41
+ local i, k, out, m, deg, f, j;
42
+
43
+ i := 2;
44
+ k := 0;
45
+ out := [];
46
+
47
+ while i < Length(line) do
48
+ m := Int([line[i]]); # blocksize
49
+ deg := Int(NormalizedWhitespace(line{[i + 1 .. m + i]})); # max domain
50
+ f := line{[m + i + 1 .. i + m * (deg + 1)]};
51
+ k := k + 1;
52
+ out[k] := EmptyPlist(deg);
53
+ for j in [1 .. deg] do
54
+ Add(out[k], Int(NormalizedWhitespace(f{[(j - 1) * m + 1 .. j * m]})));
55
+ od;
56
+ i := i + m * (deg + 1) + 1;
57
+ od;
58
+
59
+ if IsEmpty(line) then
60
+ return IO_Nothing;
61
+ elif line[1] = 't' then # transformations
62
+ Apply(out, TransformationNC);
63
+ elif line[1] = 'p' then # partial perms
64
+ Apply(out, DensePartialPermNC);
65
+ elif line[1] = 'b' then # bipartitions
66
+ Apply(out, BIPART_NC);
67
+ fi;
68
+
69
+ return out;
70
+ end;
71
+
72
+ # This function converts a transformation/partial perm/bipartition collection
73
+ # <coll> in a line of an old style "generators" file and writes that line to
74
+ # the file <file>, using IO_WriteLine.
75
+ SEMIGROUPS.WriteGeneratorsLine := function(file, coll)
76
+ local append, line, deg, nrdigits, x, i;
77
+
78
+ append := function(str, pt, m)
79
+ local i, j;
80
+
81
+ i := String(pt);
82
+ for j in [1 .. m - Length(i)] do
83
+ Append(str, " ");
84
+ od;
85
+ Append(str, i);
86
+ return str;
87
+ end;
88
+
89
+ if IsTransformationCollection(coll) then
90
+ line := "t";
91
+ for x in coll do
92
+ deg := String(DegreeOfTransformation(x));
93
+ nrdigits := Length(deg);
94
+ Append(line, String(nrdigits));
95
+ Append(line, deg);
96
+ for i in [1 .. DegreeOfTransformation(x)] do
97
+ append(line, i ^ x, nrdigits);
98
+ od;
99
+ od;
100
+ elif IsPartialPermCollection(coll) then
101
+ line := "p";
102
+ for x in coll do
103
+ deg := String(DegreeOfPartialPerm(x));
104
+ nrdigits := Length(String(Maximum(DegreeOfPartialPerm(x),
105
+ CodegreeOfPartialPerm(x))));
106
+ Append(line, String(nrdigits));
107
+ append(line, deg, nrdigits);
108
+ for i in [1 .. DegreeOfPartialPerm(x)] do
109
+ append(line, i ^ x, nrdigits);
110
+ od;
111
+ od;
112
+ elif IsBipartitionCollection(coll) then
113
+ line := "b";
114
+ for x in coll do
115
+ deg := String(2 * DegreeOfBipartition(x));
116
+ nrdigits := Length(deg);
117
+ Append(line, String(nrdigits));
118
+ Append(line, deg);
119
+ for i in IntRepOfBipartition(x) do
120
+ append(line, i, nrdigits);
121
+ od;
122
+ od;
123
+ fi;
124
+ if IO_WriteLine(file, line) = fail then
125
+ # Cannot test this line
126
+ return IO_Error;
127
+ else
128
+ return IO_OK;
129
+ fi;
130
+ end;
131
+
132
+ #############################################################################
133
+ # User functions - for reading and writing generators to a file
134
+ #############################################################################
135
+
136
+ InstallGlobalFunction(ReadGenerators,
137
+ function(arg...)
138
+ local name, line_nr, file, decoder, i, obj, out;
139
+
140
+ if Length(arg) = 1 then
141
+ name := arg[1];
142
+ line_nr := 0; # Read all data
143
+ elif Length(arg) = 2 then
144
+ name := arg[1];
145
+ line_nr := arg[2];
146
+ else
147
+ ErrorNoReturn("there should be 1 or 2 arguments");
148
+ fi;
149
+
150
+ if IsString(name) then
151
+ name := UserHomeExpand(name);
152
+ file := IO_CompressedFile(name, "r");
153
+ if file = fail then
154
+ ErrorNoReturn("could not open the file ", name);
155
+ fi;
156
+ elif IsFile(name) then
157
+ file := name;
158
+ else
159
+ ErrorNoReturn("the 1st argument is not a string or a file");
160
+ fi;
161
+
162
+ if not (IsInt(line_nr) and line_nr >= 0) then
163
+ ErrorNoReturn("the 2nd argument is not a positive integer");
164
+ fi;
165
+
166
+ decoder := SEMIGROUPS.FileDecoder(file);
167
+
168
+ if line_nr <> 0 then
169
+ # When the first arg is a file this means get the line_nr-th entry from the
170
+ # last read entry and not necessarily from the start of the file.
171
+ i := 0;
172
+ repeat
173
+ i := i + 1;
174
+ obj := decoder(file);
175
+ # This is potentially more costly than necessary, since we fully
176
+ # decode every line, and then just throw it away.
177
+ until i = line_nr or obj = IO_Nothing;
178
+
179
+ if IsString(arg[1]) then
180
+ IO_Close(file);
181
+ fi;
182
+ if obj = IO_Nothing then
183
+ ErrorNoReturn("the file only has ", i - 1, " further entries");
184
+ fi;
185
+ return obj;
186
+ else
187
+ i := 0;
188
+ out := [];
189
+ obj := decoder(file);
190
+ while obj <> IO_Nothing do
191
+ i := i + 1;
192
+ out[i] := obj;
193
+ obj := decoder(file);
194
+ od;
195
+
196
+ if IsString(arg[1]) then
197
+ IO_Close(file);
198
+ fi;
199
+ return out;
200
+ fi;
201
+ end);
202
+
203
+ InstallGlobalFunction(WriteGenerators,
204
+ function(arg...)
205
+ local name, collcoll, mode, file, encoder, coll;
206
+
207
+ if Length(arg) = 2 then
208
+ name := arg[1];
209
+ collcoll := arg[2];
210
+ mode := "w";
211
+ encoder := fail;
212
+ elif Length(arg) = 3 then
213
+ if IsString(arg[3]) then
214
+ name := arg[1];
215
+ collcoll := arg[2];
216
+ mode := arg[3];
217
+ encoder := fail;
218
+ elif IsFunction(arg[3]) then
219
+ name := arg[1];
220
+ collcoll := arg[2];
221
+ mode := "w";
222
+ encoder := arg[3];
223
+ else
224
+ ErrorNoReturn("the 3rd argument is not a string or a function");
225
+ fi;
226
+ elif Length(arg) = 4 then
227
+ name := arg[1];
228
+ collcoll := arg[2];
229
+ mode := arg[3];
230
+ encoder := arg[4];
231
+ else
232
+ ErrorNoReturn("there should be 2, 3, or 4 arguments");
233
+ fi;
234
+
235
+ if mode <> "a" and mode <> "w" then
236
+ ErrorNoReturn("the 3rd argument is not \"a\" or \"w\"");
237
+ elif IsString(name) then
238
+ name := UserHomeExpand(name);
239
+ file := IO_CompressedFile(name, mode);
240
+ if file = fail then
241
+ # Cannot test this
242
+ ErrorNoReturn("couldn't open the file ", name);
243
+ fi;
244
+ elif IsFile(name) then
245
+ file := name;
246
+ else
247
+ ErrorNoReturn("the 1st argument is not a string or a file");
248
+ fi;
249
+
250
+ if not IsList(collcoll) or IsEmpty(collcoll) then
251
+ if IsString(name) then
252
+ IO_Close(file);
253
+ fi;
254
+ ErrorNoReturn("the 2nd argument is not a non-empty list");
255
+ fi;
256
+
257
+ if encoder = fail then
258
+ encoder := IO_Pickle;
259
+ elif not IsFunction(encoder) then
260
+ if IsString(name) then
261
+ IO_Close(file);
262
+ fi;
263
+ ErrorNoReturn("the 3rd or 4th argument is not a function");
264
+ fi;
265
+
266
+ # Check encoder is consistent with <coll>
267
+ if encoder = SEMIGROUPS.WriteGeneratorsLine
268
+ and ForAny(collcoll, x -> not (IsTransformationCollection(x)
269
+ or IsPartialPermCollection(x)
270
+ or IsBipartitionCollection(x))) then
271
+ if IsString(name) then
272
+ IO_Close(file);
273
+ fi;
274
+ ErrorNoReturn("the 2nd argument is incompatible with the file format");
275
+ fi;
276
+
277
+ for coll in collcoll do
278
+ if IsSemigroup(coll)
279
+ and not (IsReesMatrixSemigroup(coll)
280
+ or IsReesZeroMatrixSemigroup(coll)) then
281
+ coll := GeneratorsOfSemigroup(coll);
282
+ # We could use a smaller generating set (i.e. GeneratorsOfMonoid,
283
+ # GeneratorsOfInverseSemigroup etc) but we have no way of knowing which
284
+ # generators we wrote, so better always use GeneratorsOfSemigroup.
285
+ fi;
286
+ if encoder(file, coll) = IO_Error then
287
+ # Cannot test this line
288
+ return IO_Error;
289
+ fi;
290
+ od;
291
+
292
+ if IsString(name) then
293
+ IO_Close(file);
294
+ fi;
295
+ return IO_OK;
296
+ end);
297
+
298
+ InstallGlobalFunction(IteratorFromGeneratorsFile,
299
+ function(filename)
300
+ local file, decoder, record;
301
+
302
+ filename := UserHomeExpand(filename);
303
+ file := IO_CompressedFile(filename, "r");
304
+
305
+ if file = fail then
306
+ return fail;
307
+ fi;
308
+
309
+ decoder := SEMIGROUPS.FileDecoder(file);
310
+
311
+ record := rec(file := file,
312
+ filename := filename,
313
+ decoder := decoder,
314
+ current := decoder(file));
315
+
316
+ record.NextIterator := function(iter)
317
+ local next;
318
+ next := iter!.current;
319
+ iter!.current := iter!.decoder(iter!.file);
320
+ return next;
321
+ end;
322
+
323
+ record.IsDoneIterator := function(iter)
324
+ if iter!.current = IO_Nothing then
325
+ if not iter!.file!.closed then
326
+ IO_Close(iter!.file);
327
+ fi;
328
+ return true;
329
+ else
330
+ return false;
331
+ fi;
332
+ end;
333
+
334
+ record.ShallowCopy := function(iter)
335
+ return rec(file := IO_CompressedFile(iter!.filename, "r"),
336
+ filename := iter!.filename,
337
+ decoder := iter!.decoder,
338
+ current := iter!.decoder(~.file));
339
+ end;
340
+
341
+ return IteratorByFunctions(record);
342
+ end);
343
+
344
+ ################################################################################
345
+ # User functions for multiplication tables
346
+ ################################################################################
347
+
348
+ InstallGlobalFunction(ReadMultiplicationTable,
349
+ function(arg...)
350
+ local name, line_nr, file, ReadMultiplicationTableLine, i, line, lines;
351
+ if Length(arg) = 1 then
352
+ name := arg[1];
353
+ line_nr := 0;
354
+ elif Length(arg) = 2 then
355
+ name := arg[1];
356
+ line_nr := arg[2];
357
+ else
358
+ ErrorNoReturn("there should be 1 or 2 arguments");
359
+ fi;
360
+ if IsString(name) then
361
+ name := UserHomeExpand(name);
362
+ file := IO_CompressedFile(name, "r");
363
+ if file = fail then
364
+ ErrorNoReturn("could not open the file \"", name, "\"");
365
+ fi;
366
+ elif IsFile(name) then
367
+ file := name;
368
+ else
369
+ ErrorNoReturn("the 1st argument is not a string or a file");
370
+ fi;
371
+ if not (IsInt(line_nr) and line_nr >= 0) then
372
+ ErrorNoReturn("the 2nd argument is not a positive integer");
373
+ fi;
374
+ ReadMultiplicationTableLine := SEMIGROUPS.ReadMultiplicationTableLine;
375
+
376
+ if line_nr <> 0 then
377
+ i := 0;
378
+ repeat
379
+ i := i + 1;
380
+ line := IO_ReadLine(file);
381
+ until i = line_nr or line = "";
382
+ if IsString(arg[1]) then
383
+ IO_Close(file);
384
+ elif line = "" then
385
+ ErrorNoReturn("the file only has ", i - 1, " lines");
386
+ fi;
387
+ return ReadMultiplicationTableLine(Chomp(line), RootInt(Length(line)));
388
+ else
389
+ lines := IO_ReadLines(file);
390
+ if IsString(arg[1]) then
391
+ IO_Close(file);
392
+ fi;
393
+ Apply(lines, line -> ReadMultiplicationTableLine(Chomp(line),
394
+ RootInt(Length(line))));
395
+ return lines;
396
+ fi;
397
+ end);
398
+
399
+ SEMIGROUPS.ReadMultiplicationTableLine := function(line, n)
400
+ local table, vals, row, entry, i, j;
401
+ table := EmptyPlist(n);
402
+ vals := [0 .. n - 1];
403
+ for i in vals do
404
+ row := EmptyPlist(n);
405
+ for j in vals do
406
+ entry := IntChar(line[i * n + j + 1]);
407
+ if entry = 0 then
408
+ row[j + 1] := 10;
409
+ else
410
+ row[j + 1] := entry;
411
+ fi;
412
+ od;
413
+ table[i + 1] := row;
414
+ od;
415
+ return table;
416
+ end;
417
+
418
+ InstallGlobalFunction(WriteMultiplicationTable,
419
+ function(arg...)
420
+ local name, coll, mode, file, str, i, j, k, n;
421
+
422
+ if Length(arg) = 2 then
423
+ name := arg[1];
424
+ coll := arg[2];
425
+ mode := "w";
426
+ elif Length(arg) = 3 then
427
+ name := arg[1];
428
+ coll := arg[2];
429
+ mode := arg[3];
430
+ else
431
+ ErrorNoReturn("there must be 2 or 3 arguments");
432
+ fi;
433
+
434
+ if mode <> "a" and mode <> "w" then
435
+ ErrorNoReturn("the 3rd argument is not \"a\" or \"w\"");
436
+ elif IsString(name) then
437
+ name := UserHomeExpand(name);
438
+ file := IO_CompressedFile(name, mode);
439
+ if file = fail then
440
+ # Cannot test this
441
+ ErrorNoReturn("couldn't open the file ", name);
442
+ fi;
443
+ elif IsFile(name) then
444
+ file := name;
445
+ else
446
+ ErrorNoReturn("the 1st argument is not a string or a file");
447
+ fi;
448
+
449
+ for i in [1 .. Length(coll)] do
450
+ n := Size(coll[i]); # Don't assume all multiplication tables are same size.
451
+ if not (IsRectangularTable(coll[i]) and IsInt(coll[i][1][1])) then
452
+ if IsString(name) then
453
+ IO_Close(file);
454
+ fi;
455
+ ErrorNoReturn("the 2nd argument is not a collection of rectangular ",
456
+ "tables containing only integers");
457
+ elif not n < 256 then
458
+ if IsString(name) then
459
+ IO_Close(file);
460
+ fi;
461
+ ErrorNoReturn("the 2nd argument is not a collection of rectangular ",
462
+ "tables with at most 255 rows");
463
+ fi;
464
+
465
+ str := EmptyString(n ^ 2 + 1); # + 1 for newline character
466
+ for j in [1 .. n] do
467
+ for k in [1 .. n] do
468
+ if not (0 < coll[i][j][k] and coll[i][j][k] <= n) then
469
+ if IsString(name) then
470
+ IO_Close(file);
471
+ fi;
472
+ ErrorNoReturn("the 2nd argument is not a collection of ",
473
+ "rectangular tables with integer entries from [1, 2, ",
474
+ "..., n] (where n equals the number of rows of the ",
475
+ "table)");
476
+ elif coll[i][j][k] = 10 then
477
+ Add(str, '\000'); # We use CharInt(0) since CharInt(10) is newline.
478
+ else
479
+ Add(str, CharInt(coll[i][j][k]));
480
+ fi;
481
+ od;
482
+ od;
483
+ Add(str, '\n');
484
+
485
+ if IO_Write(file, str) = fail then
486
+ # Cannot test this line
487
+ return IO_Error;
488
+ fi;
489
+ od;
490
+
491
+ if IsString(name) then
492
+ IO_Close(file);
493
+ fi;
494
+ return IO_OK;
495
+ end);
496
+
497
+ InstallGlobalFunction(IteratorFromMultiplicationTableFile,
498
+ function(str)
499
+ local file, line, record, n;
500
+
501
+ file := IO_CompressedFile(UserHomeExpand(str), "r");
502
+
503
+ if file = fail then
504
+ return fail;
505
+ fi;
506
+
507
+ line := IO_ReadLine(file);
508
+ n := RootInt(Length(line));
509
+ line := SEMIGROUPS.ReadMultiplicationTableLine(Chomp(line), n);
510
+ record := rec(file := file, current := line);
511
+
512
+ record.NextIterator := function(iter)
513
+ local next;
514
+ next := iter!.current;
515
+ iter!.current := IO_ReadLine(iter!.file);
516
+ if iter!.current <> "" then
517
+ iter!.current
518
+ := SEMIGROUPS.ReadMultiplicationTableLine(Chomp(iter!.current), n);
519
+ fi;
520
+ return next;
521
+ end;
522
+
523
+ record.IsDoneIterator := function(iter)
524
+ if iter!.current = "" then
525
+ if not iter!.file!.closed then
526
+ IO_Close(iter!.file);
527
+ fi;
528
+ return true;
529
+ else
530
+ return false;
531
+ fi;
532
+ end;
533
+
534
+ # TODO use iter here? Store things in the iterator?
535
+ record.ShallowCopy := function(_)
536
+ local file, line;
537
+ file := IO_CompressedFile(UserHomeExpand(str), "r");
538
+ line := SEMIGROUPS.ReadMultiplicationTableLine(Chomp(IO_ReadLine(file)), n);
539
+ return rec(file := file, current := line);
540
+ end;
541
+
542
+ return IteratorByFunctions(record);
543
+ end);
@@ -0,0 +1,16 @@
1
+ ############################################################################
2
+ ##
3
+ ## tools/iterators.gd
4
+ ## Copyright (C) 2013-2022 James D. Mitchell
5
+ ##
6
+ ## Licensing information can be found in the README file of this package.
7
+ ##
8
+ #############################################################################
9
+ ##
10
+
11
+ DeclareGlobalFunction("IteratorByNextIterator");
12
+ DeclareGlobalFunction("ChainIterators");
13
+ DeclareGlobalFunction("WrappedIterator");
14
+ DeclareGlobalFunction("IteratorFiniteList");
15
+
16
+ DeclareGlobalFunction("WrappedEnumerator");