Constructors + initializers

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

Every constructor 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.

Constructors

class ToddCoxeter
__init__(*args, **kwargs)

Overloaded function.

__init__(word: type) None

Default constructor.

This function default constructs an uninitialised ToddCoxeter instance.

Keyword Arguments:
  • word (type) – the type of words to use, must be either str or list[int]

__init__(self: ToddCoxeter, knd: congruence_kind, p: Presentation) None

Construct from congruence_kind and Presentation.

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

Parameters:
Raises:

LibsemigroupsError – if p is not valid.

__init__(self: ToddCoxeter, knd: congruence_kind, tc: ToddCoxeter) None

Construct from congruence_kind and ToddCoxeter.

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:
Raises:

LibsemigroupsError – if 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__(self: ToddCoxeter, knd: congruence_kind, wg: WordGraph) None

Construct from congruence_kind and WordGraph.

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.

Parameters:

Initializers

ToddCoxeter.init(*args, **kwargs)

Overloaded function.

init(self: ToddCoxeter) ToddCoxeter

Re-initialize a ToddCoxeter instance.

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:

self.

Return type:

ToddCoxeter

init(self: ToddCoxeter, knd: congruence_kind, p: Presentation) ToddCoxeter

Re-initialize a ToddCoxeter instance.

This function re-initializes a ToddCoxeter instance as if it had been newly constructed from knd and p.

Parameters:
Returns:

self.

Return type:

ToddCoxeter

Raises:

LibsemigroupsError – if p is not valid.

init(self: ToddCoxeter, knd: congruence_kind, tc: ToddCoxeter) ToddCoxeter

Re-initialize a ToddCoxeter instance.

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:
Returns:

self.

Return type:

ToddCoxeter

Raises:

LibsemigroupsError – if 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(self: ToddCoxeter, knd: congruence_kind, wg: WordGraph) ToddCoxeter

Construct from congruence_kind and WordGraph.

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.

Parameters:
Returns:

self.

Return type:

ToddCoxeter

Copying

ToddCoxeter.copy(self: ToddCoxeter) ToddCoxeter

Copy a ToddCoxeter object.

Returns:

A copy.

Return type:

ToddCoxeter