libsemigroups  v3.4.0
C++ library for semigroups and monoids
Loading...
Searching...
No Matches
to<Congruence>

This page contains documentation related to converting a libsemigroups objects into a Congruence instances.

See also
The `to` function for an overview of possible conversions between libsemigroups types.

Functions

template<typename Result, typename Node>
auto to (congruence_kind knd, FroidurePinBase &fpb, WordGraph< Node > const &wg) -> std::enable_if_t< std::is_same_v< Congruence< typename Result::native_word_type >, Result >, Result >
 Convert a FroidurePin object to a Congruence.
 
template<typename Result, typename Node>
auto to (congruence_kind knd, WordGraph< Node > const &wg) -> std::enable_if_t< std::is_same_v< Congruence< typename Result::native_word_type >, Result >, Result >
 Convert a WordGraph object to a Congruence.
 

Function Documentation

◆ to() [1/2]

template<typename Result, typename Node>
auto to ( congruence_kind knd,
FroidurePinBase & fpb,
WordGraph< Node > const & wg ) -> std::enable_if_t< std::is_same_v<Congruence<typename Result::native_word_type>, Result>, Result>

Defined in to-cong.hpp

Despite the hideous signature, this function should be invoked as follows:

to<Congruence<Word>>(knd, fpb, wg);
auto to(detail::KnuthBendixImpl< Rewriter, ReductionOrder > &kb) -> std::enable_if_t< std::is_same_v< Presentation< typename Result::word_type >, Result >, Result >
No doc.

This function converts the FroidurePin object fpb into a Congruence object using the WordGraph wg (which should be either the left_cayley_graph or the right_cayley_graph of fpb).

Template Parameters
Resultused for SFINAE, the return type of this function, must be Congruence<Word> for some type Word.
Nodethe type of the nodes in the WordGraph wg.
Parameters
kndthe kind of the congruence being constructed.
fpbthe FroidurePin instance to be converted.
wgthe left or right Cayley graph of fpb.
Returns
A Congruence object representing the trivial congruence over the semigroup defined by fpb.
Exceptions
LibsemigroupsExceptionif wg is not the left_cayley_graph or the right_cayley_graph of fpb.

◆ to() [2/2]

template<typename Result, typename Node>
auto to ( congruence_kind knd,
WordGraph< Node > const & wg ) -> std::enable_if_t< std::is_same_v<Congruence<typename Result::native_word_type>, Result>, Result>

Defined in to-cong.hpp

Despite the hideous signature, this function should be invoked as follows:

This function converts the WordGraph object wg into a Congruence object by constructing a ToddCoxeter instance from wg and adding that as a runner to the Congruence.

Template Parameters
Resultused for SFINAE, the return type of this function, must be Congruence<Word> for some type Word.
Nodethe type of the nodes in the WordGraph wg.
Parameters
kndthe kind of the congruence being constructed.
wgthe word graph wg.
Returns
A Congruence object representing the trivial congruence over wg.
Warning
The WordGraph wg is added as is to the constructed Congruence, and no checks are performed that the constructed ToddCoxeter or Congruence object are valid.