Skip to content

Commit

Permalink
Rename words.*pp -> word-range.*pp
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph-Edwards committed Dec 15, 2024
1 parent cf4f254 commit 2bbd974
Show file tree
Hide file tree
Showing 35 changed files with 1,570 additions and 58 deletions.
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pkginclude_HEADERS += include/libsemigroups/ukkonen.hpp
pkginclude_HEADERS += include/libsemigroups/ukkonen.tpp
pkginclude_HEADERS += include/libsemigroups/word-graph.hpp
pkginclude_HEADERS += include/libsemigroups/word-graph.tpp
pkginclude_HEADERS += include/libsemigroups/words.hpp
pkginclude_HEADERS += include/libsemigroups/word-range.hpp

detailincludedir = $(includedir)/libsemigroups/detail
detailinclude_HEADERS = include/libsemigroups/detail/bruidhinn-traits.hpp
Expand Down Expand Up @@ -656,7 +656,7 @@ libsemigroups_la_SOURCES += src/to-knuth-bendix.cpp
libsemigroups_la_SOURCES += src/to-todd-coxeter.cpp
libsemigroups_la_SOURCES += src/todd-coxeter.cpp
libsemigroups_la_SOURCES += src/ukkonen.cpp
libsemigroups_la_SOURCES += src/words.cpp
libsemigroups_la_SOURCES += src/word-range.cpp

libsemigroups_la_SOURCES += src/detail/felsch-tree.cpp
libsemigroups_la_SOURCES += src/detail/ke.cpp
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/bench-kambites.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "libsemigroups/kambites.hpp" // for Kambites
#include "libsemigroups/knuth-bendix.hpp" // for KnuthBendix
#include "libsemigroups/ranges.hpp" // for operator|, to_vector
#include "libsemigroups/words.hpp" // for StringRange
#include "libsemigroups/word-range.hpp" // for StringRange

