libsemigroups  v3.0.0
C++ library for semigroups and monoids
Loading...
Searching...
No Matches
Constructors + initializers

This page documents the constructors and initialisers for the ToddCoxeter class.

Every constructor (except the move + copy constructors, and the move and copy assignment operators) has a matching init function with the same signature that can be used to re-initialize a ToddCoxeter instance as if it had just been constructed; but without necessarily releasing any previous allocated memory.

Functions

 ToddCoxeter ()=default
 Default constructor.
 
 ToddCoxeter (congruence_kind knd, Presentation< Word > &&p)
 Construct from congruence_kind and Presentation.
 
 ToddCoxeter (congruence_kind knd, Presentation< Word > const &p)
 Construct from congruence_kind and Presentation.
 
 ToddCoxeter (congruence_kind knd, ToddCoxeter const &tc)
 Construct from congruence_kind and ToddCoxeter.
 
template<typename Node>
 ToddCoxeter (congruence_kind knd, WordGraph< Node > const &wg)
 Construct from congruence_kind and WordGraph.
 
 ToddCoxeter (ToddCoxeter &&)=default
 
 ToddCoxeter (ToddCoxeter const &)=default
 
ToddCoxeterinit ()
 Re-initialize a ToddCoxeter instance.
 
ToddCoxeterinit (congruence_kind knd, Presentation< Word > &&p)
 Re-initialize a ToddCoxeter instance.
 
ToddCoxeterinit (congruence_kind knd, Presentation< Word > const &p)
 Re-initialize a ToddCoxeter instance.
 
ToddCoxeterinit (congruence_kind knd, ToddCoxeter const &tc)
 Re-initialize a ToddCoxeter instance.
 
template<typename Node>
ToddCoxeterinit (congruence_kind knd, WordGraph< Node > const &wg)
 Re-initialize a ToddCoxeter instance.
 
ToddCoxeteroperator= (ToddCoxeter &&)=default
 Move assignment operator.
 
ToddCoxeteroperator= (ToddCoxeter const &)=default
 Copy assignment operator.
 
template<typename Iterator1, typename Iterator2>
void throw_if_letter_not_in_alphabet (Iterator1 first, Iterator2 last) const
 Throws if any letter in a range is out of bounds.
 

Function Documentation

◆ ToddCoxeter() [1/7]

template<typename Word>
ToddCoxeter ( )
default

This function default constructs an uninitialised ToddCoxeter instance.

◆ ToddCoxeter() [2/7]

template<typename Word>
ToddCoxeter ( congruence_kind knd,
Presentation< Word > && p )
inline

This function constructs a ToddCoxeter instance representing a congruence of kind knd over the semigroup or monoid defined by the presentation p.

Parameters
kndthe kind (onesided or twosided) of the congruence.
pthe presentation.
Exceptions
LibsemigroupsExceptionif p is not valid.

◆ ToddCoxeter() [3/7]

template<typename Word>
ToddCoxeter ( congruence_kind knd,
Presentation< Word > const & p )
inline

This function constructs a ToddCoxeter instance representing a congruence of kind knd over the semigroup or monoid defined by the presentation p.

Parameters
kndthe kind (onesided or twosided) of the congruence.
pthe presentation.
Exceptions
LibsemigroupsExceptionif p is not valid.

◆ ToddCoxeter() [4/7]

template<typename Word>
ToddCoxeter ( congruence_kind knd,
ToddCoxeter< Word > const & tc )
inline

This function constructs a ToddCoxeter instance representing a congruence of kind knd over the ToddCoxeter instance tc. The ToddCoxeter instance constructed in this way represents a quotient of the word graph represented by tc.

Parameters
kndthe kind (onesided, or twosided) of the congruence.
tcthe ToddCoxeter instance.
Exceptions
LibsemigroupsExceptionif the arguments knd and tc are not compatible. If the first item is tc.kind() and the second is the parameter knd, then compatible arguments are (one-sided, one-sided), (two-sided, one-sided), and (two-sided, two-sided).

◆ ToddCoxeter() [5/7]

template<typename Word>
template<typename Node>
ToddCoxeter ( congruence_kind knd,
WordGraph< Node > const & wg )
inline

