Validation¶
This page contains information about the functionality for checking if a Presentation
object is consistent.
-
inline void libsemigroups::Presentation::validate() const¶
Check if the alphabet and rules are valid.
- Throws
LibsemigroupsException – if validate_alphabet or validate_rules does.
- Parameters
(None) –
- Returns
(None)
-
inline void libsemigroups::Presentation::validate_alphabet() const¶
Check if the alphabet is valid.
- Throws
LibsemigroupsException – if there are duplicate letters in the alphabet
- Parameters
(None) –
- Returns
(None)
-
void libsemigroups::Presentation::validate_letter(letter_type c) const¶
Check if a letter belongs to the alphabet or not.
- Throws
LibsemigroupsException – if
c
does not belong to the alphabet- Parameters
c – the letter to check
- Returns
(None)
-
void libsemigroups::Presentation::validate_rules() const¶
Check if every rule consists of letters belonging to the alphabet.
- Throws
LibsemigroupsException – if any word contains a letter not in the alphabet.
- Parameters
(None) –
- Returns
(None)
-
template<typename T>
void libsemigroups::Presentation::validate_word(T first, T last) const¶ Check if every letter in a range belongs to the alphabet.
- Throws
LibsemigroupsException – if there is a letter not in the alphabet between
first
andlast
- Template Parameters
T – the type of the arguments (iterators)
- Parameters
first – iterator pointing at the first letter to check
last – iterator pointing one beyond the last letter to check
- Returns
(None)