Constructors

libsemigroups::CongruenceByPairs::CongruenceByPairs(CongruenceByPairs const&) = default

A default copy constructor.

libsemigroups::CongruenceByPairs::CongruenceByPairs(CongruenceByPairs&&) = default

A default move constructor.

template<typename T>
inline libsemigroups::CongruenceByPairs::CongruenceByPairs(congruence_kind type, T const &S)

Construct a CongruenceByPairs over the FroidurePin instance fp representing a left/right/2-sided congruence according to type.

Complexity

Constant.

Warning

The parameter T& S is copied, this might be expensive, use a std::shared_ptr to avoid the copy!

Template Parameters

T – a class derived from FroidurePinBase. It is required that T::element_type is the same as CongruenceByPairs::element_type (which is the same as the template parameter element_type).

Parameters
  • type – whether the congruence is left, right, or 2-sided

  • S – a reference to the semigroup over which the congruence is defined.

Throws

LibsemigroupsException – if type and the template parameter T are incompatible. Currently, this is when type is not congruence_kind::right and T::element_type is TCE.

libsemigroups::CongruenceByPairs::CongruenceByPairs(congruence_kind type, std::shared_ptr<FroidurePinBase> S) noexcept

Construct a CongruenceByPairs over the FroidurePin instance S representing a left/right/2-sided congruence according to type.

Complexity

Constant.

Note

The FroidurePinBase pointed to by S is not copied

Parameters
  • type – whether the congruence is left, right, or 2-sided

  • S – a shared_ptr to the semigroup over which the congruence is defined.

Throws

LibsemigroupsException – if type and the template parameter T are incompatible. Currently, this is when type is not congruence_kind::right and T::element_type is TCE.

template<typename T, typename SFINAE = std::enable_if_t<IsState<T>::value, T>>
inline libsemigroups::CongruenceByPairs::CongruenceByPairs(congruence_kind type, std::shared_ptr<T> stt, bool)

No doc.