.. Copyright (c) 2019-22, J. D. Mitchell

   Distributed under the terms of the GPL license version 3.

   The full license is in the file LICENSE, distributed with this software.

   This file was auto-generated by docs/generate_from_yml.py, do not edit.

congruence::ToddCoxeter
=======================

.. doxygenclass:: libsemigroups::congruence::ToddCoxeter
   :project: libsemigroups

.. cpp:namespace:: libsemigroups::congruence::ToddCoxeter


Member types
------------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`class_iterator`
     - The type of a const iterator pointing to a word belonging to a particular class.


   * - :cpp:member:`coset_type`
     - Type of cosets stored in the table.


   * - :cpp:member:`froidure_pin_type`
     - The type of the return value of :cpp:member:`quotient_froidure_pin()` .


   * - :cpp:member:`normal_form_iterator`
     - The type of a const iterator pointing to a normal form.


   * - :cpp:member:`options`
     - Holds values of various options.


   * - :cpp:member:`options::deductions`
     - Values for specifying how to handle deductions.


   * - :cpp:member:`options::froidure_pin`
     - Values for specifying whether to use relations or Cayley graph.


   * - :cpp:member:`options::lookahead`
     - Values for specifying the type of lookahead to perform.


   * - :cpp:member:`options::preferred_defs`
     - Values for specifying how to handle preferred definitions.


   * - :cpp:member:`options::strategy`
     - Values for defining the strategy.


   * - :cpp:member:`order`
     - The possible arguments for :cpp:member:`standardize(order)` .


   * - :cpp:member:`sort_free_function_type`
     - Type of the argument to :cpp:member:`sort_generating_pairs` .


   * - :cpp:member:`sort_function_type`
     - Type of the argument to :cpp:member:`sort_generating_pairs` .


   * - :cpp:member:`table_type`
     - Type of the underlying table.



Constructors
------------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`ToddCoxeter(ToddCoxeter const&)`
     - Copy constructor.


   * - :cpp:member:`ToddCoxeter(congruence_kind)`
     - Construct from kind (left/right/2-sided).


   * - :cpp:member:`ToddCoxeter(congruence_kind, T const&) <template <typename T>  ToddCoxeter(congruence_kind, T const&)>`
     - Construct from kind (left/right/2-sided) and :cpp:any:`FroidurePin`  or :cpp:any:`FpSemigroupInterface` .


   * - :cpp:member:`ToddCoxeter(congruence_kind, ToddCoxeter&)`
     - Construct from kind (left/right/2-sided) and :cpp:any:`ToddCoxeter` .


   * - :cpp:member:`ToddCoxeter(congruence_kind, fpsemigroup::KnuthBendix&)`
     - Construct from kind (left/right/2-sided) and :cpp:any:`KnuthBendix` .


   * - :cpp:member:`ToddCoxeter(congruence_kind, fpsemigroup::ToddCoxeter&)`
     - Construct from kind (left/right/2-sided) and :cpp:any:`ToddCoxeter` .


   * - :cpp:member:`ToddCoxeter(congruence_kind, std::shared_ptr<FroidurePinBase>, options::froidure_pin)`
     - Construct from kind (left/right/2-sided), shared pointer to :cpp:any:`FroidurePinBase`  , and options.



Deleted constructors
--------------------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`ToddCoxeter() = delete`
     - Deleted.


   * - :cpp:member:`ToddCoxeter(ToddCoxeter&&) = delete`
     - Deleted.


   * - :cpp:member:`operator=(ToddCoxeter const&) = delete`
     - Deleted.


   * - :cpp:member:`operator=(ToddCoxeter&&) = delete`
     - Deleted.



Initialization
--------------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`prefill(table_type const&)`
     - Prefill the coset table.



