Class index to word

This page contains documentation for the member functions of ToddCoxeter that can be used to convert the index of a congruence class to a representative word belonging to that congruence class.

ToddCoxeter.current_word_of(self: ToddCoxeter, i: int) list[int] | str

Returns a current word representing a class with given index.

This function returns the current word representing the class with index i. No enumeration is triggered by calls to this function, but current_word_graph is standardized (using Order.shortlex) if it is not already standardized. The output word is obtained by following a path in current_spanning_tree from the node corresponding to index i back to the root of that tree.

Parameters:

i (int) – the index of the class.

Returns:

The word representing the i-th class.

Return type:

list[int] | str

Raises:

LibsemigroupsError – if i is out of bounds.

ToddCoxeter.word_of(self: ToddCoxeter, i: int) list[int] | str

Returns a word representing a class with given index.

This function returns the word representing the class with index i. A full enumeration is triggered by calls to this function. The output word is obtained by following a path in current_spanning_tree from the node corresponding to index i back to the root of that tree.

Parameters:

i (int) – the index of the class.

Returns:

The word representing the i-th class.

Return type:

list[int] | str

Raises:

LibsemigroupsError – if i is out of bounds.