Constructors¶
This page contains information about the constructors for the Congruence
class.
-
libsemigroups::Congruence::Congruence(congruence_kind type, FpSemigroup &S)¶
Construct from kind (left/right/2-sided) and FpSemigroup.
Constructs a Congruence over the FpSemigroup instance
S
representing a left/right/2-sided congruence according totype
.- Complexity
Constant.
- Parameters
type – whether the congruence is left, right, or 2-sided
S – a const reference to the finitely presented semigroup over which the congruence is defined.
- Throws
(None) – This function guarantees not to throw a
LibsemigroupsException
.
-
template<typename T>
inline libsemigroups::Congruence::Congruence(congruence_kind type, T const &S)¶ Construct from kind (left/right/2-sided) and FroidurePin.
Constructs a Congruence over the FroidurePin instance
S
representing a left/right/2-sided congruence according totype
.- Complexity
Linear in the size of
S
.
Warning
the parameter
T const& S
is copied, this might be expensive, use a std::shared_ptr to avoid the copy!- Template Parameters
T – a class derived from FroidurePinBase.
- Parameters
type – whether the congruence is left, right, or 2-sided
S – a const reference to the semigroup over which the congruence is defined.
- Throws
(None) – This function guarantees not to throw a
LibsemigroupsException
.
-
explicit libsemigroups::Congruence::Congruence(congruence_kind type, options::runners opt = options::runners::standard)¶
Construct from kind (left/right/2-sided) and options.
Constructs an empty instance of an interface to a congruence of type specified by the argument.
See also
- Complexity
Constant.
- Parameters
type – the type of the congruence.
opt – optionally specify algorithms to be used (defaults to options::runners::standard).
Construct from kind (left/right/2-sided) and shared pointer to FroidurePin.
Constructs a Congruence over the FroidurePin instance
S
representing a left/right/2-sided congruence according totype
.- 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
(None) – This function guarantees not to throw a
LibsemigroupsException
.