Settings
--------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`deduction_policy() const noexcept`
     - The current value of the deduction policy setting.


   * - :cpp:member:`deduction_policy(options::deductions)`
     - Specify how to handle deductions.


   * - :cpp:member:`f_defs() const noexcept`
     - The current value of the f_defs setting.


   * - :cpp:member:`f_defs(size_t)`
     - The approx number of Felsch style definitions in `ACE <https://staff.itee.uq.edu.au/havas/>`_ strategies.


   * - :cpp:member:`froidure_pin_policy() const noexcept`
     - The current value of the Froidure-Pin policy setting.


   * - :cpp:member:`froidure_pin_policy(options::froidure_pin) noexcept`
     - Specify whether to use the relations or the Cayley graph.


   * - :cpp:member:`hlt_defs() const noexcept`
     - The current value of the hlt_defs setting.


   * - :cpp:member:`hlt_defs(size_t)`
     - The approx number of HLT style definitions in `ACE <https://staff.itee.uq.edu.au/havas/>`_ strategies.


   * - :cpp:member:`large_collapse() const noexcept`
     - The current value of the large collapse setting.


   * - :cpp:member:`large_collapse(size_t) noexcept`
     - Specify what should be considered a large collapse.


   * - :cpp:member:`lookahead() const noexcept`
     - The current value of the setting for lookaheads.


   * - :cpp:member:`lookahead(options::lookahead) noexcept`
     - Set the style of lookahead to use in HLT.


   * - :cpp:member:`lookahead_growth_factor() const noexcept`
     - The current value of the lookahead growth factor.


   * - :cpp:member:`lookahead_growth_factor(float)`
     - Set the lookahead growth factor.


   * - :cpp:member:`lookahead_growth_threshold() const noexcept`
     - The current value of the lookahead growth threshold.


   * - :cpp:member:`lookahead_growth_threshold(size_t) noexcept`
     - Set the lookahead growth threshold.


   * - :cpp:member:`lower_bound() const noexcept`
     - The current value of the lower bound setting.


   * - :cpp:member:`lower_bound(size_t) noexcept`
     - Specify minimum number of classes that may trigger early stop.


   * - :cpp:member:`max_deductions() const noexcept`
     - The current value of the setting for the maximum number of deductions.


   * - :cpp:member:`max_deductions(size_t) noexcept`
     - The maximum number of deductions in the stack.


   * - :cpp:member:`max_preferred_defs() const noexcept`
     - The current value of the maximum preferred definitions setting.


   * - :cpp:member:`max_preferred_defs(size_t) noexcept`
     - Specify the maximum number of preferred definitions.


   * - :cpp:member:`min_lookahead() const noexcept`
     - The current value of the minimum lookahead setting.


   * - :cpp:member:`min_lookahead(size_t) noexcept`
     - Set the minimum value of :cpp:member:`next_lookahead()` .


   * - :cpp:member:`next_lookahead() const noexcept`
     - The current value of the next lookahead setting.


   * - :cpp:member:`next_lookahead(size_t) noexcept`
     - Set the threshold that will trigger a lookahead in HLT.


   * - :cpp:member:`preferred_defs() const noexcept`
     - The current value of the preferred definitions setting.


   * - :cpp:member:`preferred_defs(options::preferred_defs) noexcept`
     - Specify how to handle preferred definitions.


   * - :cpp:member:`random_interval() const noexcept`
     - The current value of the random interval setting.


   * - :cpp:member:`random_interval(T) noexcept <template <typename T> ToddCoxeter & random_interval(T) noexcept>`
     - Set the amount of time per strategy for :cpp:member:`options::strategy::random` .


   * - :cpp:member:`random_interval(std::chrono::nanoseconds) noexcept`
     - Set the amount of time per strategy for :cpp:member:`options::strategy::random` .


   * - :cpp:member:`random_shuffle_generating_pairs()`
     - Randomly shuffle the generating pairs.


   * - :cpp:member:`remove_duplicate_generating_pairs()`
     - Remove duplicate generating pairs.


   * - :cpp:member:`restandardize() const noexcept`
     - The current value of the restandardize setting.


   * - :cpp:member:`restandardize(bool) noexcept`
     - Specify whether to standardize between HLT and Felsch.


   * - :cpp:member:`save() const noexcept`
     - The current value of save setting.


   * - :cpp:member:`save(bool)`
     - Process deductions during HLT.


   * - :cpp:member:`settings_string() const`
     - Returns a string containing a tabularized summary of all the settings.


   * - :cpp:member:`simplify(size_t)`
     - Simplify defining relations and/or generating pairs.


   * - :cpp:member:`sort_generating_pairs(sort_free_function_type)`
     - Sort generating pairs.


   * - :cpp:member:`sort_generating_pairs(sort_function_type)`
     - Sort generating pairs.


   * - :cpp:member:`standardize() const noexcept`
     - The current value of the standardize setting.


   * - :cpp:member:`standardize(bool) noexcept`
     - Partially short-lex standardize the table during enumeration.


   * - :cpp:member:`strategy() const noexcept`
     - The current strategy for enumeration.


   * - :cpp:member:`strategy(options::strategy)`
     - Specify the strategy.


   * - :cpp:member:`use_relations_in_extra() const noexcept`
     - The current value of the setting for using relations.


   * - :cpp:member:`use_relations_in_extra(bool) noexcept`
     - Perform an HLT-style push of the defining relations at the identity.



