Constructors

This page contains information about the constructors for the FroidurePin class.

libsemigroups::FroidurePin::FroidurePin()

Default constructor.

Constructs a FroidurePin instance with no generators.

Parameters

(None)

libsemigroups::FroidurePin::FroidurePin(FroidurePin&&) = default

Default move constructor.

libsemigroups::FroidurePin::FroidurePin(FroidurePin const &that)

Copy constructor.

Constructs a new FroidurePin which is an exact copy of that. No enumeration is triggered for either that or of the newly constructed semigroup.

Parameters

that – the FroidurePin to copy.

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

template<typename T, typename = EnableIfIsState<T>>
inline explicit libsemigroups::FroidurePin::FroidurePin(T const &stt)

Construct from const reference to state.

This function allows the construction of a FroidurePin instance with stated given by the parameter stt. This constructor only exists if state_type is not void. This is used when the elements require some shared state to define their multiplication, such as, for example an instance of fpsemigroup::KnuthBendix or congruence::ToddCoxeter.

Warning

The parameter stt is copied, which might be expensive, use a std::shared_ptr to avoid the copy.

Parameters

stt – a const reference to a state object.

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

explicit libsemigroups::FroidurePin::FroidurePin(std::initializer_list<element_type> gens)

Construct from generators.

This function constructs a FroidurePin instance generated by the specified container of generators. There can be duplicate generators and although they do not count as distinct elements, they do count as distinct generators. In other words, the generators are precisely (a copy of) gens in the same order they occur in gens.

Parameters

gens – the generators.

Throws

LibsemigroupsException – if any of the following hold:

  • gens is empty;

  • Degree{}(x) !=Degree{}(y) for some x and y in gens.

template<typename T, typename = EnableIfIsState<T>>
inline explicit libsemigroups::FroidurePin::FroidurePin(std::shared_ptr<T> stt)

Construct from std::shared_ptr to state.

This function allows the construction of a FroidurePin instance with stated given by the parameter stt. This constructor only exists if state_type is not void. This is used when the elements require some shared state to define their multiplication, such as, for example an instance of fpsemigroup::KnuthBendix or congruence::ToddCoxeter.

Parameters

stt – a std::shared_ptr to a state object.

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

explicit libsemigroups::FroidurePin::FroidurePin(std::vector<element_type> const &gens)

Construct from generators.

This function constructs a FroidurePin instance generated by the specified container of generators. There can be duplicate generators and although they do not count as distinct elements, they do count as distinct generators. In other words, the generators are precisely (a copy of) gens in the same order they occur in gens.

Parameters

gens – the generators.

Throws

LibsemigroupsException – if any of the following hold:

  • gens is empty;

  • Degree{}(x) !=Degree{}(y) for some x and y in gens.