Skip to content

Commit 767829c

Browse files
Add support for Konieczny
1 parent 136f948 commit 767829c

20 files changed

+1641
-14
lines changed

docs/source/conf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
3939
htmlhelp_basename = "libsemigroups_pybind11"
4040

41+
# The option in the next line stops the page sections and toc (which have the
42+
# same names) from being duplicated in the sidebar on the Konieczny and
43+
# FroidurePin pages
44+
html_theme_options = {"titles_only": True}
45+
4146
man_pages = [
4247
(
4348
master_doc,

docs/source/konieczny.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.. Copyright (c) 2022, 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+
Konieczny
8+
=========
9+
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.
16+
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`.
21+
22+
The classes implementing the Konieczny and Lallement-McFadden algorithm are:
23+
24+
.. toctree::
25+
:maxdepth: 1
26+
27+
konieczny/index.rst
28+
konieczny/dclass/index.rst

docs/source/konieczny/attributes.rst

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
.. Copyright (c) 2022, 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+
Attributes
8+
==========
9+
10+
This page contains information about attributes of the :py:class:`Konieczny`
11+
class.
12+
13+
.. py:method:: Konieczny.degree(self: Konieczny) -> int
14+
15+
Returns the degree of any and all elements.
16+
17+
:Parameters: None
18+
:Returns: An ``int``.
19+
20+
.. py:method:: Konieczny.size(self: Konieczny) -> int
21+
22+
Returns the size.
23+
24+
:note:
25+
This function triggers a full enumeration of the frames of every
26+
:math:`\mathscr{D}`-class.
27+
28+
:Parameters: None
29+
:Returns: An ``int``.
30+
31+
.. py:method:: Konieczny.current_size(self: Konieczny) -> int
32+
33+
Returns the current size.
34+
35+
:note:
36+
This function triggers no enumeration.
37+
38+
:Parameters: None
39+
:return: An ``int``.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
.. Copyright (c) 2022, 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+
8+
Konieczny.DClass
9+
=================
10+
11+
.. py:class:: Konieczny.DClass
12+
13+
14+
The nested abstract class :py:obj:`Konieczny.DClass` represents a
15+
:math:`\mathscr{D}`-class of a finite semigroup via a frame as computed in
16+
Konieczny’s algorithm. See :py:obj:`Konieczny` for more details.
17+
18+
:py:obj:`Konieczny.DClass` instances cannot be directly constructed; instead
19+
you should obtain a :math:`\mathscr{D}`-class by calling
20+
:py:meth:`Konieczny.D_class_of_element`.
21+
22+
.. toctree::
23+
:hidden:
24+
25+
methods.rst
26+
27+
Methods
28+
-------
29+
30+
.. list-table::
31+
:widths: 50 50
32+
:header-rows: 0
33+
34+
* - :py:meth:`Konieczny.DClass.contains`
35+
- Test membership of an element.
36+
37+
* - :py:meth:`Konieczny.DClass.is_regular_D_class`
38+
- Test regularity of a :math:`\mathscr{D}`-class.
39+
40+
* - :py:meth:`Konieczny.DClass.number_of_L_classes`
41+
- Returns the number of :math:`\mathscr{L}`-classes.
42+
43+
* - :py:meth:`Konieczny.DClass.number_of_R_classes`
44+
- Returns the number of :math:`\mathscr{R}`-classes.
45+
46+
* - :py:meth:`Konieczny.DClass.number_of_idempotents`
47+
- Returns the number of idempotents.
48+
49+
* - :py:meth:`Konieczny.DClass.rep`
50+
- Returns a representative of the :math:`\mathscr{D}`-class.
51+
52+
* - :py:meth:`Konieczny.DClass.size`
53+
- Returns the size of a :math:`\mathscr{D}`-class.
54+
55+
* - :py:meth:`Konieczny.DClass.size_H_class`
56+
- Returns the size of the :math:`\mathscr{H}`-classes.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
.. Copyright (c) 2022, 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+
Methods
8+
=======
9+
10+
This page contains information about the methods of the
11+
:py:class:`Konieczny.DClass` class.
12+
13+
.. py:method:: Konieczny.DClass.contains(self: Konieczny.DClass, x: Element) -> bool
14+
15+
Test membership of an element in a :math:`\mathscr{D}`-class.
16+
17+
:param x: a possible element.
18+
:type x: Element
19+
20+
:return: A ``bool``.
21+
22+
.. py:method:: Konieczny.DClass.is_regular_D_class(self: Konieczny.DClass) -> bool
23+
24+
Test regularity of a :math:`\mathscr{D}`-class.
25+
26+
:Parameters: None
27+
28+
:return: A ``bool``.
29+
30+
.. py:method:: Konieczny.DClass.number_of_R_classes(self: Konieczny.DClass) -> int
31+
32+
Returns the number of :math:`\mathscr{R}`-classes.
33+
34+
:Parameters: None
35+
36+
:return: An integer.
37+
38+
.. py:method:: Konieczny.DClass.number_of_L_classes(self: Konieczny.DClass) -> int
39+
40+
Returns the number of :math:`\mathscr{L}`-classes.
41+
42+
:Parameters: None
43+
44+
:return: An integer.
45+
46+
.. py:method:: Konieczny.DClass.number_of_idempotents(self: Konieczny.DClass) -> int
47+
48+
Returns the number of idempotents.
49+
50+
:Parameters: None
51+
:return: An ``int``.
52+
53+
.. py:method:: Konieczny.DClass.rep(self: Konieczny.DClass) -> Element
54+
55+
Returns a representative of the :math:`\mathscr{D}`-class.
56+
57+
:Parameters: None
58+
:return: An ``Element``.
59+
60+
.. py:method:: Konieczny.DClass.size(self: Konieczny.DClass) -> int
61+
62+
Returns the size of a :math:`\mathscr{D}`-class.
63+
64+
:Parameters: None
65+
:Returns: An ``int``.
66+
67+
.. py:method:: Konieczny.DClass.size_H_class(self: Konieczny.DClass) -> int
68+
69+
Returns the size of the :math:`\mathscr{H}`-classes.
70+
71+
:Parameters: None
72+
:Returns: An ``int``.

docs/source/konieczny/generators.rst

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
.. Copyright (c) 2021, 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+
Generators
8+
----------
9+
10+
This page contains information about the methods of the :py:class:`Konieczny`
11+
class that relate to generators.
12+
13+
.. py:method:: Konieczny.add_generator(self: Konieczny, x: Element) -> None
14+
15+
Add a copy of an element to the generators.
16+
17+
:param x: the generator to add.
18+
:type x: Element
19+
20+
:return: None
21+
22+
.. py:method:: Konieczny.number_of_generators(self: Konieczny) -> int
23+
24+
Returns the number of generators.
25+
26+
:Parameters: None
27+
:return: An ``int``.
28+
29+
.. py:method:: Konieczny.generator(self: Konieczny, i: int) -> Element
30+
31+
Returns the generator with specified index.
32+
33+
:param i: the index of a generator.
34+
:type i: int
35+
36+
:return: An element.
37+
38+
.. py:method:: Konieczny.generators(self: Konieczny) -> Iterator
39+
40+
Returns an iterator pointing to the first generator.
41+
42+
This function does not trigger any enumeration; the iterator returned may
43+
be invalidated by any call to a method of the :py:obj:`Konieczny`
44+
class.
45+
46+
:Parameters: None
47+
:return: An iterator.

0 commit comments

Comments
 (0)