Statistics
----------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`stats() const noexcept`
     - Returns a const reference to a statistics object.


   * - :cpp:member:`stats_string() const`
     - Returns a string containing a tabularized summary of the statistics.



Container-like
--------------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`empty() const`
     - Check if there are no relations or generating pairs.


   * - :cpp:member:`reserve(size_t)`
     - Reserve the specified capacity in the coset table.


   * - :cpp:member:`shrink_to_fit()`
     - Release unused memory if finished.



Standardization
---------------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`is_standardized() const noexcept`
     - Check if the table has been standardized.


   * - :cpp:member:`standardization_order() const noexcept`
     - Returns the current order in which the table is standardized.


   * - :cpp:member:`standardize(order)`
     - Standardize the table according to the specified order.



Iterators
---------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`cbegin_class(class_index_type,size_t,size_t) const`
     - Returns a :cpp:member:`class_iterator`  pointing at the shortlex least word in an class.


   * - :cpp:member:`cbegin_class(word_type const &,size_t,size_t)`
     - Returns a :cpp:member:`class_iterator`  pointing at the shortlex least word in a class.


   * - :cpp:member:`cbegin_extra() const noexcept`
     - Returns a const iterator pointing at the first word in a generating pair.


   * - :cpp:member:`cbegin_normal_forms()`
     - Returns a :cpp:member:`normal_form_iterator`  pointing at the first normal form.


   * - :cpp:member:`cbegin_relations() const noexcept`
     - Returns a const iterator pointing at the first word in the first defining relation (if any).


   * - :cpp:member:`cend_class() const`
     - Returns a :cpp:member:`class_iterator`  pointing one past the last word in a class.


   * - :cpp:member:`cend_extra() const noexcept`
     - Returns a const iterator pointing one after the last word in any generating pair.


   * - :cpp:member:`cend_normal_forms()`
     - Returns a :cpp:member:`normal_form_iterator`  pointing one past the last normal form.


   * - :cpp:member:`cend_relations() const noexcept`
     - Returns a const iterator pointing one after the last word in the last defining relation (if any).



Properties
----------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`compatible() const noexcept`
     - Check if the table is compatible with the relations.


   * - :cpp:member:`complete() const noexcept`
     - Check if the table is complete.


   * - :cpp:member:`felsch_tree_height()`
     - Returns the height of the Felsch tree.


   * - :cpp:member:`felsch_tree_number_of_nodes()`
     - Returns the number of nodes of the Felsch tree.


   * - :cpp:member:`is_non_trivial(size_t, std::chrono::milliseconds, float)`
     - Check if the congruence has more than one class.


   * - :cpp:member:`length_of_generating_pairs()`
     - Returns the total length of the generating pairs.


   * - :cpp:member:`number_of_words(class_index_type) const`
     - Returns the size of the specified class.


   * - :cpp:member:`number_of_words(word_type const&)`
     - Returns the size of the specified class.


   * - :cpp:member:`to_gap_string()`
     - Returns a string containing a GAP definition of the finitely presented semigroup represented by a :cpp:any:`ToddCoxeter`  instance.



