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

Bipartition
===========

.. doxygenclass:: libsemigroups::Bipartition
   :project: libsemigroups

.. cpp:namespace:: libsemigroups::Bipartition


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

   * - :cpp:member:`const_iterator`
     - Type for const iterators pointing to the lookup for the blocks of a bipartition.


   * - :cpp:member:`iterator`
     - Type for iterators pointing to the lookup for the blocks of a bipartition.


   * - :cpp:member:`lookup_const_iterator`
     - Type for iterators pointing to the lookup for transverse blocks of a bipartition.



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

   * - :cpp:member:`Bipartition() <Bipartition::Bipartition()>`
     - Constructs an uninitialised bipartition of degree ``0``.


   * - :cpp:member:`Bipartition(Bipartition const&)`
     - Default copy constructor.


   * - :cpp:member:`Bipartition(Bipartition&&)`
     - Default move constructor.


   * - :cpp:member:`Bipartition(size_t)`
     - Constructs an uninitialised bipartition of given degree.


   * - :cpp:member:`Bipartition(std::initializer_list<std::vector<int32_t>> const&)`
     - Constructs a bipartition from a partition.


   * - :cpp:member:`Bipartition(std::initializer_list<uint32_t> const&)`
     - Constructs a bipartition from an initializer list blocks lookup.


   * - :cpp:member:`Bipartition(std::vector<uint32_t> const&)`
     - Constructs a bipartition from a const reference to blocks lookup.


   * - :cpp:member:`Bipartition(std::vector<uint32_t>&&)`
     - Constructs a bipartition from an rvalue reference to blocks lookup.


   * - :cpp:member:`operator=(Bipartition const&)`
     - Default copy assignment operator.


   * - :cpp:member:`operator=(Bipartition&&)`
     - Default move assignment operator.



Static member functions
-----------------------
.. list-table::
   :widths: 50 50
   :header-rows: 0

   * - :cpp:member:`identity(size_t)`
     - Returns an identity bipartition.


   * - :cpp:member:`make(T const&) <template <typename T> Bipartition make(T const&)>`
     - Validates the arguments, constructs a bipartition and validates it.


   * - :cpp:member:`make(std::initializer_list<std::vector<int32_t>> const &)`
     - Validates the arguments, constructs a bipartition and validates it.


   * - :cpp:member:`make(std::initializer_list<uint32_t> const&)`
     - Validates the arguments, constructs a bipartition and validates it.



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

   * - :cpp:member:`operator<(Bipartition const&) const`
     - Compare two bipartitions for less.


   * - :cpp:member:`operator==(Bipartition const&) const`
     - Compare two bipartitions for equality.


   * - :cpp:member:`product_inplace(Bipartition const&, Bipartition const&, size_t)`
     - Modify the current bipartition in-place to contain the product of two bipartitions.



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

   * - :cpp:member:`at(size_t)`
     - Returns a reference to the index of the block containing a value.


   * - :cpp:member:`at(size_t) const`
     - Returns a const reference to the index of the block containing a value.


   * - :cpp:member:`operator[](size_t)`
     - Returns the index of the block containing a value.


   * - :cpp:member:`operator[](size_t) const`
     - Returns the index of the block containing a value.



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

   * - :cpp:member:`cbegin() const noexcept`
     - Returns a const iterator pointing to the index of the first block.


   * - :cpp:member:`cbegin_left_blocks() const noexcept`
     - Returns a const iterator pointing to the index of the first left block.


   * - :cpp:member:`cbegin_lookup() noexcept`
     - Returns a const iterator pointing to the first transverse block lookup.


   * - :cpp:member:`cbegin_right_blocks() const noexcept`
     - Returns a const iterator pointing to the index of the first right block.


   * - :cpp:member:`cend() const noexcept`
     - Returns a const iterator pointing one passed the last index of the last block.


   * - :cpp:member:`cend_left_blocks() const noexcept`
     - Returns a const iterator pointing one passed the last index of the last left block.


   * - :cpp:member:`cend_lookup() noexcept`
     - Returns a const iterator pointing to the first transverse block lookup.


   * - :cpp:member:`cend_right_blocks() const noexcept`
     - Returns a const iterator pointing one passed the last index of the last right block.



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

   * - :cpp:member:`degree() const noexcept`
     - Returns the degree of the bipartition.


   * - :cpp:member:`hash_value() const`
     - Returns a hash value.


   * - :cpp:member:`identity() const`
     - Returns an identity bipartition.


   * - :cpp:member:`is_transverse_block(size_t)`
     - Check if a block is a transverse block.


   * - :cpp:member:`left_blocks()`
     - Return a pointer to the left blocks of a bipartition.


   * - :cpp:member:`number_of_blocks() const`
     - Returns the number of blocks in a :cpp:any:`Bipartition` .


   * - :cpp:member:`number_of_left_blocks()`
     - Returns the number of blocks containing a positive integer.


   * - :cpp:member:`number_of_right_blocks()`
     - Returns the number of blocks containing a negative integer.


   * - :cpp:member:`rank()`
     - Returns the number of transverse blocks.


   * - :cpp:member:`right_blocks()`
     - Return a pointer to the right blocks of a bipartition.



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

   * - :cpp:member:`set_number_of_blocks(size_t) noexcept`
     - Set the number of blocks.


   * - :cpp:member:`set_number_of_left_blocks(size_t) noexcept`
     - Set the number of left blocks.


   * - :cpp:member:`set_rank(size_t) noexcept`
     - Set the rank.



.. toctree::
   :hidden:

   libsemigroups__bipartition__member_types.rst
   libsemigroups__bipartition__constructors.rst
   libsemigroups__bipartition__static_member_functions.rst
   libsemigroups__bipartition__operators.rst
   libsemigroups__bipartition__accessors.rst
   libsemigroups__bipartition__iterators.rst
   libsemigroups__bipartition__getters.rst
   libsemigroups__bipartition__setters.rst
