Class mata::IntAlphabetΒΆ
-
class IntAlphabet : public Alphabet
Direct alphabet (also identity alphabet or integer alphabet) using integers as symbols.
This alphabet presumes that all integers are valid symbols. Therefore, calling member functions get_complement() and get_alphabet_symbols() makes no sense in this context and the methods will throw exceptions warning about the inappropriate use of IntAlphabet. If one needs these functions, they should use OnTheFlyAlphabet instead of IntAlphabet.
Public Functions
-
inline virtual std::string reverse_translate_symbol(Symbol symbol) const override
Translate internal
symbolrepresentation back to its original string name.Throws an exception when the
symbolis missing in the alphabet.- Parameters:
symbol β [in] Symbol to translate.
- Returns:
symboloriginal name.
-
inline virtual utils::OrdVector<Symbol> get_alphabet_symbols() const override
Get a set of all symbols in the alphabet.
The result does not have to equal the list of symbols in the automaton using this alphabet.
-
inline virtual utils::OrdVector<Symbol> get_complement(const utils::OrdVector<Symbol> &symbols) const override
complement of a set of symbols wrt the alphabet
-
inline virtual bool empty() const override
Checks whether the alphabet has any symbols.
-
inline virtual Word translate_word(const WordName &word_name) const
Translate sequence of symbol names to sequence of their respective values.
-
inline virtual bool is_equal(const Alphabet &other_alphabet) const
Check whether two alphabets are equal.
In general, two alphabets are equal if and only if they are of the same class instance.
- Parameters:
other_alphabet β The other alphabet to compare with for equality.
- Returns:
True if equal, false otherwise.
-
inline virtual bool is_equal(const Alphabet *const other_alphabet) const
Check whether two alphabets are equal.
In general, two alphabets are equal if and only if they are of the same class instance.
- Parameters:
other_alphabet β The other alphabet to compare with for equality.
- Returns:
True if equal, false otherwise.
-
inline virtual std::string reverse_translate_symbol(Symbol symbol) const override