Member functions inherited from CosetManager
--------------------------------------------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`coset_capacity() const noexcept`
     - Returns the capacity of the coset table.


   * - :cpp:member:`first_free_coset() const noexcept`
     - Returns the first free coset.


   * - :cpp:member:`growth_factor() const noexcept`
     - The current value of the growth factor setting.


   * - :cpp:member:`growth_factor(float)`
     - Set the value of the growth factor setting.


   * - :cpp:member:`has_free_cosets() const noexcept`
     - Check if there are any free cosets.


   * - :cpp:member:`is_active_coset(coset_type) const`
     - Check if the given coset is active or not.


   * - :cpp:member:`is_valid_coset(coset_type) const noexcept`
     - Check if the given coset is valid.


   * - :cpp:member:`next_active_coset(coset_type) const`
     - Returns the next active coset after the given coset.


   * - :cpp:member:`number_of_cosets_active() const noexcept`
     - Returns the number of active cosets.


   * - :cpp:member:`number_of_cosets_defined() const noexcept`
     - Returns the total number of cosets defined so far.


   * - :cpp:member:`number_of_cosets_killed() const noexcept`
     - Returns the total number of cosets that have been killed so far.



Member functions inherited from CongruenceInterface
---------------------------------------------------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`add_pair(std::initializer_list<size_t>, std::initializer_list<size_t>)`
     - Add a generating pair to the congruence.


   * - :cpp:member:`add_pair(word_type const&, word_type const&)`
     - Add a generating pair to the congruence.


   * - :cpp:member:`cbegin_generating_pairs() const noexcept`
     - Returns a const iterator pointing to the first generating pair.


   * - :cpp:member:`cbegin_ntc()`
     - Returns a const iterator pointing to the first non-singleton class.


   * - :cpp:member:`cend_generating_pairs() const noexcept`
     - Returns a const iterator pointing one-after-the-end of the last generating pair.


   * - :cpp:member:`cend_ntc()`
     - Returns a const iterator pointing one-past-the-end of the last non-singleton class.


   * - :cpp:member:`class_index_to_word(class_index_type)`
     - Get a canonical representative of the ``i-th`` class.


   * - :cpp:member:`class_index_type`
     - Type for indices of congruence class indices.


   * - :cpp:member:`const_contains(word_type const&, word_type const&) const`
     - Check if a pair of words is known to belong to the congruence.


   * - :cpp:member:`const_iterator`
     - Type for a ``const_iterator`` to the generating pairs.


   * - :cpp:member:`contains(word_type const&, word_type const&) override`
     - Check if a pair of words belongs to the congruence.


   * - :cpp:member:`has_parent_fpsemigroup() const noexcept`
     - Check if the congruence was constructed from a :cpp:any:`FpSemigroupInterface`  instance.


   * - :cpp:member:`has_parent_froidure_pin() const noexcept`
     - Check if the congruence was constructed from a :cpp:any:`FroidurePin`  instance.


   * - :cpp:member:`has_quotient_froidure_pin() const noexcept`
     - Check if the quotient semigroup has been computed.


   * - :cpp:member:`is_quotient_obviously_finite()`
     - Deterministically check if the quotient is finite.


   * - :cpp:member:`is_quotient_obviously_infinite()`
     - Deterministically check if the quotient is infinite.


   * - :cpp:member:`kind() const noexcept`
     - The handedness of the congruence (left, right, or 2-sided).


   * - :cpp:member:`less(word_type const&, word_type const&)`
     - Compare the indices of the classes containing two words.


   * - :cpp:member:`non_trivial_class_iterator`
     - Type for a ``const_iterator`` to non-trivial classes.


   * - :cpp:member:`non_trivial_classes()`
     - Returns a shared pointer to the non-trivial classes.


   * - :cpp:member:`non_trivial_classes_type`
     - Type for non-trivial classes.


   * - :cpp:member:`number_of_classes()`
     - Compute the number of classes in the congruence.


   * - :cpp:member:`number_of_generating_pairs() const noexcept`
     - The number of generating pairs.


   * - :cpp:member:`number_of_generators() const noexcept`
     - The number of generators.


   * - :cpp:member:`number_of_non_trivial_classes()`
     - The number of non-singleton classes.


   * - :cpp:member:`parent_fpsemigroup() const`
     - Get the parent :cpp:any:`FpSemigroupInterface`  instance (if any).


   * - :cpp:member:`parent_froidure_pin() const`
     - Get the parent :cpp:any:`FroidurePin`  instance (if any).


   * - :cpp:member:`quotient_froidure_pin()`
     - Returns a semigroup represented as an instance of a derived class of :cpp:any:`FroidurePinBase`  that is isomorphic to the quotient of the parent semigroup of ``this`` by the 2-sided congruence that ``this`` represents.


   * - :cpp:member:`set_number_of_generators(size_t)`
     - Set the number of generators of the congruence.


   * - :cpp:member:`word_to_class_index(word_type const&)`
     - Convert a word into the index of the class containing it.



