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

CongruenceInterface
===================

.. doxygenclass:: libsemigroups::CongruenceInterface
   :project: libsemigroups

.. cpp:namespace:: libsemigroups::CongruenceInterface


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

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


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


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


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



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

   * - :cpp:member:`CongruenceInterface(CongruenceInterface const&) = default`
     - Default copy constructor.


   * - :cpp:member:`CongruenceInterface(congruence_kind)`
     - Constructs a congruence of the specified type.



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

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


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


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


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



Initialization
--------------
.. 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:`number_of_generating_pairs() const noexcept`
     - The number of generating pairs.


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


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



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

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



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

   * - :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.



Words and class indices
-----------------------
.. list-table::
   :widths: 50 50
   :header-rows: 0

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


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



Numbers of classes, and comparisons
-----------------------------------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :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:`contains(word_type const&, word_type const&)`
     - Check if a pair of words belongs to the congruence.


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


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


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


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



Related semigroups
------------------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :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:`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.



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__congruenceinterface__member_types.rst
   libsemigroups__congruenceinterface__constructors.rst
   libsemigroups__congruenceinterface__deleted_constructors.rst
   libsemigroups__congruenceinterface__initialization.rst
   libsemigroups__congruenceinterface__handedness.rst
   libsemigroups__congruenceinterface__iterators.rst
   libsemigroups__congruenceinterface__words_and_class_indices.rst
   libsemigroups__congruenceinterface__numbers_of_classes__and_comparisons.rst
   libsemigroups__congruenceinterface__related_semigroups.rst
   libsemigroups__congruenceinterface__member_functions_inherited_from_runner.rst
