Skip to content

Commit 9e8538f

Browse files
doc: readd MatrixKind doc (#266)
* doc: readd MatrixKind doc * Fix linting * Update docs/source/install.rst Co-authored-by: Joe Edwards <80713360+Joseph-Edwards@users.noreply.github.com> --------- Co-authored-by: Joe Edwards <80713360+Joseph-Edwards@users.noreply.github.com>
1 parent 7155f2f commit 9e8538f

2 files changed

Lines changed: 47 additions & 2 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ MatrixKind
150150
----------
151151

152152
.. autoclass:: MatrixKind
153+
:show-inheritance:
153154

154155
..
155156
TODO later summary

src/libsemigroups_pybind11/matrix.py

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,53 @@
3636
# the underscore prefix stops this from appearing in the doc of the
3737
# "matrix" submodule
3838
class _MatrixKind(_Enum):
39-
""""""
40-
4139
# pylint: disable=invalid-name
40+
"""
41+
42+
This enum contains values that can be used to describe the type of semiring
43+
over which a :any:`Matrix` is defined.
44+
45+
.. py:attribute:: MatrixKind.Boolean
46+
:value: <MatrixKind.Boolean: 0>
47+
48+
For matrices over the Boolean semiring.
49+
50+
.. py:attribute:: MatrixKind.Integer
51+
:value: <MatrixKind.Integer: 1>
52+
53+
For matrices over the usual ring of integers.
54+
55+
.. py:attribute:: MatrixKind.MaxPlus
56+
:value: <MatrixKind.MaxPlus: 2>
57+
58+
For matrices over the max-plus semiring.
59+
60+
.. py:attribute:: MatrixKind.MinPlus
61+
:value: <MatrixKind.MinPlus: 3>
62+
63+
For matrices over the min-plus semiring.
64+
65+
.. py:attribute:: MatrixKind.ProjMaxPlus
66+
:value: <MatrixKind.ProjMaxPlus: 4>
67+
68+
For projective matrices over the max-plus semiring.
69+
70+
.. py:attribute:: MatrixKind.MaxPlusTrunc
71+
:value: <MatrixKind.MaxPlusTrunc: 5>
72+
73+
For matrices over the truncated max-plus semiring.
74+
75+
.. py:attribute:: MatrixKind.MinPlusTrunc
76+
:value: <MatrixKind.MinPlusTrunc: 6>
77+
78+
For matrices over the truncated min-plus semiring.
79+
80+
.. py:attribute:: MatrixKind.NTP
81+
:value: <MatrixKind.NTP: 7>
82+
83+
For matrices over the semiring of natural numbers quotiented by `t
84+
= t + p`.
85+
"""
4286

4387
Boolean = 0
4488
Integer = 1

0 commit comments

Comments
 (0)