namespace libsemigroups {
using detail::MultiStringView;
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/bench-siso.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include "bench-main.hpp" // for LIBSEMIGROUPS_BENCHMARK
#include "catch.hpp" // for REQUIRE, REQUIRE_NOTHROW, REQUIRE_THROWS_AS

#include "libsemigroups/order.hpp" // for LexicographicalCompare
#include "libsemigroups/words.hpp" // for number_of_words
#include "libsemigroups/order.hpp" // for LexicographicalCompare
#include "libsemigroups/word-range.hpp" // for number_of_words

namespace libsemigroups {

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/bench-todd-coxeter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "libsemigroups/presentation.hpp"
#include "libsemigroups/todd-coxeter.hpp" // for ToddCoxeter, ToddCoxeter::...
#include "libsemigroups/types.hpp" // for word_type, letter_type
#include "libsemigroups/words.hpp" // for operator""_p
#include "libsemigroups/word-range.hpp" // for operator""_p

#include "libsemigroups/detail/report.hpp" // for ReportGuard
//
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/bench-wilo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include "bench-main.hpp" // for LIBSEMIGROUPS_BENCHMARK
#include "catch.hpp" // for REQUIRE, REQUIRE_NOTHROW, REQUIRE_THROWS_AS

#include "libsemigroups/order.hpp" // for lexicographical_compare
#include "libsemigroups/words.hpp" // for number_of_words
#include "libsemigroups/order.hpp" // for lexicographical_compare
#include "libsemigroups/word-range.hpp" // for number_of_words

namespace libsemigroups {
namespace {
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/bench-wislo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include "bench-main.hpp" // for LIBSEMIGROUPS_BENCHMARK
#include "catch.hpp" // for REQUIRE, REQUIRE_NOTHROW, REQUIRE_THROWS_AS

#include "libsemigroups/order.hpp" // for shortlex_compare
#include "libsemigroups/words.hpp" // for number_of_words
#include "libsemigroups/order.hpp" // for shortlex_compare
#include "libsemigroups/word-range.hpp" // for number_of_words

namespace libsemigroups {
namespace {
Expand Down
2 changes: 1 addition & 1 deletion include/libsemigroups/detail/ke.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include "libsemigroups/order.hpp" // for shortlex_compare
#include "libsemigroups/presentation.hpp" // for to_word
#include "libsemigroups/types.hpp" // for word_type, tril
#include "libsemigroups/words.hpp" // for ToWord, ToString
#include "libsemigroups/word-range.hpp" // for ToWord, ToString

namespace libsemigroups {
namespace detail {
Expand Down
2 changes: 1 addition & 1 deletion include/libsemigroups/detail/string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ namespace libsemigroups {

// Returns the string s to the power N, not optimized, complexity is O(N *
// |s|)
// TODO move to words.hpp and/or remove
// TODO move to word-range.hpp and/or remove
std::string power_string(std::string const& s, size_t N);

std::string group_digits(int64_t num);
Expand Down
2 changes: 1 addition & 1 deletion include/libsemigroups/knuth-bendix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
#include "to-presentation.hpp" // for to_presentation
#include "types.hpp" // for word_type
#include "word-graph.hpp" // for WordGraph
#include "words.hpp" // for to_strings
#include "word-range.hpp" // for to_strings

#include "detail/multi-string-view.hpp" // for MultiStringView
#include "detail/report.hpp" // for Reporter, REPORT_DEFAULT, REP...
Expand Down
2 changes: 1 addition & 1 deletion include/libsemigroups/libsemigroups.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@
#include "types.hpp"
#include "ukkonen.hpp"
#include "word-graph.hpp"
#include "words.hpp"
#include "word-range.hpp"

#endif // LIBSEMIGROUPS_LIBSEMIGROUPS_HPP_
2 changes: 1 addition & 1 deletion include/libsemigroups/paths.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include "ranges.hpp" // for is_input_range
#include "types.hpp" // for word_type
#include "word-graph.hpp" // for WordGraph
#include "words.hpp" // for number_of_words
#include "word-range.hpp" // for number_of_words

#include "detail/containers.hpp" // for DynamicArray2
#include "detail/path-iterators.hpp" // for default_postfix_increment
Expand Down
16 changes: 8 additions & 8 deletions include/libsemigroups/presentation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
#include <utility> // for move, pair
#include <vector> // for vector, operator!=

#include "adapters.hpp" // for Hash, EqualTo
#include "constants.hpp" // for Max, UNDEFINED, operator==
#include "debug.hpp" // for LIBSEMIGROUPS_ASSERT
#include "order.hpp" // for ShortLexCompare
#include "ranges.hpp" // for seq, operator|, rx, take, chain, is_sorted
#include "types.hpp" // for word_type
#include "ukkonen.hpp" // for GreedyReduceHelper, Ukkonen
#include "words.hpp" // for operator+
#include "adapters.hpp" // for Hash, EqualTo
#include "constants.hpp" // for Max, UNDEFINED, operator==
#include "debug.hpp" // for LIBSEMIGROUPS_ASSERT
#include "order.hpp" // for ShortLexCompare
#include "ranges.hpp" // for seq, operator|, rx, take, chain, is_sorted
#include "types.hpp" // for word_type
#include "ukkonen.hpp" // for GreedyReduceHelper, Ukkonen
#include "word-range.hpp" // for operator+

#include "detail/fmt.hpp" // for format
#include "detail/string.hpp" // for maximum_common_prefix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ namespace libsemigroups {
//! \brief Class for generating words in a given range and in a particular
//! order.
//!
//! Defined in `words.hpp`.
//! Defined in `word-range.hpp`.
//!
//! This class implements a range object for the lower level
//! functions \ref cbegin_wislo and \ref cbegin_wilo. The purpose of this
Expand Down Expand Up @@ -739,7 +739,7 @@ namespace libsemigroups {
//! \brief Class for converting strings to \ref word_type with specified
//! alphabet.
//!
//! Defined in `words.hpp`.
//! Defined in `word-range.hpp`.
//!
//! An instance of this class is used to convert from std::string to \ref
//! word_type. The characters in the string are converted to integers
Expand Down Expand Up @@ -1075,7 +1075,7 @@ namespace libsemigroups {
//! \brief Class for converting \ref word_type into std::string with specified
//! alphabet.
//!
//! Defined in `words.hpp`.
//! Defined in `word-range.hpp`.
//!
//! An instance of this class is used to convert from \ref word_type to
//! std::string. The letters in the word are converted to characters
Expand Down Expand Up @@ -1481,7 +1481,7 @@ namespace libsemigroups {
//! \brief Class for generating strings in a given range and in a particular
//! order.
//!
//! Defined in `words.hpp`.
//! Defined in `word-range.hpp`.
//!
//! This class implements a range object for strings and produces the same
//! output as `WordRange() | ToString("ab")`, but is more convenient in some
Expand Down Expand Up @@ -1906,7 +1906,7 @@ namespace libsemigroups {
//!
//! \brief Namespace containing some custom literals for creating words.
//!
//! Defined in `words.hpp`.
//! Defined in `word-range.hpp`.
//!
//! This namespace contains some functions for creating \ref word_type objects
//! in a compact form.
Expand Down Expand Up @@ -1987,7 +1987,7 @@ namespace libsemigroups {
//!
//! \brief Namespace containing some operators for creating words.
//!
//! Defined in `words.hpp`.
//! Defined in `word-range.hpp`.
//!
//! This namespace contains some functions for creating \ref word_type objects
//! in a compact form.
Expand All @@ -2003,7 +2003,7 @@ namespace libsemigroups {

//! \brief Returns the index of a character in human readable order.
//!
//! Defined in `words.hpp`.
//! Defined in `word-range.hpp`.
//!
//! This function is the inverse of \ref words::human_readable_letter, see
//! the documentation of that function for more details.
Expand Down
2 changes: 1 addition & 1 deletion src/fpsemi-examples.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "libsemigroups/presentation.hpp" // for add_rule_no_checks, Presen...
#include "libsemigroups/ranges.hpp" // for operator|, to_vector, enum...
#include "libsemigroups/types.hpp" // for word_type, letter_type
#include "libsemigroups/words.hpp" // for operator""_w, operator+, pow
#include "libsemigroups/word-range.hpp" // for operator""_w, operator+, pow

namespace libsemigroups {
using literals::operator""_w;
Expand Down
2 changes: 1 addition & 1 deletion src/obvinf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "libsemigroups/constants.hpp" // for UNDEFINED
#include "libsemigroups/debug.hpp" // for LIBSEMIGROUPS_ASSERT
#include "libsemigroups/todd-coxeter.hpp"
#include "libsemigroups/words.hpp" // for ToWord
#include "libsemigroups/word-range.hpp" // for ToWord

#include "libsemigroups/detail/eigen.hpp"

Expand Down
2 changes: 1 addition & 1 deletion src/presentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "libsemigroups/presentation.hpp" // for Presentation, to_string, to_word
#include "libsemigroups/to-presentation.hpp" // for to_presentation
#include "libsemigroups/types.hpp" // for word_type
#include "libsemigroups/words.hpp" // for human_readable_letter
#include "libsemigroups/word-range.hpp" // for human_readable_letter

#include "libsemigroups/detail/fmt.hpp" // for format

Expand Down
2 changes: 1 addition & 1 deletion src/words.cpp → src/word-range.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// This file contains some functionality missing in some implementations of the
// stl, or to augment the stl implementations.

#include "libsemigroups/words.hpp"
#include "libsemigroups/word-range.hpp"

#include <algorithm> // for lexicographical_...
#include <cctype> // for isalpha, isdigit
Expand Down
6 changes: 3 additions & 3 deletions tests/test-cong.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
#include "libsemigroups/obvinf.hpp" // for is_obviously_infinite
#include "libsemigroups/pbr.hpp" // for PBR
#include "libsemigroups/to-froidure-pin.hpp"
#include "libsemigroups/transf.hpp" // for Transf<>
#include "libsemigroups/types.hpp" // for word_type
#include "libsemigroups/words.hpp" // for literals
#include "libsemigroups/transf.hpp" // for Transf<>
#include "libsemigroups/types.hpp" // for word_type
#include "libsemigroups/word-range.hpp" // for literals

#include "libsemigroups/detail/report.hpp" // for ReportGuard

Expand Down
2 changes: 1 addition & 1 deletion tests/test-fpsemi-examples-1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include "libsemigroups/to-froidure-pin.hpp" // for to_froidure_pin
#include "libsemigroups/todd-coxeter.hpp" // for ToddCoxeter
#include "libsemigroups/types.hpp" // for congruence_kind, word_type
#include "libsemigroups/words.hpp" // for operator""_w
#include "libsemigroups/word-range.hpp" // for operator""_w

#include "libsemigroups/detail/fmt.hpp" // for format, print //
#include "libsemigroups/detail/report.hpp" // for ReportGuard
Expand Down
2 changes: 1 addition & 1 deletion tests/test-fpsemi-examples-2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include "libsemigroups/to-presentation.hpp" // for to_presentation
#include "libsemigroups/types.hpp" // for congruence_kind, word_type
#include "libsemigroups/word-graph.hpp" // for is_complete
#include "libsemigroups/words.hpp" // for operator""_w, to_string
#include "libsemigroups/word-range.hpp" // for operator""_w, to_string

#include "libsemigroups/detail/eigen.hpp" // // for DenseBase::row, DenseBa...
#include "libsemigroups/detail/fmt.hpp" // for format, print
Expand Down
2 changes: 1 addition & 1 deletion tests/test-fpsemi-intf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// #include "libsemigroups/order.hpp" // for shortlex_words
// #include "libsemigroups/todd-coxeter.hpp" // for fpsemigroup::ToddCoxeter
// #include "libsemigroups/transf.hpp" // for fpsemigroup::ToddCoxeter
// #include "libsemigroups/words.hpp" // for number_of_words
// #include "libsemigroups/word-range.hpp" // for number_of_words
//
// #include "libsemigroups/detail/string.hpp" // for to_string of rule_type for
// debugging
Expand Down
2 changes: 1 addition & 1 deletion tests/test-kambites.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "libsemigroups/to-froidure-pin.hpp" // for to_froidure_pin
#include "libsemigroups/transf.hpp" // for LeastTransf
#include "libsemigroups/types.hpp" // for tril etc
#include "libsemigroups/words.hpp" // for number_of_words
#include "libsemigroups/word-range.hpp" // for number_of_words

#include "libsemigroups/detail/report.hpp" // for ReportGuard
#include "libsemigroups/detail/string.hpp" // for random_string etc
Expand Down
2 changes: 1 addition & 1 deletion tests/test-kbe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "libsemigroups/knuth-bendix.hpp" // for KnuthBendix
#include "libsemigroups/to-froidure-pin.hpp" // for to_froidure_pin
#include "libsemigroups/transf.hpp" // for Transf<>
#include "libsemigroups/words.hpp" // for literals
#include "libsemigroups/word-range.hpp" // for literals

#include "libsemigroups/detail/kbe.hpp" // for KBE

Expand Down
2 changes: 1 addition & 1 deletion tests/test-knuth-bendix-3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#include "libsemigroups/presentation.hpp" // for add_rule, Presentation
#include "libsemigroups/ranges.hpp" // for equal
#include "libsemigroups/word-graph.hpp" // for WordGraph
#include "libsemigroups/words.hpp" // for Inner, ToString, Str...
#include "libsemigroups/word-range.hpp" // for Inner, ToString, Str...

#include "libsemigroups/detail/report.hpp" // for ReportGuard

Expand Down
2 changes: 1 addition & 1 deletion tests/test-knuth-bendix-4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
#include "libsemigroups/paths.hpp" // for Paths
#include "libsemigroups/presentation.hpp" // for add_rule, Presentation
#include "libsemigroups/word-graph.hpp" // for WordGraph
#include "libsemigroups/words.hpp" // for Inner, StringRange, to_str...
#include "libsemigroups/word-range.hpp" // for Inner, StringRange, to_str...

#include "libsemigroups/detail/report.hpp" // for ReportGuard
#include "libsemigroups/detail/stl.hpp" // for apply_permutation
Expand Down
2 changes: 1 addition & 1 deletion tests/test-knuth-bendix-5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
#include "libsemigroups/to-presentation.hpp" // for to_presentation
#include "libsemigroups/transf.hpp" // for Transf
#include "libsemigroups/types.hpp" // for word_type, letter_type
#include "libsemigroups/words.hpp" // for operator""_w
#include "libsemigroups/word-range.hpp" // for operator""_w

#include "libsemigroups/detail/kbe.hpp" // for KBE
#include "libsemigroups/detail/report.hpp" // for ReportGuard
Expand Down
2 changes: 1 addition & 1 deletion tests/test-knuth-bendix-6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#include "libsemigroups/presentation.hpp" // for add_rule
#include "libsemigroups/to-froidure-pin.hpp" // for to_froidure_pin
#include "libsemigroups/types.hpp" // for word_type
#include "libsemigroups/words.hpp" // for operator""_w
#include "libsemigroups/word-range.hpp" // for operator""_w

#include "libsemigroups/detail/report.hpp" // for ReportGuard

Expand Down
4 changes: 2 additions & 2 deletions tests/test-obvinf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#include "libsemigroups/exception.hpp"
#include "test-main.hpp"

#include "libsemigroups/obvinf.hpp" // for IsObviouslyInfinite
#include "libsemigroups/words.hpp" // for operator""_w
#include "libsemigroups/obvinf.hpp" // for IsObviouslyInfinite
#include "libsemigroups/word-range.hpp" // for operator""_w

namespace libsemigroups {
namespace {
Expand Down
2 changes: 1 addition & 1 deletion tests/test-paths.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#include "libsemigroups/to-froidure-pin.hpp"
#include "libsemigroups/types.hpp" // for word_type, relation_type
#include "libsemigroups/word-graph.hpp" // for WordGraph, make, pow
#include "libsemigroups/words.hpp" // for operator""_w, WordRange
#include "libsemigroups/word-range.hpp" // for operator""_w, WordRange

#include "libsemigroups/detail/report.hpp" // for ReportGuard
#include "libsemigroups/detail/stl.hpp" // for hash
Expand Down
2 changes: 1 addition & 1 deletion tests/test-presentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#include "libsemigroups/ranges.hpp" // for chain, shortlex_compare
#include "libsemigroups/to-presentation.hpp" // for to_presentation
#include "libsemigroups/types.hpp" // for word_type, letter_type
#include "libsemigroups/words.hpp" // for operator+=, operator""_w
#include "libsemigroups/word-range.hpp" // for operator+=, operator""_w

#include "libsemigroups/detail/containers.hpp" // for StaticVector1, operat...
#include "libsemigroups/detail/int-range.hpp" // for IntRange
Expand Down
2 changes: 1 addition & 1 deletion tests/test-stephen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#include "libsemigroups/todd-coxeter.hpp" // for ToddCoxeter
#include "libsemigroups/types.hpp" // for word_type
#include "libsemigroups/word-graph.hpp" // for WordGraph, ope...
#include "libsemigroups/words.hpp" // for StringToWord, word...
#include "libsemigroups/word-range.hpp" // for StringToWord, word...

#include "libsemigroups/detail/report.hpp" // for ReportGuard

Expand Down
2 changes: 1 addition & 1 deletion tests/test-todd-coxeter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include "libsemigroups/to-todd-coxeter.hpp" // for ??
#include "libsemigroups/todd-coxeter.hpp" // for ToddCoxeter
#include "libsemigroups/transf.hpp" // for Transf
#include "libsemigroups/words.hpp" // for operator"" _w
#include "libsemigroups/word-range.hpp" // for operator"" _w

#include "libsemigroups/detail/report.hpp" // for ReportGuard
#include "libsemigroups/detail/tce.hpp" // for TCE
Expand Down
10 changes: 5 additions & 5 deletions tests/test-ukkonen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
#include "catch_amalgamated.hpp" // for REQUIRE, REQUIRE_THROWS_AS
#include "test-main.hpp" // for LIBSEMIGROUPS_TEST_CASE

#include "libsemigroups/constants.hpp" // for operator==, POSITIVE_INFINITY
#include "libsemigroups/exception.hpp" // for LIBSEMIGROUPS_EXCEPTION
#include "libsemigroups/types.hpp" // for word_type
#include "libsemigroups/ukkonen.hpp" // for Ukkonen, Ukkonen::State
#include "libsemigroups/words.hpp" // for literals
#include "libsemigroups/constants.hpp" // for operator==, POSITIVE_INFINITY
#include "libsemigroups/exception.hpp" // for LIBSEMIGROUPS_EXCEPTION
#include "libsemigroups/types.hpp" // for word_type
#include "libsemigroups/ukkonen.hpp" // for Ukkonen, Ukkonen::State
#include "libsemigroups/word-range.hpp" // for literals

namespace libsemigroups {

Expand Down
Loading

0 comments on commit 2bbd974

Please sign in to comment.