Attributes¶
This page contains information about the member functions for querying the attributes of an instance of the Ukkonen
class.
-
inline size_t libsemigroups::Ukkonen::length_of_distinct_words() const noexcept¶
Returns the sum of the lengths of the distinct words in the suffix tree.
- Parameters (None)
- Complexity
Constant.
- Throws
(None) – This function is
noexcept
and is guaranteed never to throw.- Returns
A value of type
size_t
-
size_t libsemigroups::Ukkonen::length_of_words() const noexcept¶
Returns the sum of the lengths of all of the words in the suffix tree.
This is the total length of all the words added to the suffix tree including duplicates, if any.
- Parameters (None)
- Complexity
\(O(n)\) where \(n\) is the return value of number_of_distinct_words.
- Throws
(None) – This function is
noexcept
and is guaranteed never to throw.- Returns
A value of type
size_t
-
inline size_t libsemigroups::Ukkonen::max_word_length() const noexcept¶
Returns the maximum length of word in the suffix tree.
- Parameters (None)
- Complexity
Constant.
- Throws
(None) – This function is
noexcept
and is guaranteed never to throw.- Returns
A value of type
size_t
-
inline std::vector<Node> const &libsemigroups::Ukkonen::nodes() const noexcept¶
Returns the nodes in the suffix tree.
- Parameters (None)
- Complexity
Constant.
- Throws
(None) – This function is
noexcept
and is guaranteed never to throw.- Returns
A const reference to a std::vector of
Ukkonen::Node
objects.
-
inline size_t libsemigroups::Ukkonen::number_of_distinct_words() const noexcept¶
Returns the number of distinct non-empty words in the suffix tree.
This is the number of distinct non-empty words added via Ukkonen::add_word or Ukkonen::add_word_no_checks.
- Parameters (None)
- Complexity
Constant.
- Throws
(None) – This function is
noexcept
and is guaranteed never to throw.- Returns
A value of type
size_t
-
inline size_t libsemigroups::Ukkonen::number_of_words() const noexcept¶
Returns the number of non-empty words in the suffix tree.
This is the number of all words added via Ukkonen::add_word or Ukkonen::add_word_no_checks including duplicates, if any.
- Parameters (None)
- Complexity
\(O(n)\) where \(n\) is the return value of number_of_distinct_words.
- Throws
(None) – This function is
noexcept
and is guaranteed never to throw.- Returns
A value of type
size_t