This function constructs a ToddCoxeter instance representing a congruence of kind knd over the WordGraph wg. The ToddCoxeter instance constructed in this way represents a quotient of the word graph wg. If wg happens to be the left or right Cayley graph of a semigroup or monoid, then the ToddCoxeter instance will represent a quotient of that semigroup.

Template Parameters
Nodethe type of the nodes in the 2nd argument.
Parameters
kndthe kind (1- or 2-sided) of the congruence.
wgthe word graph.
Exceptions
This function guarantees not to throw a LibsemigroupsException.

◆ ToddCoxeter() [6/7]

template<typename Word>
ToddCoxeter ( ToddCoxeter< Word > && )
default

Move constructor.

◆ ToddCoxeter() [7/7]

template<typename Word>
ToddCoxeter ( ToddCoxeter< Word > const & )
default

Copy constructor.

◆ init() [1/5]

template<typename Word>
ToddCoxeter & init ( )

This function puts a ToddCoxeter instance back into the state that it would have been in if it had just been newly default constructed.

Returns
A reference to *this.
Exceptions
This function guarantees not to throw a LibsemigroupsException.

◆ init() [2/5]

template<typename Word>
ToddCoxeter & init ( congruence_kind knd,
Presentation< Word > && p )

This function puts a ToddCoxeter instance back into the state that it would have been in if it had just been newly constructed from knd and p.

Parameters
kndthe kind (onesided or twosided) of the congruence.
pthe presentation.
Returns
A reference to *this.
Exceptions
LibsemigroupsExceptionif p is not valid.

◆ init() [3/5]

template<typename Word>
ToddCoxeter & init ( congruence_kind knd,
Presentation< Word > const & p )
inline

This function puts a ToddCoxeter instance back into the state that it would have been in if it had just been newly constructed from knd and p.

Parameters
kndthe kind (onesided or twosided) of the congruence.
pthe presentation.
Returns
A reference to *this.
Exceptions
LibsemigroupsExceptionif p is not valid.

◆ init() [4/5]

template<typename Word>
ToddCoxeter & init ( congruence_kind knd,
ToddCoxeter< Word > const & tc )
inline

This function puts a ToddCoxeter instance back into the state that it would have been in if it had just been newly constructed from knd and tc.

Parameters
kndthe kind (onesided, or twosided) of the congruence.
tcthe ToddCoxeter instance.
Returns
A reference to *this.
Exceptions
LibsemigroupsExceptionif the arguments knd and tc are not compatible. If the first item is tc.kind() and the second is the parameter knd, then compatible arguments are (one-sided, one-sided), (two-sided, one-sided), and (two-sided, two-sided).

◆ init() [5/5]

template<typename Word>
template<typename Node>
ToddCoxeter & init ( congruence_kind knd,
WordGraph< Node > const & wg )

This function puts a ToddCoxeter instance back into the state that it would have been in if it had just been newly constructed from knd and wg.

Template Parameters
Nodethe type of the nodes in the 2nd argument.
Parameters
kndthe kind (1- or 2-sided) of the congruence.
wgthe word graph.
Returns
A reference to *this.
Exceptions
This function guarantees not to throw a LibsemigroupsException.

◆ operator=() [1/2]

template<typename Word>
ToddCoxeter & operator= ( ToddCoxeter< Word > && )
default

Move assignment operator.

◆ operator=() [2/2]

template<typename Word>
ToddCoxeter & operator= ( ToddCoxeter< Word > const & )
default

Copy assignment operator.

◆ throw_if_letter_not_in_alphabet()

template<typename Word>
template<typename Iterator1, typename Iterator2>
void throw_if_letter_not_in_alphabet ( Iterator1 first,
Iterator2 last ) const
inline

This function throws a LibsemigroupsException if any value pointed at by an iterator in the range first to last is out of bounds (i.e. does not belong to the alphabet of the presentation used to construct the ToddCoxeter instance).

Template Parameters
Iterator1the type of first argument first.
Iterator2the type of second argument last.
Parameters
firstiterator pointing at the first letter of the word.
lastiterator pointing one beyond the last letter of the word.
Exceptions
LibsemigroupsExceptionif any letter in the range from first to last is out of bounds.