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
orlist[int]
- __init__(self: ToddCoxeter, knd: congruence_kind, p: Presentation) None
Construct from
congruence_kind
andPresentation
.This function constructs a
ToddCoxeter
instance representing a congruence of kind knd over the semigroup or monoid defined by the presentation p.- Parameters:
knd (congruence_kind) – the kind (onesided or twosided) of the congruence.
p (Presentation) – the presentation.
- Raises:
LibsemigroupsError – if p is not valid.
- __init__(self: ToddCoxeter, knd: congruence_kind, tc: ToddCoxeter) None
Construct from
congruence_kind
andToddCoxeter
.This function constructs a
ToddCoxeter
instance representing a congruence of kind knd over theToddCoxeter
instance tc. TheToddCoxeter
instance constructed in this way represents a quotient of the word graph represented by tc.- Parameters:
knd (congruence_kind) – the kind (onesided, or twosided) of the congruence.
tc (ToddCoxeter) – the
ToddCoxeter
instance.
- 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
andWordGraph
.This function constructs a
ToddCoxeter
instance representing a congruence of kind knd over theWordGraph
wg. TheToddCoxeter
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 theToddCoxeter
instance will represent a quotient of that semigroup.- Parameters:
knd (congruence_kind) – the kind (onesided or twosided) of the congruence.
wg (WordGraph) – the word graph.
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:
- 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:
knd (
congruence_kind
) – the kind (onesided or twosided) of the congruence.p (Presentation) – the presentation.
- Returns:
self.
- Return type:
- 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:
knd (congruence_kind) – the kind (onesided, or twosided) of the congruence.
tc (ToddCoxeter) – the
ToddCoxeter
instance.
- Returns:
self.
- Return type:
- 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
andWordGraph
.This function constructs a
ToddCoxeter
instance representing a congruence of kind knd over theWordGraph
wg. TheToddCoxeter
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 theToddCoxeter
instance will represent a quotient of that semigroup.- Parameters:
knd (congruence_kind) – the kind (onesided or twosided) of the congruence.
wg (WordGraph) – the word graph.
- Returns:
self.
- Return type:
Copying
- ToddCoxeter.copy(self: ToddCoxeter) ToddCoxeter
Copy a
ToddCoxeter
object.- Returns:
A copy.
- Return type: