Skip to content

Commit 54ad2ee

Browse files
Konieczny hpp (#223)
* Compiling * First stab at Konieczny * Add missing files * Finalising * Finalising x2 * Lint * Import Self from typing_extensions * Punctuation * Restructure doc * Minor doc tweaks --------- Co-authored-by: Joseph Edwards <josephdavidedwards@gmail.com>
1 parent ad4d455 commit 54ad2ee

File tree

21 files changed

+1484
-169
lines changed

21 files changed

+1484
-169
lines changed

docs/source/conf.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ def doc_only_run(self):
5656
docstring = list(node.findall(condition=desc_content))
5757

5858
if not docstring:
59-
logger.warning(
60-
f"The docstring for {self.arguments[0]} cannot be found."
61-
)
59+
logger.warning(f"The docstring for {self.arguments[0]} cannot be found.")
6260
return []
6361

6462
return docstring
@@ -104,9 +102,7 @@ def no_doc_run(self):
104102
source_suffix = ".rst"
105103
master_doc = "index"
106104
project = "libsemigroups_pybind11"
107-
copyright = (
108-
"2021-2024, Joseph Edwards, James Mitchell, Maria Tsalakou, Murray Whyte"
109-
)
105+
copyright = "2021-2024, Joseph Edwards, James Mitchell, Maria Tsalakou, Murray Whyte"
110106
author = "Joseph Edwards, James Mitchell, Maria Tsalakou, Murray Whyte"
111107
version = "1.0.0"
112108
release = "1.0.0"
@@ -175,6 +171,8 @@ def no_doc_run(self):
175171
r"libsemigroups::BooleanProd, libsemigroups::BooleanZero, "
176172
r"libsemigroups::BooleanOne, int>"
177173
): r"Matrix",
174+
r"libsemigroups::Konieczny<BMat8, "
175+
"libsemigroups::KoniecznyTraits<BMat8>>::DClass": "KoniecznyBMat8DClass",
178176
}
179177

180178
# This dictionary should be of the form class_name -> (pattern, repl), where
@@ -184,6 +182,7 @@ def no_doc_run(self):
184182
"RightActionPPerm1List": [
185183
("libsemigroups::PPerm<16ul, unsigned char>", "Element"),
186184
("libsemigroups::Element", "Element"),
185+
("libsemigroups::PPerm<0ul, unsigned char>", "Element"),
187186
],
188187
"Transf1": [
189188
("PTransfBase1", "Transf1"),
@@ -208,6 +207,14 @@ def no_doc_run(self):
208207
("SubclassType", "RepOrc"),
209208
("SimsSettingsRepOrc", "RepOrc"),
210209
],
210+
"KoniecznyBMat8": [
211+
(r"\bBMat8\b", "Element"),
212+
(
213+
"libsemigroups::Konieczny<libsemigroups::Element, "
214+
"libsemigroups::KoniecznyTraits<libsemigroups::Element>>::DClass",
215+
"KoniecznyBMat8.DClass",
216+
),
217+
],
211218
}
212219

213220
# This is what sphinx considers to be a signature
@@ -436,6 +443,7 @@ def fix_overloads(app, what, name, obj, options, lines):
436443
r"todd_coxeter_partition.*$": "",
437444
r"todd_coxeter_redundant_rule.*$": "",
438445
r"word_graph_dot\(.*\)(\s*->\s*(\w+::)*\w*)?": "",
446+
r"D_class_of_element\(.*$": "",
439447
}
440448

441449

docs/source/data-structures/elements/matrix/bmat8-helpers.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,26 @@ submodule ``libsemigroups_pybind11.bmat8``.
1616
Contents
1717
--------
1818

19+
.. currentmodule:: libsemigroups_pybind11.bmat8
20+
1921
.. autosummary::
2022
:nosignatures:
2123

24+
col_space_basis
25+
col_space_size
26+
minimum_dim
27+
number_of_cols
28+
number_of_rows
2229
one
2330
random
24-
transpose
2531
row_space_basis
26-
col_space_basis
27-
number_of_rows
28-
number_of_cols
2932
row_space_size
30-
col_space_size
31-
minimum_dim
3233
rows
34+
transpose
3335

3436
Full API
3537
--------
3638

3739
.. automodule:: libsemigroups_pybind11.bmat8
3840
:members:
3941
:imported-members:
40-

docs/source/main-algorithms/kambites/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ authors of ``libsemigroups``; see :cite:`Kambites2009aa`,
1717
.. toctree::
1818
:maxdepth: 1
1919

20-
class
20+
class
2121
helpers
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.. Copyright (c) 2025 J. D. Mitchell
2+
3+
Distributed under the terms of the GPL license version 3.
4+
5+
The full license is in the file LICENSE, distributed with this software.
6+
7+
.. currentmodule:: _libsemigroups_pybind11
8+
9+
Konieczny.DClass
10+
================
11+
12+
This page contains documentation for the nested class :any:`DClass`.
13+
14+
Contents
15+
--------
16+
17+
.. autosummary::
18+
:nosignatures:
19+
20+
~KoniecznyBMat8DClass
21+
KoniecznyBMat8DClass.contains
22+
KoniecznyBMat8DClass.is_regular_D_class
23+
KoniecznyBMat8DClass.number_of_L_classes
24+
KoniecznyBMat8DClass.number_of_R_classes
25+
KoniecznyBMat8DClass.number_of_idempotents
26+
KoniecznyBMat8DClass.rep
27+
KoniecznyBMat8DClass.size
28+
KoniecznyBMat8DClass.size_H_class
29+
30+
Full API
31+
--------
32+
33+
.. autoclass:: _libsemigroups_pybind11::KoniecznyBMat8DClass
34+
:members:
35+
:exclude-members: name
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
.. Copyright (c) 2022-2024 J. D. Mitchell
2+
3+
Distributed under the terms of the GPL license version 3.
4+
5+
The full license is in the file LICENSE, distributed with this software.
6+
7+
.. currentmodule:: _libsemigroups_pybind11
8+
9+
The Konieczny class
10+
===================
11+
12+
.. autoclass:: KoniecznyBMat8
13+
:doc-only:
14+
:class-doc-from: class
15+
16+
17+
Contents
18+
--------
19+
20+
.. autosummary::
21+
:nosignatures:
22+
23+
~KoniecznyBMat8
24+
KoniecznyBMat8.add_generator
25+
KoniecznyBMat8.add_generators
26+
KoniecznyBMat8.contains
27+
KoniecznyBMat8.copy
28+
KoniecznyBMat8.current_D_classes
29+
KoniecznyBMat8.current_number_of_D_classes
30+
KoniecznyBMat8.current_number_of_H_classes
31+
KoniecznyBMat8.current_number_of_L_classes
32+
KoniecznyBMat8.current_number_of_R_classes
33+
KoniecznyBMat8.current_number_of_idempotents
34+
KoniecznyBMat8.current_number_of_regular_D_classes
35+
KoniecznyBMat8.current_number_of_regular_L_classes
36+
KoniecznyBMat8.current_number_of_regular_R_classes
37+
KoniecznyBMat8.current_number_of_regular_elements
38+
KoniecznyBMat8.current_regular_D_classes
39+
KoniecznyBMat8.current_size
40+
KoniecznyBMat8.degree
41+
KoniecznyBMat8.generator
42+
KoniecznyBMat8.generators
43+
KoniecznyBMat8.init
44+
KoniecznyBMat8.is_regular_element
45+
KoniecznyBMat8.number_of_D_classes
46+
KoniecznyBMat8.number_of_H_classes
47+
KoniecznyBMat8.number_of_L_classes
48+
KoniecznyBMat8.number_of_R_classes
49+
KoniecznyBMat8.number_of_generators
50+
KoniecznyBMat8.number_of_idempotents
51+
KoniecznyBMat8.number_of_regular_D_classes
52+
KoniecznyBMat8.number_of_regular_L_classes
53+
KoniecznyBMat8.number_of_regular_R_classes
54+
KoniecznyBMat8.number_of_regular_elements
55+
KoniecznyBMat8.size
56+
57+
58+
59+
Full API
60+
--------
61+
62+
.. autoclass:: KoniecznyBMat8
63+
:class-doc-from: init
64+
:members:

docs/source/main-algorithms/konieczny/index.rst

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,11 @@
77
Konieczny
88
=========
99

10-
``libsemigroups_pybind11`` contains a preliminary implementation of Konieczny's
11-
generalisation of the Lallement-McFadden algorithm for computing the structure
12-
of finite semigroups that act on sets; see the documentation below for further
13-
details. It is preliminary in the sense that the interface exposed by the
14-
relevant classes is minimal, and that certain optimisations remain to be
15-
performed.
10+
This page describes the functionality for Konieczny's algorithm in
11+
``libsemigroups_pybind11``.
1612

17-
The implementation of the Konieczny and Lallement-McFadden algorithm can be
18-
used "interactively", in the sense that they can be run for a particular amount
19-
of time, or until some condition is met; for further details see, for example,
20-
:py:meth:`Konieczny.run_for` and :py:meth:`Konieczny.run_until`.
13+
.. toctree::
14+
:maxdepth: 1
2115

22-
TODO
16+
class
17+
DClass

docs/source/main-algorithms/low-index/helpers.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ manipulating ``Sims1``, ``Sims2``, ``RepOrc`` or ``MinimalRepOrc`` objects.
1414
All such functions are contained in the submodule
1515
``libsemigroups_pybind11.sims``.
1616

17-
1817
Contents
1918
--------
2019

docs/source/main-algorithms/schreier-sims/helpers.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,3 @@ Full API
3030

3131
.. automodule:: libsemigroups_pybind11.schreier_sims
3232
:members:
33-
:imported-members:

etc/replace-strings-in-doc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66

77
def dict_sub(replacements, string):
88
"""replacements has the form {"regex1": "replacement", "regex2": "replacement2", ...}"""
9-
global_expression = re.compile(
10-
"|".join("(" + x + ")" for x in replacements)
11-
)
9+
global_expression = re.compile("|".join("(" + x + ")" for x in replacements))
1210
replacements_by_group = {}
1311
group = 1
1412
for expr, replacement in replacements.items():
@@ -58,9 +56,11 @@ def dive(path):
5856
"libsemigroups_pybind11.bmat8": "bmat8",
5957
"libsemigroups_pybind11.knuth_bendix": "knuth_bendix",
6058
r"CongruenceWord": "Congruence",
59+
r"\bKoniecznyBMat8\b": "Konieczny",
60+
r"KoniecznyBMat8DClass": "Konieczny.DClass",
61+
r"SimsSettingsSims1": "SimsSettings",
6162
r"_libsemigroups_pybind11.": "",
6263
r"libsemigroups_pybind11\.": "",
63-
r"SimsSettingsSims1": "SimsSettings",
6464
}
6565
files = all_html_files(html_path)
6666

libsemigroups_pybind11/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,4 @@
112112
from .schreier_sims import SchreierSims
113113

114114
from .to import to
115+
from .konieczny import Konieczny

0 commit comments

Comments
 (0)