congruence::KnuthBendix¶
-
class KnuthBendix : public libsemigroups::CongruenceInterface¶
Defined in
knuth-bendix.hpp
.On this page we describe the functionality relating to the Knuth-Bendix algorithm for computing congruences of semigroups and monoids.
This page contains details of the member functions of the class congruence::KnuthBendix.
See also
- Example
KnuthBendix kb; kb.set_number_of_generators(2); kb.add_pair({0, 0, 0}, {0}); kb.add_pair({0}, {1, 1}); kb.number_of_classes(); // 5 kb.word_to_class_index({0, 0, 1}); // 4 kb.word_to_class_index({0, 0, 0, 0, 1}); // 4 kb.word_to_class_index({0, 1, 1, 0, 0, 1}); // 4 kb.word_to_class_index({0, 0, 0}); // 0 kb.word_to_class_index({1}); // 1 kb.word_to_class_index({0, 0, 0, 0}); // 2
Note
congruence::KnuthBendix can only be used to compute 2-sided congruences.
Constructors¶
Default constructor. |
|
Copy constructor. |
|
Constructs from |
|
Construct from |
|
Construct from std::shared_ptr to |
Deleted constructors¶
Deleted. |
|
Deleted. |
|
Deleted. |
Member functions¶
Returns the underlying |
Member functions and types inherited from CongruenceInterface¶
|
Add a generating pair to the congruence. |
Add a generating pair to the congruence. |
|
Returns a const iterator pointing to the first generating pair. |
|
Returns a const iterator pointing to the first non-singleton class. |
|
Returns a const iterator pointing one-after-the-end of the last generating pair. |
|
Returns a const iterator pointing one-past-the-end of the last non-singleton class. |
|
Get a canonical representative of the |
|
Type for indices of congruence class indices. |
|
|
Check if a pair of words is known to belong to the congruence. |
Type for a |
|
Check if a pair of words belongs to the congruence. |
|
Check if the congruence was constructed from a |
|
Check if the congruence was constructed from a |
|
Check if the quotient semigroup has been computed. |
|
Deterministically check if the quotient is finite. |
|
Deterministically check if the quotient is infinite. |
|
The handedness of the congruence (left, right, or 2-sided). |
|
Compare the indices of the classes containing two words. |
|
Type for a |
|
Returns a shared pointer to the non-trivial classes. |
|
Type for non-trivial classes. |
|
Compute the number of classes in the congruence. |
|
The number of generating pairs. |
|
The number of generators. |
|
The number of non-singleton classes. |
|
Get the parent |
|
Get the parent |
|
Returns a semigroup represented as an instance of a derived class of |
|
Set the number of generators of the congruence. |
|
Convert a word into the index of the class containing it. |
Member functions inherited from Runner¶
Check if the runner is dead. |
|
Check if |
|
Stop |
|
Check if it is time to report. |
|
Get the minimum elapsed time between reports. |
|
Set the minimum elapsed time between reports. |
|
Set the minimum elapsed time between reports. |
|
Report why |
|
Run until |
|
Run for a specified amount of time. |
|
Run for a specified amount of time. |
|
Run until a nullary predicate returns |
|
Run until a nullary predicate returns |
|
Check if currently running. |
|
Check if the runner is currently running for a particular length of time. |
|
Check if the runner is currently running until a nullary predicate returns |
|
Check if |
|
Check if the runner is stopped. |
|
Check if the runner was, or should, stop because of the argument for |
|
Check if the amount of time passed to |