This page contains information about the member functions for validating words in the Ukkonen class.

template<typename Iterator>
void libsemigroups::Ukkonen::validate_word(Iterator first, Iterator last) const

Validate the word [first, last).

This function throws an exception if the word corresponding to first and last contains a letter equal to any of the unique letters added to the end of words in the suffix tree.


Linear in the distance from first to last.

Template Parameters

Iterator – the type of the arguments.

  • first – iterator pointing to the first letter of the word.

  • last – one beyond the last letter of the word.


LibsemigroupsException – if is_unique_letter(*it) returns true for any it in [first, last).



inline void libsemigroups::Ukkonen::validate_word(word_type const &w) const

Validate a word.

See validate_word