This file contains documentation for creating semigroup and monoid presentations in libsemigroups from other types of objects.
Functions | |
| template<typename Result, typename Word> | |
| auto | to (Congruence< Word > &c) -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result > &&!std::is_same_v< typename Result::word_type, Word >, Result > |
| Make a presentation from a Congruence when typename Result::word_type and Word are not the same. | |
| template<typename Result, typename Word> | |
| auto | to (Congruence< Word > &c) -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result > &&std::is_same_v< typename Result::word_type, Word >, Result const & > |
| Make a presentation from a Congruence when typename Result::word_type and Word are the same. | |
| template<typename Result> | |
| auto | to (FroidurePinBase &fp) -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result >, Result > |
| Make a presentation from a FroidurePin object. | |
| template<typename Result, typename Word> | |
| auto | to (Kambites< Word > &k) -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result > &&!std::is_same_v< typename Result::word_type, Word >, Result > |
| Make a presentation from a Kambites when typename Result::word_type and Word are not the same. | |
| template<typename Result, typename Word> | |
| auto | to (Kambites< Word > &k) -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result > &&std::is_same_v< typename Result::word_type, Word >, Result const & > |
| Make a presentation from a Kambites when typename Result::word_type and Word are the same. | |
| template<template< typename... > typename Thing, typename Word, typename Rewriter, typename ReductionOrder> | |
| auto | to (KnuthBendix< Word, Rewriter, ReductionOrder > &kb) -> std::enable_if_t< std::is_same_v< Thing< Word >, Presentation< Word > >, Presentation< Word > > |
| Make a presentation from a KnuthBendix object. | |
| template<typename Result, typename WordIn, typename Rewriter, typename ReductionOrder> | |
| auto | to (KnuthBendix< WordIn, Rewriter, ReductionOrder > &kb) -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result >, Result > |
| Make a presentation from a KnuthBendix object. | |
| template<typename Result, typename Word> | |
| auto | to (Presentation< Word > const &p) -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result > &&!std::is_same_v< typename Result::word_type, Word >, Result > |
| Make a presentation from a different type of presentation when typename Result::word_type and Word are not the same. | |
| template<typename Result, typename Word> | |
| auto | to (Presentation< Word > const &p) noexcept -> std::enable_if_t< std::is_same_v< Presentation< Word >, Result >, Result const & > |
| Make a presentation from a different type of presentation when typename Result::word_type and Word are the same. | |
| template<typename Result, typename Word, typename Func> | |
| auto | to (Presentation< Word > const &p, Func &&f) -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result >, Result > |
| Make a presentation from a different type of presentation. | |
| template<typename Result, typename PresentationType> | |
| auto | to (Stephen< PresentationType > &s) -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result >, Result > |
| Make a presentation from a Stephen object. | |
| template<typename Result, typename Word> | |
| auto | to (ToddCoxeter< Word > &tc) -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result > &&!std::is_same_v< typename Result::word_type, Word >, Result > |
| Make a presentation from a ToddCoxeter object when typename Result::word_type and Word are not the same. | |
| template<typename Result, typename Word> | |
| auto | to (ToddCoxeter< Word > &tc) -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result > &&std::is_same_v< typename Result::word_type, Word >, Result const & > |
| Make a presentation from a ToddCoxeter object when typename Result::word_type and Word are the same. | |
| auto to | ( | Congruence< Word > & | c | ) | -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result > &&!std::is_same_v< typename Result::word_type, Word >, Result > |
Defined in to-presentation.hpp.
Despite the hideous signature, this function should be invoked as follows:
This function calls to<Presentation<typename Result::word_type> on c.presentation() to return a presentation equivalent to the object used to construct or initialise the Congruence object (if any) but of a different type (for example, can be used to convert from std::string to word_type).
| Result | the return type, also used for SFINAE, should be Presentation<T> for some type T. |
| Word | the type of the words in the input Congruence. |
| c | the Congruence object from which to obtain the rules. |
| auto to | ( | Congruence< Word > & | c | ) | -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result > &&std::is_same_v< typename Result::word_type, Word >, Result const & > |
Defined in to-presentation.hpp.
Despite the hideous signature, this function should be invoked as follows:
This function returns a reference to the presentation used to construct or initialise the Congruence object (if any) via c.presentation().
| Result | the return type, also used for SFINAE, should be Presentation<T> for some type T. |
| Word | the type of the words in the input Congruence. |
| c | the Congruence object from which to obtain the rules. |
| auto to | ( | FroidurePinBase & | fp | ) | -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result >, Result > |
Defined in to-presentation.hpp.
Despite the hideous signature, this function should be invoked as follows:
This function constructs and returns a Presentation object using the rules of a FroidurePin object, accessed via FroidurePin::cbegin_rules and FroidurePin::cend_rules.
No enumeration of the argument fp is performed, so it might be the case that the resulting presentation does not define the same semigroup as fp. To ensure that the resulting presentation defines the same semigroup as fp, run FroidurePin::run (or any other function that fully enumerates fp) prior to calling this function.
| Result | the return type, also used for SFINAE, should be Presentation<Word> for some type Word. |
| fp | the FroidurePin object from which to obtain the rules. |
Presentation<Word>.| auto to | ( | Kambites< Word > & | k | ) | -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result > &&!std::is_same_v< typename Result::word_type, Word >, Result > |
Defined in to-presentation.hpp.
Despite the hideous signature, this function should be invoked as follows:
This function calls to<Presentation<typename Result::word_type> on k.presentation() to return a presentation equivalent to the object used to construct or initialise the Kambites object (if any) but of a different type (for example, this function can be used to convert from std::string to word_type).
| Result | the return type, also used for SFINAE, should be Presentation<T> for some type T. |
| Word | the type of the words in the input Kambites. |
| k | the Kambites object from which to obtain the rules. |
| auto to | ( | Kambites< Word > & | k | ) | -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result > &&std::is_same_v< typename Result::word_type, Word >, Result const & > |
Defined in to-presentation.hpp.
Despite the hideous signature, this function should be invoked as follows:
This function returns a reference to the presentation used to construct or initialise the Kambites object (if any) via k.presentation().
| Result | the return type, also used for SFINAE, should be Presentation<T> for some type T. |
| Word | the type of the words in the input Kambites. |
| k | the Kambites object from which to obtain the rules. |
| auto to | ( | KnuthBendix< Word, Rewriter, ReductionOrder > & | kb | ) | -> std::enable_if_t< std::is_same_v< Thing< Word >, Presentation< Word > >, Presentation< Word > > |
Defined in to-presentation.hpp.
Despite the hideous signature, this function should be invoked as follows:
This function constructs and returns a Presentation object using the currently active rules of kb.
No enumeration of the argument kb is performed, so it might be the case that the resulting presentation does not define the same semigroup/monoid as kb. To ensure that the resulting presentation defines the same semigroup as kb, run run (or any other function that fully enumerates kb) prior to calling this function.
| Thing | used for SFINAE, must be Presentation. |
| Word | the type of the rules in the presentation of the KnuthBendix object kb. |
| Rewriter | the second template parameter for KnuthBendix. |
| ReductionOrder | the third template parameter for KnuthBendix. |
| kb | the KnuthBendix object from which to obtain the rules. |
Presentation<Word>.| auto to | ( | KnuthBendix< WordIn, Rewriter, ReductionOrder > & | kb | ) | -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result >, Result > |
Defined in to-presentation.hpp.
Despite the hideous signature, this function should be invoked as follows:
This function constructs and returns a Presentation<WordOut> object using the currently active rules of kb.
No enumeration of the argument kb is performed, so it might be the case that the resulting presentation does not define the same semigroup/monoid as kb. To ensure that the resulting presentation defines the same semigroup as kb, run run (or any other function that fully enumerates kb) prior to calling this function.
| Result | the return type, also used for SFINAE. Must be Presentation<WordOut> for some type WordOut. |
| WordIn | the type of the rules in the presentation of the KnuthBendix object kb. |
| Rewriter | the second template parameter for KnuthBendix. |
| ReductionOrder | the third template parameter for KnuthBendix. |
| kb | the KnuthBendix object from which to obtain the rules. |
Presentation<WordOut>.kb, then the simpler to<Presentation>(kb) may be used instead. | auto to | ( | Presentation< Word > const & | p | ) | -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result > &&!std::is_same_v< typename Result::word_type, Word >, Result > |
Defined in to-presentation.hpp.
Despite the hideous signature, this function should be invoked as follows:
This function returns a presentation equivalent to the input presentation but of a different type (for example, can be used to convert from std::string to word_type).
If the alphabet of of p is \(\{a_0, a_1, \dots a_{n-1}\}\), then the conversion from Presentation<WordInput>::letter_type to Presentation<WordOutput>::letter_type is \(a_i \mapsto\) human_readable_letter<WordOutput>(size_t i).
| Result | the return type, also used for SFINAE, should be Presentation<T> for some type T. |
| Word | the type of the words in the input presentation. |
| p | the input presentation. |
| LibsemigroupsException | if p.throw_if_bad_alphabet_or_rules() throws. |
|
noexcept |
Defined in to-presentation.hpp.
Despite the hideous signature, this function should be invoked as follows:
This function just returns its argument p (as a reference), and is included solely for the purpose of simplifying certain client code, where presentations must be converted from one type to another sometimes, but not other times.
| Result | the return type, also used for SFINAE, should be Presentation<T> for some type T. |
| Word | the type of the words in the input presentation. |
| p | the input presentation. |
This function is noexcept and is guaranteed never to throw.
| auto to | ( | Presentation< Word > const & | p, |
| Func && | f ) -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result >, Result > |
Defined in to-presentation.hpp.
Despite the hideous signature, this function should be invoked as follows:
This function returns a presentation equivalent to the input presentation but of a different type (for example, can be used to convert from std::string to word_type). The second parameter specifies how to map the letters of one presentation to the other.
| Result | the return type, also used for SFINAE, should be Presentation<T> for some type T. |
| Word | the type of the words in the input presentation. |
| Func | the type of a function for transforming letters. |
| p | the input presentation. |
| f | a function mapping Presentation<Word>::letter_type to Result::letter_type. |
| LibsemigroupsException | if p.throw_if_bad_alphabet_or_rules() throws. |
Func must be a function type that is invocable with values of Presentation<Word>::letter_type. If this is not true, then template substitution will fail.| auto to | ( | Stephen< PresentationType > & | s | ) | -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result >, Result > |
Defined in to-presentation.hpp.
Despite the hideous signature, this function should be invoked as follows:
This function calls to<Presentation<typename Result::word_type> on s.presentation() to return a presentation equivalent to the object used to construct or initialise the Stephen object (if any) but of a different type (for example, can be used to convert from word_type to std::string).
| Result | the return type, also used for SFINAE, should be Presentation<T> for some type T. |
| PresentationType | the type of the presentation in the input Stephen. |
| s | the Stephen object from which to obtain the rules. |
| auto to | ( | ToddCoxeter< Word > & | tc | ) | -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result > &&!std::is_same_v< typename Result::word_type, Word >, Result > |
Defined in to-presentation.hpp.
Despite the hideous signature, this function should be invoked as follows:
This function calls to<Presentation<typename Result::word_type> on tc.presentation() to return a presentation equivalent to the object used to construct or initialise the ToddCoxeter object (if any) but of a different type (for example, can be used to convert from std::string to word_type).
| Result | the return type, also used for SFINAE, should be Presentation<T> for some type T. |
| Word | the type of the words in the input ToddCoxeter. |
| tc | the ToddCoxeter object from which to obtain the rules. |
| auto to | ( | ToddCoxeter< Word > & | tc | ) | -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result > &&std::is_same_v< typename Result::word_type, Word >, Result const & > |
Defined in to-presentation.hpp.
Despite the hideous signature, this function should be invoked as follows:
This function returns a reference to the presentation used to construct or initialise the ToddCoxeter object (if any) via tc.presentation().
| Result | the return type, also used for SFINAE, should be Presentation<T> for some type T. |
| Word | the type of the words in the input ToddCoxeter. |
| tc | the ToddCoxeter object from which to obtain the rules. |