From 484d7f86734b37eec45f49832a9297c5bd78a528 Mon Sep 17 00:00:00 2001 From: Joseph Edwards Date: Tue, 1 Oct 2024 18:32:51 +0100 Subject: [PATCH] Fix doc spacing --- include/libsemigroups/ukkonen.hpp | 138 +++++++++++++++++------------- 1 file changed, 79 insertions(+), 59 deletions(-) diff --git a/include/libsemigroups/ukkonen.hpp b/include/libsemigroups/ukkonen.hpp index 7556c9c29..1e376e15a 100644 --- a/include/libsemigroups/ukkonen.hpp +++ b/include/libsemigroups/ukkonen.hpp @@ -1143,7 +1143,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(w)` //! throws for any `w` in \p words. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. void add_words(Ukkonen& u, std::vector const& words); //! \brief Add all words in a range to a Ukkonen object. @@ -1153,7 +1153,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(w)` //! throws for any `w` in `[first, last)`. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. template void add_words(Ukkonen& u, Iterator1 first, Iterator2 last) { for (auto it = first; it != last; ++it) { @@ -1190,7 +1190,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if //! `u.throw_if_not_unique_letters(w.cbegin(), w.cend())` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. template auto traverse(Ukkonen const& u, Word const& w) { return u.traverse(w.cbegin(), w.cend()); @@ -1203,7 +1203,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if //! `u.throw_if_not_unique_letters(w.cbegin(), w.cend())` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. inline auto traverse(Ukkonen const& u, word_type const& w) { return u.traverse(w.cbegin(), w.cend()); } @@ -1215,66 +1215,86 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(w, w + //! std::strlen(w))` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. inline auto traverse(Ukkonen const& u, char const* w) { return u.traverse(w, w + std::strlen(w)); } - //! \brief \copybrief Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, Iterator) const + //! \brief \copybrief Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, + //! Iterator) const //! - //! See \ref Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, Iterator) const. + //! See \ref Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, + //! Iterator) const. template - auto traverse_no_checks(Ukkonen::State& st, Ukkonen const& u, Word const& w) { + auto traverse_no_checks(Ukkonen::State& st, + Ukkonen const& u, + Word const& w) { return u.traverse_no_checks(st, w.cbegin(), w.cend()); } - //! \brief \copybrief Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, Iterator) const + //! \brief \copybrief Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, + //! Iterator) const //! - //! See \ref Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, Iterator) const. - inline auto traverse_no_checks(Ukkonen::State& st, Ukkonen const& u, word_type const& w) { + //! See \ref Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, + //! Iterator) const. + inline auto traverse_no_checks(Ukkonen::State& st, + Ukkonen const& u, + word_type const& w) { return u.traverse_no_checks(st, w.cbegin(), w.cend()); } - //! \brief \copybrief Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, Iterator) const + //! \brief \copybrief Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, + //! Iterator) const //! - //! See \ref Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, Iterator) const. - inline auto traverse_no_checks(Ukkonen::State& st, Ukkonen const& u, char const* w) { + //! See \ref Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, + //! Iterator) const. + inline auto traverse_no_checks(Ukkonen::State& st, + Ukkonen const& u, + char const* w) { return u.traverse_no_checks(st, w, w + std::strlen(w)); } - //! \brief \copybrief Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, Iterator) const + //! \brief \copybrief Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, + //! Iterator) const //! - //! See \ref Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, Iterator) const. + //! See \ref Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, + //! Iterator) const. //! //! \throws LibsemigroupsException if //! `u.throw_if_not_unique_letters(w.cbegin(), w.cend())` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. template auto traverse(Ukkonen::State& st, Ukkonen const& u, Word const& w) { return u.traverse(st, w.cbegin(), w.cend()); } - //! \brief \copybrief Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, Iterator) const + //! \brief \copybrief Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, + //! Iterator) const //! - //! See \ref Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, Iterator) const. + //! See \ref Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, + //! Iterator) const. //! //! \throws LibsemigroupsException if //! `u.throw_if_not_unique_letters(w.cbegin(), w.cend())` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. - inline auto traverse(Ukkonen::State& st, Ukkonen const& u, word_type const& w) { + //! \sa \ref Ukkonen::throw_if_not_unique_letters. + inline auto traverse(Ukkonen::State& st, + Ukkonen const& u, + word_type const& w) { return u.traverse(st, w.cbegin(), w.cend()); } - //! \brief \copybrief Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, Iterator) const + //! \brief \copybrief Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, + //! Iterator) const //! - //! See \ref Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, Iterator) const. + //! See \ref Ukkonen::traverse_no_checks(Ukkonen::State&, Iterator, + //! Iterator) const. //! //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(w, w + //! std::strlen(w))` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. inline auto traverse(Ukkonen::State& st, Ukkonen const& u, char const* w) { return u.traverse(st, w, w + std::strlen(w)); } @@ -1338,7 +1358,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(first, //! last)` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. template bool is_subword(Ukkonen const& u, Iterator first, Iterator last) { u.throw_if_not_unique_letters(first, last); @@ -1353,7 +1373,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if //! `u.throw_if_not_unique_letters(w.cbegin(), w.cend())` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. template bool is_subword(Ukkonen const& u, Word const& w) { return is_subword(u, w.cbegin(), w.cend()); @@ -1367,7 +1387,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(w, w + //! std::strlen(w))` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. inline bool is_subword(Ukkonen const& u, char const* w) { return is_subword(u, w, w + std::strlen(w)); } @@ -1380,7 +1400,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(w)` //! throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. inline bool is_subword(Ukkonen const& u, word_type const& w) { return is_subword(u, w.cbegin(), w.cend()); } @@ -1447,7 +1467,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(first, //! last)` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. template bool is_suffix(Ukkonen const& u, Iterator first, Iterator last) { u.throw_if_not_unique_letters(first, last); @@ -1462,7 +1482,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if //! `u.throw_if_not_unique_letters(w.begin(), w.end())` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. template bool is_suffix(Ukkonen const& u, Word const& w) { return is_suffix(u, w.cbegin(), w.cend()); @@ -1476,7 +1496,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(w)` //! throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. // This function is required so that we can use initialiser list, as an // argument to is_suffix inline bool is_suffix(Ukkonen const& u, word_type const& w) { @@ -1491,7 +1511,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(w, w + //! std::strlen(w))` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. inline bool is_suffix(Ukkonen const& u, char const* w) { return is_suffix(u, w, w + std::strlen(w)); } @@ -1567,7 +1587,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(first, //! last)` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. template Iterator maximal_piece_prefix(Ukkonen const& u, Iterator first, @@ -1585,7 +1605,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if //! `u.throw_if_not_unique_letters(w.cbegin(), w.cend())` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. template typename Word::const_iterator maximal_piece_prefix(Ukkonen const& u, Word const& w) { @@ -1601,7 +1621,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(w)` //! throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. inline typename word_type::const_iterator maximal_piece_prefix(Ukkonen const& u, word_type const& w) { return maximal_piece_prefix(u, w.cbegin(), w.cend()); @@ -1616,7 +1636,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(w, w + //! std::strlen(w))` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. inline char const* maximal_piece_prefix(Ukkonen const& u, char const* w) { return maximal_piece_prefix(u, w, w + std::strlen(w)); } @@ -1694,7 +1714,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(first, //! last)` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. template size_t length_maximal_piece_prefix(Ukkonen const& u, Iterator first, @@ -1711,7 +1731,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if //! `u.throw_if_not_unique_letters(w.cbegin(), w.cend())` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. template size_t length_maximal_piece_prefix(Ukkonen const& u, Word const& w) { return length_maximal_piece_prefix(u, w.cbegin(), w.cend()); @@ -1726,7 +1746,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(w)` //! throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. inline size_t length_maximal_piece_prefix(Ukkonen const& u, word_type const& w) { return length_maximal_piece_prefix(u, w.cbegin(), w.cend()); @@ -1741,7 +1761,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(w, w + //! std::strlen(w))` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. inline size_t length_maximal_piece_prefix(Ukkonen const& u, char const* w) { return length_maximal_piece_prefix(u, w, w + std::strlen(w)); } @@ -1804,7 +1824,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(first, //! last)` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. template bool is_piece(Ukkonen const& u, Iterator first, Iterator last) { return maximal_piece_prefix(u, first, last) == last; @@ -1817,7 +1837,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if //! `u.throw_if_not_unique_letters(w.cbegin(), w.cend())` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. template bool is_piece(Ukkonen const& u, Word const& w) { return is_piece(u, w.cbegin(), w.cend()); @@ -1830,7 +1850,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(w)` //! throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. inline bool is_piece(Ukkonen const& u, word_type const& w) { return is_piece(u, w.cbegin(), w.cend()); } @@ -1842,7 +1862,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(w, w + //! std::strlen(w))` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. inline bool is_piece(Ukkonen const& u, char const* w) { return is_piece(u, w, w + std::strlen(w)); } @@ -1920,7 +1940,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(first, //! last)` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. template Iterator maximal_piece_suffix(Ukkonen const& u, Iterator first, @@ -1938,7 +1958,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if //! `u.throw_if_not_unique_letters(w.cbegin(), w.cend())` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. template typename Word::const_iterator maximal_piece_suffix(Ukkonen const& u, Word const& w) { @@ -1954,7 +1974,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(w)` //! throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. inline typename word_type::const_iterator maximal_piece_suffix(Ukkonen const& u, word_type const& w) { return maximal_piece_suffix(u, w.cbegin(), w.cend()); @@ -1969,7 +1989,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(w, w + //! std::strlen(w))` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. inline char const* maximal_piece_suffix(Ukkonen const& u, char const* w) { return maximal_piece_suffix(u, w, w + std::strlen(w)); } @@ -2047,7 +2067,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(first, //! last)` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. template size_t length_maximal_piece_suffix(Ukkonen const& u, Iterator first, @@ -2064,7 +2084,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if //! `u.throw_if_not_unique_letters(w.cbegin(), w.cend())` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. template size_t length_maximal_piece_suffix(Ukkonen const& u, Word const& w) { return length_maximal_piece_suffix(u, w.cbegin(), w.cend()); @@ -2079,7 +2099,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(w)` //! throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. inline size_t length_maximal_piece_suffix(Ukkonen const& u, word_type const& w) { return length_maximal_piece_suffix(u, w.cbegin(), w.cend()); @@ -2094,7 +2114,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(w, w + //! std::strlen(w))` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. inline size_t length_maximal_piece_suffix(Ukkonen const& u, char const* w) { return length_maximal_piece_suffix(u, w, w + std::strlen(w)); } @@ -2167,7 +2187,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(first, //! last)` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. template size_t number_of_pieces(Ukkonen const& u, Iterator first, Iterator last) { u.throw_if_not_unique_letters(first, last); @@ -2183,7 +2203,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if //! `u.throw_if_not_unique_letters(w.cbegin(), w.cend())` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. template size_t number_of_pieces(Ukkonen const& u, Word const& w) { return number_of_pieces(u, w.cbegin(), w.cend()); @@ -2198,7 +2218,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(w)` //! throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. inline size_t number_of_pieces(Ukkonen const& u, word_type const& w) { return number_of_pieces(u, w.cbegin(), w.cend()); } @@ -2212,7 +2232,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(w, w + //! std::strlen(w))` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. inline size_t number_of_pieces(Ukkonen const& u, char const* w) { return number_of_pieces(u, w, w + std::strlen(w)); } @@ -2290,7 +2310,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(first, //! last)` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. template std::vector pieces(Ukkonen const& u, Iterator first, @@ -2306,7 +2326,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if //! `u.throw_if_not_unique_letters(w.cbegin(), w.cend())` throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. template std::vector pieces(Ukkonen const& u, Word const& w) { u.throw_if_not_unique_letters(w.cbegin(), w.cend()); @@ -2320,7 +2340,7 @@ namespace libsemigroups { //! \throws LibsemigroupsException if `u.throw_if_not_unique_letters(w)` //! throws. //! - //!\sa \ref Ukkonen::throw_if_not_unique_letters. + //! \sa \ref Ukkonen::throw_if_not_unique_letters. inline std::vector pieces(Ukkonen const& u, word_type const& w) { u.throw_if_not_unique_letters(w); return pieces_no_checks(u, w);