template<typename Word>
class libsemigroups::InversePresentation< Word >
Defined in presentation.hpp
.
This class template can be used to construction inverse presentations for semigroups or monoids and is intended to be used as the input to other algorithms in libsemigroups
. This class inherits from Presentation<Word>.
- Template Parameters
-
Word | the type of the underlying words. |
|
using | const_iterator = typename Presentation<Word>::const_iterator |
| Type of a const iterator to either side of a rule.
|
|
using | iterator = typename Presentation<Word>::iterator |
| Type of an iterator to either side of a rule.
|
|
using | letter_type = typename Presentation<Word>::letter_type |
| Type of the letters in the words that constitute the rules of an InversePresentation object.
|
|
using | size_type = typename Presentation<Word>::size_type |
| Size type for rules.
|
|
using | word_type = typename Presentation<Word>::word_type |
| Type of the words in the rules of an InversePresentation object.
|
|
using | const_iterator = typename std::vector<word_type>::const_iterator |
| Type of a const iterator to either side of a rule.
|
|
using | iterator = typename std::vector<word_type>::iterator |
| Type of an iterator to either side of a rule.
|
|
using | letter_type = typename word_type::value_type |
| Type of the letters in the words that constitute the rules of a Presentation object.
|
|
using | size_type = typename std::vector<word_type>::size_type |
| Size type for rules.
|
|
using | word_type = Word |
| Type of the words in the rules of a Presentation object.
|
|
|
| InversePresentation (Presentation< Word > &&p) |
| Construct an InversePresentation from a Presentation rvalue reference.
|
|
| InversePresentation (Presentation< Word > const &p) |
| Construct an InversePresentation from a Presentation reference.
|
|
letter_type | inverse (letter_type x) const |
| Return the inverse of a letter in the alphabet.
|
|
word_type const & | inverses () const noexcept |
| Return the inverse of each letter in the alphabet.
|
|
InversePresentation & | inverses (word_type const &w) |
| Set the inverse of each letter in the alphabet.
|
|
InversePresentation & | inverses_no_checks (word_type const &w) |
| Set the inverse of each letter in the alphabet.
|
|
void | throw_if_bad_alphabet_rules_or_inverses () const |
| Check if the InversePresentation is valid.
|
|
| Presentation () |
| Default constructor.
|
|
| Presentation (Presentation &&) |
| Default move constructor.
|
|
| Presentation (Presentation const &) |
| Default copy constructor.
|
|
letter_type | add_generator () |
| Add a generator.
|
|
void | add_generator (letter_type x) |
| Add x as a generator.
|
|
void | add_generator_no_checks (letter_type x) |
| Add x as a generator.
|
|
template<typename Iterator1, typename Iterator2> |
Presentation & | add_rule (Iterator1 lhs_begin, Iterator1 lhs_end, Iterator2 rhs_begin, Iterator2 rhs_end) |
| Add a rule to the presentation and check it is valid.
|
|
template<typename Iterator1, typename Iterator2> |
Presentation & | add_rule_no_checks (Iterator1 lhs_begin, Iterator1 lhs_end, Iterator2 rhs_begin, Iterator2 rhs_end) |
| Add a rule to the presentation.
|
|
word_type const & | alphabet () const noexcept |
| Return the alphabet of the presentation.
|
|
Presentation & | alphabet (size_type n) |
| Set the alphabet by size.
|
|
Presentation & | alphabet (word_type &&lphbt) |
| Set the alphabet from rvalue reference.
|
|
Presentation & | alphabet (word_type const &lphbt) |
| Set the alphabet const reference.
|
|
Presentation & | alphabet_from_rules () |
| Set the alphabet to be the letters in the rules.
|
|
bool | contains_empty_word () const noexcept |
| Return whether the empty word is a valid relation word.
|
|
Presentation & | contains_empty_word (bool val) noexcept |
| Set whether whether the empty word is a valid relation word.
|
|
bool | in_alphabet (letter_type val) const |
| Check if a letter belongs to the alphabet or not.
|
|
size_type | index (letter_type val) const |
| Return the index of a letter in the alphabet.
|
|
size_type | index_no_checks (letter_type val) const |
| Return the index of a letter in the alphabet.
|
|
Presentation & | init () |
| Remove the alphabet and all rules.
|
|
letter_type | letter (size_type i) const |
| Return a letter in the alphabet by index.
|
|
letter_type | letter_no_checks (size_type i) const |
| Return a letter in the alphabet by index.
|
|
Presentation & | operator= (Presentation &&) |
| Default move assignment operator.
|
|
Presentation & | operator= (Presentation const &) |
| Default copy assignment operator.
|
|
void | remove_generator (letter_type x) |
| Remove x as a generator.
|
|
void | remove_generator_no_checks (letter_type x) |
| Remove x as a generator.
|
|
void | throw_if_alphabet_has_duplicates () const |
| Check if the alphabet is valid.
|
|
void | throw_if_bad_alphabet_or_rules () const |
| Check if the alphabet and rules are valid.
|
|
void | throw_if_bad_rules () const |
| Check if every word in every rule consists only of letters belonging to the alphabet.
|
|
template<typename Iterator1, typename Iterator2> |
void | throw_if_letter_not_in_alphabet (Iterator1 first, Iterator2 last) const |
| Check if every letter in a range belongs to the alphabet.
|
|
void | throw_if_letter_not_in_alphabet (letter_type c) const |
| Check if a letter belongs to the alphabet or not.
|
|