Member functions inherited from Runner
--------------------------------------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`dead() const noexcept`
     - Check if the runner is dead.


   * - :cpp:member:`finished() const`
     - Check if :cpp:member:`run`  has been run to completion or not.


   * - :cpp:member:`kill() noexcept`
     - Stop :cpp:member:`run`  from running (thread-safe).


   * - :cpp:member:`report() const`
     - Check if it is time to report.


   * - :cpp:member:`report_every() const noexcept`
     - Get the minimum elapsed time between reports.


   * - :cpp:member:`report_every(TIntType) <template <typename TIntType> void report_every(TIntType)>`
     - Set the minimum elapsed time between reports.


   * - :cpp:member:`report_every(std::chrono::nanoseconds)`
     - Set the minimum elapsed time between reports.


   * - :cpp:member:`report_why_we_stopped() const`
     - Report why :cpp:member:`run`  stopped.


   * - :cpp:member:`run()`
     - Run until :cpp:member:`finished` .


   * - :cpp:member:`run_for(TIntType) <template <typename TIntType> void run_for(TIntType)>`
     - Run for a specified amount of time.


   * - :cpp:member:`run_for(std::chrono::nanoseconds)`
     - Run for a specified amount of time.


   * - :cpp:member:`run_until(T&&) <template <typename T> void run_until(T&&)>`
     - Run until a nullary predicate returns ``true`` or :cpp:member:`finished` .


   * - :cpp:member:`run_until(bool(*)())`
     - Run until a nullary predicate returns ``true`` or :cpp:member:`finished` .


   * - :cpp:member:`running() const noexcept`
     - Check if currently running.


   * - :cpp:member:`running_for() const noexcept`
     - Check if the runner is currently running for a particular length of time.


   * - :cpp:member:`running_until() const noexcept`
     - Check if the runner is currently running until a nullary predicate returns ``true``.


   * - :cpp:member:`started() const`
     - Check if :cpp:member:`run`  has been called at least once before.


   * - :cpp:member:`stopped() const`
     - Check if the runner is stopped.


   * - :cpp:member:`stopped_by_predicate() const`
     - Check if the runner was, or should, stop because of the argument for :cpp:member:`run_until` .


   * - :cpp:member:`timed_out() const`
     - Check if the amount of time passed to :cpp:member:`run_for`  has elapsed.



.. toctree::
   :hidden:

   libsemigroups__congruence__toddcoxeter__member_types.rst
   libsemigroups__congruence__toddcoxeter__constructors.rst
   libsemigroups__congruence__toddcoxeter__deleted_constructors.rst
   libsemigroups__congruence__toddcoxeter__initialization.rst
   libsemigroups__congruence__toddcoxeter__settings.rst
   libsemigroups__congruence__toddcoxeter__statistics.rst
   libsemigroups__congruence__toddcoxeter__container_like.rst
   libsemigroups__congruence__toddcoxeter__standardization.rst
   libsemigroups__congruence__toddcoxeter__iterators.rst
   libsemigroups__congruence__toddcoxeter__properties.rst
   libsemigroups__congruence__toddcoxeter__member_functions_inherited_from_cosetmanager.rst
   libsemigroups__congruence__toddcoxeter__member_functions_inherited_from_congruenceinterface.rst
   libsemigroups__congruence__toddcoxeter__member_functions_inherited_from_runner.rst
