This file contains functionality for various types used in libsemigroups.
Classes | |
| struct | is_specialization_of< Thing, Primary > |
| Struct for checking if a template parameter is a specialization of another. More... | |
| struct | SmallestInteger< N > |
| Type giving the smallest unsigned integer type that can represent a template. More... | |
Typedefs | |
| template<typename Given, typename Expected> | |
| using | enable_if_is_same = std::enable_if_t<std::is_same_v<Given, Expected>, Expected> |
| Alias equal to the second template parameter if both template parameters are equal. | |
| using | letter_type = size_t |
| Type for the index of a generator of a semigroup. | |
| using | relation_type = std::pair<word_type, word_type> |
| Type for a pair of word_type (a relation) of a semigroup. | |
| using | word_type = std::vector<letter_type> |
| Type for a word over the generators of a semigroup. | |
Enumerations | |
| enum class | congruence_kind { onesided = 1 , twosided = 2 } |
| Enum to indicate the sided-ness of a congruence. More... | |
| enum class | Order : uint8_t { none = 0 , shortlex , lex , recursive } |
| The possible orderings of words and strings. More... | |
| enum class | side { left , right } |
| Enum class indicating the handedness or side of an action. More... | |
| enum class | tril { FALSE = 0 , TRUE = 1 , unknown = 2 } |
| Enum to indicate true, false or not currently knowable. More... | |
Variables | |
| template<typename Thing, template< typename... > typename Primary> | |
| constexpr bool | is_specialization_of_v = is_specialization_of<Thing, Primary>::value |
| Helper variable template for is_specialization_of. | |
| using enable_if_is_same = std::enable_if_t<std::is_same_v<Given, Expected>, Expected> |
Alias equal to the second template parameter if both template parameters are equal.
|
strong |
|
strong |
The values in this enum can be used as the arguments for functions such as standardize(Order) or order(Order) to specify which ordering should be used. The normal forms for congruence classes are given with respect to one of the orders specified by the values in this enum.
| Enumerator | |
|---|---|
| none | No ordering. |
| shortlex | The short-lex ordering. Words are first ordered by length, and then lexicographically. |
| lex | The lexicographic ordering. Note that this is not a well-order, so there may not be a lexicographically least word in a given congruence class of words. |
| recursive | The recursive-path ordering, as described in [38] (Definition 1.2.14, page 24). |
|
strong |
The values in this enum can be used as a template parameter for the Action class to specify whether the action of the Action is a left or right action.
| Enumerator | |
|---|---|
| left | This value indicates that the action in an Action instance should be a left action. |
| right | This value indicates that the action in an Action instance should be a right action. |
|
strong |
|
inlineconstexpr |
This helper is just a short version of is_specialization_of<Thing, Primary>::value.
| Thing | the type we are checking is a specialization of Primary. |
| Primary | the type we are checking Thing against. |
Primary must be types, so, for example, is_specialization_of<std::array<int, 2>, std::array> will not compile.