forked from libsemigroups/libsemigroups_pybind11
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkonieczny.cpp
More file actions
756 lines (616 loc) · 21.7 KB
/
konieczny.cpp
File metadata and controls
756 lines (616 loc) · 21.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
//
// libsemigroups_pybind11
// Copyright (C) 2025 James D. Mitchell
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www. gnu. org/licenses/>.
//
// libsemigroups headers
#include <libsemigroups/bmat-adapters.hpp>
#include <libsemigroups/bmat8.hpp>
#include <libsemigroups/konieczny.hpp>
#include <libsemigroups/matrix.hpp>
#include <libsemigroups/transf.hpp>
// pybind11. .. .
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
// libsemigroups_pybind11. .. .
#include "main.hpp" // for init_konieczny
namespace libsemigroups {
namespace py = pybind11;
namespace {
template <typename Element>
void bind_konieczny(py::module& m, std::string const& name) {
using Konieczny_ = Konieczny<Element>;
std::string actual_name = "Konieczny" + name;
py::class_<Konieczny_, Runner> thing(m,
actual_name.c_str(),
R"pbdoc(
The class :any:`Konieczny` implements Konieczny's algorithm as described
in Konieczny's article :cite:`Konieczny1994aa`. This algorithm is similar to
that of Lallement and McFadden from :cite:`Lallement1990aa`. It differs in
being applicable to subsemigroups of a non-regular semigroup, though is
essentially the same algorithm for elements which happen to be regular. A
:any:`Konieczny` instance is defined by a generating set, and the main
function is :any:`Runner.run`, which implements Konieczny's Algorithm. If
:any:`Runner.run` is invoked and :any:`Runner.finished` returns ``True``, then
the size, partial order of :math:`\mathscr{D}`-classes, and frames for each
:math:`\mathscr{D}`-class are known.
.. seealso:: :any:`Konieczny.DClass` and :any:`Runner`.
.. |name| replace:: :any:`Konieczny`
.. include:: ../../_static/runner_non_inherit.rst
)pbdoc");
thing.def("__repr__", [](Konieczny_ const& self) {
return to_human_readable_repr(self);
});
thing.def("__copy__",
[](Konieczny_ const& self) { return Konieczny_(self); });
thing.def(
"copy",
[](Konieczny_ const& self) { return Konieczny_(self); },
R"pbdoc(
:sig=(self: Konieczny) -> Konieczny:
Copy a Konieczny.
:returns: A copy of the argument.
:rtype: Konieczny
)pbdoc");
thing.def(py::init([](std::vector<Element> const& gens) {
return make<Konieczny>(gens);
}),
py::arg("gens"),
R"pbdoc(
:sig=(self: Konieczny, gens: list[Element]) -> None:
:only-document-once:
Construct from generators.
This function constructs a :any:`Konieczny` instance generated by the specified
container of generators. There can be duplicate generators and although they do
not count as distinct elements, they do count as distinct generators. In other
words, the generators are precisely (a copy of) *gens* in the same order they
occur in *gens*.
:param gens: the generators represented by this.
:type gens: list[Element]
:raises LibsemigroupsError: if *gens* is empty.
:raises LibsemigroupsError:
if the items in *gens* do not all have the same degree.
)pbdoc");
thing.def("init",
&Konieczny_::init,
R"pbdoc(
:sig=(self: Konieczny) -> Konieczny:
Reinitialize an existing :any:`Konieczny` object.
This function re-initializes a :any:`Konieczny` instance so that it is in the
same (logical) state as if it had just been default-constructed.
:returns: ``self``.
:rtype: Konieczny
)pbdoc");
// This constructor can't be used directly so isn't documented.
thing.def(py::init<>(), R"pbdoc(
:sig=(self: Konieczny, gens: list[Element]) -> None:
:only-document-once:
)pbdoc");
thing.def("add_generator",
&Konieczny_::add_generator,
py::arg("gen"),
R"pbdoc(
:sig=(self: Konieczny, gen: Element) -> Konieczny:
Add a copy of an element to the generators.
It is possible, if perhaps not desirable, to add the same generator multiple
times.
:param gen: the generator to add.
:type gen: Element
:returns: *self*.
:rtype: Konieczny
:raises LibsemigroupsError:
if the degree of *x* is incompatible with the existing degree.
:raises LibsemigroupsError: if :any:`started` returns ``True``.
)pbdoc");
thing.def(
"add_generators",
[](Konieczny_& self,
std::vector<Element> const& coll) -> Konieczny_& {
konieczny::add_generators(self, coll);
return self;
},
py::arg("coll"),
R"pbdoc(
:sig=(self: Konieczny, coll: list[Element]) -> Konieczny:
Add collection of generators from a list.
See :any:`Konieczny.add_generator` for a detailed description.
:param coll: the collection of generators to add.
:type coll: list[Element]
:returns: *self*.
:rtype: Konieczny
:raises LibsemigroupsError:
the degree of any item in *coll* is incompatible
with the existing degree (if any).
:raises LibsemigroupsError:
:any:`started` returns ``True``.
)pbdoc");
thing.def(
"current_D_classes",
[](Konieczny_ const& self) {
return py::make_iterator(self.cbegin_current_D_classes(),
self.cend_current_D_classes());
},
R"pbdoc(
:sig=(self: Konieczny) -> collections.abc.Iterator[Konieczny.DClass]:
Returns an iterator yielding the :math:`\mathscr{D}`-classes.
This function does not trigger any enumeration; the iterator returned may be
invalidated by any call to a non-const member function of the
:any:`Konieczny` class.
:returns:
An iterator.
:rtype:
collections.abc.Iterator[Konieczny.DClass]
)pbdoc");
thing.def(
"D_classes",
[](Konieczny_& self) {
self.run();
return py::make_iterator(self.cbegin_D_classes(),
self.cend_D_classes());
},
R"pbdoc(
:sig=(self: Konieczny) -> collections.abc.Iterator[Konieczny.DClass]:
Returns an iterator yielding the :math:`\mathscr{D}`-classes of a
:any:`Konieczny` object. This function triggers a full enumeration.
:returns:
An iterator yielding :math:`\mathscr{D}`-classes.
:rtype:
collections.abc.Iterator[Konieczny.DClass]
)pbdoc");
thing.def(
"generators",
[](Konieczny_ const& self) {
return py::make_iterator(self.cbegin_generators(),
self.cend_generators());
},
R"pbdoc(
:sig=(self: Konieczny) -> collections.abc.Iterator[Konieczny.DClass]:
Returns an iterator yielding the generators of a :any:`Konieczny` object.
This function does not trigger any enumeration; the iterator returned may be
invalidated by any call to a non-const member function of the
:any:`Konieczny` class.
:returns:
An iterator yielding the generators.
:rtype: collections.abc.Iterator[Konieczny.DClass]
)pbdoc");
thing.def(
"current_regular_D_classes",
[](Konieczny_ const& self) {
return py::make_iterator(self.cbegin_current_regular_D_classes(),
self.cend_current_regular_D_classes());
},
R"pbdoc(
:sig=(self: Konieczny) -> collections.abc.Iterator[Konieczny.DClass]:
Returns an iterator yielding the so-far enumerated regular
:math:`\mathscr{D}`-classes of a :any:`Konieczny` object. This function
does not trigger any enumeration; the iterator returned may be invalidated by
any call to a non-const member function of the :any:`Konieczny` class.
:returns:
An iterator yielding regular :math:`\mathscr{D}`-classes.
:rtype: collections.abc.Iterator[Konieczny.DClass]
)pbdoc");
thing.def("contains",
&Konieczny_::contains,
py::arg("x"),
R"pbdoc(
:sig=(self: Konieczny, x: Element) -> bool:
Test membership of an element.
Returns ``True`` if *x* belongs to *self* and ``False`` if it does not.
:param x: a possible element.
:type x: Element
:returns:
Whether or not *x* belongs to the semigroup represented by a
:any:`Konieczny` object.
:rtype: bool
)pbdoc");
thing.def("current_number_of_D_classes",
&Konieczny_::current_number_of_D_classes,
R"pbdoc(
:sig=(self: Konieczny) -> int:
Returns the current number of :math:`\mathscr{D}`-classes.
:returns:
The number of :math:`\mathscr{D}`-classes so far enumerated.
:rtype:
int
)pbdoc");
thing.def("current_number_of_H_classes",
&Konieczny_::current_number_of_H_classes,
R"pbdoc(
:sig=(self: Konieczny) -> int:
Returns the current number of :math:`\mathscr{H}`-classes.
:returns:
The number of :math:`\mathscr{H}`-classes so far enumerated.
:rtype:
int
)pbdoc");
thing.def("current_number_of_idempotents",
&Konieczny_::current_number_of_idempotents,
R"pbdoc(
:sig=(self: Konieczny) -> int:
Returns the current number of idempotents.
:returns:
The number of idempotents so far enumerated.
:rtype:
int
)pbdoc");
thing.def("current_number_of_L_classes",
&Konieczny_::current_number_of_L_classes,
R"pbdoc(
:sig=(self: Konieczny) -> int:
Returns the current number of :math:`\mathscr{L}`-classes.
:returns:
The number of :math:`\mathscr{L}`-classes so far enumerated.
:rtype:
int
)pbdoc");
thing.def("current_number_of_R_classes",
&Konieczny_::current_number_of_R_classes,
R"pbdoc(
:sig=(self: Konieczny) -> int:
Returns the current number of regular :math:`\mathscr{R}`-classes.
:returns:
The number of :math:`\mathscr{L}`-classes so far enumerated.
:rtype:
int
)pbdoc");
thing.def("current_number_of_regular_D_classes",
&Konieczny_::current_number_of_regular_D_classes,
R"pbdoc(
:sig=(self: Konieczny) -> int:
Returns the current number of regular :math:`\mathscr{D}`-classes
:returns:
The number of regular :math:`\mathscr{D}`-classes so far enumerated.
:rtype:
int
)pbdoc");
thing.def("current_number_of_regular_elements",
&Konieczny_::current_number_of_regular_elements,
R"pbdoc(
:sig=(self: Konieczny) -> int:
Returns the current number of regular elements.
:returns:
The number of regular elements so far enumerated.
:rtype:
int
)pbdoc");
thing.def("current_number_of_regular_L_classes",
&Konieczny_::current_number_of_regular_L_classes,
R"pbdoc(
:sig=(self: Konieczny) -> int:
Returns the current number of regular :math:`\mathscr{L}`-classes.
:returns:
The number of regular :math:`\mathscr{L}`-classes so far enumerated.
:rtype:
int
)pbdoc");
thing.def("current_number_of_regular_R_classes",
&Konieczny_::current_number_of_regular_R_classes,
R"pbdoc(
:sig=(self: Konieczny) -> int:
Returns the current number of regular :math:`\mathscr{R}`-classes.
:returns:
The number of regular :math:`\mathscr{R}`-classes so far enumerated.
:rtype:
int
)pbdoc");
thing.def("current_size",
&Konieczny_::current_size,
R"pbdoc(
:sig=(self: Konieczny) -> int:
Returns the current size.
:returns: The number of elements so far enumerated.
:rtype: int
.. seealso:: :any:`Konieczny.size`.
)pbdoc");
thing.def(
"D_class_of_element",
[](Konieczny_& self, Element const& x) ->
typename Konieczny_::DClass& { return self.D_class_of_element(x); },
py::arg("x"),
R"pbdoc(
:sig=(self: Konieczny, x: Element) -> Konieczny.DClass:
Returns the :math:`\mathscr{D}`-class containing an element.
:param x: a possible element.
:type x: Element
:returns: The :any:`Konieczny.DClass` containing *x*.
:rtype: Konieczny.DClass
:raises LibsemigroupsError: if *x* does not belong to *self*.
)pbdoc",
py::return_value_policy::reference_internal);
thing.def("degree",
&Konieczny_::degree,
R"pbdoc(
:sig=(self: Konieczny) -> int:
Returns the degree of elements. All elements of a :any:`Konieczny` must have
the same degree; this function returns that degree.
:returns: The degree of any (and all) elements.
:rtype: int
)pbdoc");
thing.def("generator",
&Konieczny_::generator,
py::return_value_policy::reference_internal,
py::arg("pos"),
R"pbdoc(
:sig=(self: Konieczny, pos: int) -> Element:
Returns the generator given by an index.
This function returns the generator of *self* with index *pos*.
:param pos: the index of the generator.
:type pos: int
:returns: The generator with given index.
:rtype: Element
:raises LibsemigroupsError:
if the value of *pos* is greater than :any:`number_of_generators()`.
:complexity: Constant.
.. seealso::
:any:`Konieczny.add_generator` and :any:`Konieczny.add_generators`.
)pbdoc");
thing.def("is_regular_element",
&Konieczny_::is_regular_element,
py::arg("x"),
R"pbdoc(
:sig=(self: Konieczny, x: Element) -> bool:
Test regularity of an element.
This function returns ``True`` if *x* is a regular element
and ``False`` if it is not.
:param x: a possible element.
:type x: Element
:returns: Whether or not *x* belongs to *self*.
:rtype: bool
)pbdoc");
thing.def("number_of_D_classes",
&Konieczny_::number_of_D_classes,
R"pbdoc(
:sig=(self: Konieczny) -> int:
Returns the number of :math:`\mathscr{D}`-classes.
:returns:
The number of :math:`\mathscr{D}`-classes.
:rtype:
int
)pbdoc");
thing.def("number_of_generators",
&Konieczny_::number_of_generators,
R"pbdoc(
:sig=(self: Konieczny) -> int:
Returns the number of generators.
This function returns the number of generators given to *self*. Note that there
may be duplicate generators, and so *self* may have more generators than unique
generators.
:returns: The number of generators.
:rtype: int
.. seealso::
:any:`Konieczny.add_generator` and :any:`Konieczny.add_generators`.
)pbdoc");
thing.def("number_of_H_classes",
&Konieczny_::number_of_H_classes,
R"pbdoc(
:sig=(self: Konieczny) -> int:
Returns the number of :math:`\mathscr{H}`-classes.
:returns:
The number of :math:`\mathscr{H}`-classes.
:rtype:
int
)pbdoc");
thing.def("number_of_idempotents",
&Konieczny_::number_of_idempotents,
R"pbdoc(
:sig=(self: Konieczny) -> int:
Returns the number of idempotents.
:returns:
The number of idempotents.
:rtype:
int
)pbdoc");
thing.def("number_of_L_classes",
&Konieczny_::number_of_L_classes,
R"pbdoc(
:sig=(self: Konieczny) -> int:
Returns the number of :math:`\mathscr{L}`-classes.
:returns:
The number of :math:`\mathscr{L}`-classes.
:rtype:
int
)pbdoc");
thing.def("number_of_R_classes",
&Konieczny_::number_of_R_classes,
R"pbdoc(
:sig=(self: Konieczny) -> int:
Returns the number of :math:`\mathscr{R}`-classes.
:returns:
The number of :math:`\mathscr{R}`-classes.
:rtype:
int
)pbdoc");
thing.def("number_of_regular_D_classes",
&Konieczny_::number_of_regular_D_classes,
R"pbdoc(
:sig=(self: Konieczny) -> int:
Returns the number of regular :math:`\mathscr{D}`-classes.
:returns:
The number of regular :math:`\mathscr{D}`-classes.
:rtype:
int
)pbdoc");
thing.def("number_of_regular_elements",
&Konieczny_::number_of_regular_elements,
R"pbdoc(
:sig=(self: Konieczny) -> int:
Returns the number of regular elements.
:returns:
The number of regular elements.
:rtype:
int
)pbdoc");
thing.def("number_of_regular_L_classes",
&Konieczny_::number_of_regular_L_classes,
R"pbdoc(
:sig=(self: Konieczny) -> int:
Returns the number of regular :math:`\mathscr{L}`-classes.
:returns:
The number of regular :math:`\mathscr{L}`-classes.
:rtype:
int
)pbdoc");
thing.def("number_of_regular_R_classes",
&Konieczny_::number_of_regular_R_classes,
R"pbdoc(
:sig=(self: Konieczny) -> int:
Returns the number of regular :math:`\mathscr{R}`-classes.
:returns:
The number of regular :math:`\mathscr{R}`-classes.
:rtype:
int
)pbdoc");
thing.def("size",
&Konieczny_::size,
R"pbdoc(
:sig=(self: Konieczny) -> int:
Returns the size.
This function triggers a full enumeration.
:returns: The size.
:rtype: int
.. seealso:: :any:`current_size`.
)pbdoc");
py::class_<typename Konieczny_::DClass> thing2(
m,
(actual_name + "DClass").c_str(),
R"pbdoc(
Class representing a :math:`\mathscr{D}`-class.
The class :any:`Konieczny.DClass` represents a :math:`\mathscr{D}`-class via a frame as
computed in Konieczny's algorithm; see :cite:`Konieczny1994aa` for more
details. :any:`Konieczny.DClass` objects cannot be directly constructed; instead you
should obtain a :math:`\mathscr{D}`-class by calling
:any:`Konieczny.D_class_of_element`.
.. seealso:: :any:`Konieczny`.)pbdoc");
thing2.def("__repr__", [](typename Konieczny_::DClass const& self) {
return to_human_readable_repr<Element, KoniecznyTraits<Element>>(self);
});
// TODO(1) copy?
thing2.def("__contains__",
[](typename Konieczny_::DClass& self, Element const& x) {
return self.contains(x);
});
thing2.def(
"contains",
[](typename Konieczny_::DClass& self, Element const& x) {
return self.contains(x);
},
py::arg("x"),
R"pbdoc(
:sig=(self: Konieczny.DClass, x: Element) -> bool:
Test membership of an element.
Given an element *x*, this function returns whether *x* is an element of the
:math:`\mathscr{D}`-class represented by *self* . This function triggers the
computation of most of the frame for *self*, if it is not already known.
:param x: the element.
:type x: Element
:returns: Whether or not *x* belongs to the :math:`\mathscr{D}`-class.
:rtype: bool
)pbdoc");
thing2.def("is_regular_D_class",
&Konieczny_::DClass::is_regular_D_class,
R"pbdoc(
:sig=(self: Konieczny.DClass) -> bool:
Test regularity of a :math:`\mathscr{D}`-class.
:returns:
Whether or not the :math:`\mathscr{D}`-class is regular.
:rtype:
bool
)pbdoc");
thing2.def("number_of_idempotents",
&Konieczny_::DClass::number_of_idempotents,
R"pbdoc(
:sig=(self: Konieczny.DClass) -> int:
Returns the number of idempotents. This function triggers the computation
of most of the frame for *self*, if it is not already known.
:returns: The number of idempotents in a :math:`\mathscr{D}`-class.
:rtype: int
)pbdoc");
thing2.def("number_of_L_classes",
&Konieczny_::DClass::number_of_L_classes,
R"pbdoc(
:sig=(self: Konieczny.DClass) -> int:
Returns the number of :math:`\mathscr{L}`-classes. This function
triggers the computation of most of the frame for *self*, if it is
not already known.
:returns:
The number of :math:`\mathscr{L}`-classes.
:rtype:
int
)pbdoc");
thing2.def("number_of_R_classes",
&Konieczny_::DClass::number_of_R_classes,
R"pbdoc(
:sig=(self: Konieczny.DClass) -> int:
Returns the number of :math:`\mathscr{R}`-classes. This function
triggers the computation of most of the frame for *self*, if it is
not already known.
:returns:
The number of :math:`\mathscr{R}`-classes.
:rtype:
int
)pbdoc");
thing2.def("rep",
&Konieczny_::DClass::rep,
py::return_value_policy::reference_internal,
R"pbdoc(
:sig=(self: Konieczny.DClass) -> Element:
Returns a representative of the :math:`\mathscr{D}`-class. The frame
used to represent :math:`\mathscr{D}`-classes depends on the choice of
representative. This function returns the representative used by a
:any:`Konieczny.DClass` instance. This may not be the same representative as
used to construct the instance, but is guaranteed to not change.
:returns:
A representative of the :math:`\mathscr{D}`-class.
:rtype:
Element
)pbdoc");
thing2.def("size",
&Konieczny_::DClass::size,
R"pbdoc(
:sig=(self: Konieczny.DClass) -> int:
Returns the size of a :math:`\mathscr{D}`-class. This function triggers
the computation of most of the frame for *self*, if it is not already
known.
:returns:
The size of the :math:`\mathscr{D}`-class.
:rtype:
int
)pbdoc");
thing2.def("size_H_class",
&Konieczny_::DClass::size_H_class,
R"pbdoc(
:sig=(self: Konieczny.DClass) -> int:
Returns the size of the :math:`\mathscr{H}`-classes. This function
triggers the computation of most of the frame for *self*, if it is
not already known.
:returns:
The size of any (and all) :math:`\mathscr{H}`-classes in the
:math:`\mathscr{D}`-class.
:rtype:
int
)pbdoc");
} // bind_konieczny
} // namespace
void init_konieczny(py::module& m) {
bind_konieczny<BMat8>(m, "BMat8");
bind_konieczny<Transf<0, uint8_t>>(m, "Transf1");
bind_konieczny<Transf<0, uint16_t>>(m, "Transf2");
bind_konieczny<Transf<0, uint32_t>>(m, "Transf4");
bind_konieczny<BMat<>>(m, "BMat");
bind_konieczny<PPerm<0, uint8_t>>(m, "PPerm1");
bind_konieczny<PPerm<0, uint16_t>>(m, "PPerm2");
bind_konieczny<PPerm<0, uint32_t>>(m, "PPerm4");
}
} // namespace libsemigroups