Bipartition

class Bipartition

Defined in bipart.hpp.

A bipartition is a partition of the set \(\{0, ..., 2n - 1\}\) for some non-negative integer \(n\); see the Semigroups package for GAP documentation for more details. The Bipartition class is more complex (i.e. has more member functions) than are used in libsemigroups because they are used in the GAP package Semigroups package for GAP.

Member types

const_iterator

Type for const iterators pointing to the lookup for the blocks of a bipartition.

iterator

Type for iterators pointing to the lookup for the blocks of a bipartition.

lookup_const_iterator

Type for iterators pointing to the lookup for transverse blocks of a bipartition.

Constructors

Bipartition()

Constructs an uninitialised bipartition of degree 0.

Bipartition(Bipartition const&)

Default copy constructor.

Bipartition(Bipartition&&)

Default move constructor.

Bipartition(size_t)

Constructs an uninitialised bipartition of given degree.

Bipartition(std::initializer_list<std::vector<int32_t>> const&)

None

Bipartition(std::initializer_list<uint32_t> const&)

Constructs a bipartition from an initializer list blocks lookup.

Bipartition(std::vector<uint32_t> const&)

Constructs a bipartition from a const reference to blocks lookup.

Bipartition(std::vector<uint32_t>&&)

Constructs a bipartition from an rvalue reference to blocks lookup.

operator=(Bipartition const&)

Default copy assignment operator.

operator=(Bipartition&&)

Default move assignment operator.

Static member functions

identity(size_t)

Returns an identity bipartition.

make(T const&)

Validates the arguments, constructs a bipartition and validates it.

make(std::initializer_list<std::vector<int32_t>> const &)

None

make(std::initializer_list<uint32_t> const&)

Validates the arguments, constructs a bipartition and validates it.

Operators

operator<(Bipartition const&) const

Compare two bipartitions for less.

operator==(Bipartition const&) const

Compare two bipartitions for equality.

product_inplace(Bipartition const&, Bipartition const&, size_t)

Modify the current bipartition in-place to contain the product of two bipartitions.

Accessors

at(size_t)

Returns a reference to the index of the block containing a value.

at(size_t) const

Returns a const reference to the index of the block containing a value.

operator[](size_t)

Returns the index of the block containing a value.

operator[](size_t) const

Returns the index of the block containing a value.

Iterators

cbegin() const noexcept

Returns a const iterator pointing to the index of the first block.

cbegin_left_blocks() const noexcept

Returns a const iterator pointing to the index of the first left block.

cbegin_lookup() noexcept

Returns a const iterator pointing to the first transverse block lookup.

cbegin_right_blocks() const noexcept

Returns a const iterator pointing to the index of the first right block.

cend() const noexcept

Returns a const iterator pointing one passed the last index of the last block.

cend_left_blocks() const noexcept

Returns a const iterator pointing one passed the last index of the last left block.

cend_lookup() noexcept

Returns a const iterator pointing to the first transverse block lookup.

cend_right_blocks() const noexcept

Returns a const iterator pointing one passed the last index of the last right block.

Getters

degree() const noexcept

Returns the degree of the bipartition.

hash_value() const

Returns a hash value.

identity() const

Returns an identity bipartition.

is_transverse_block(size_t)

Check if a block is a transverse block.

left_blocks()

Return a pointer to the left blocks of a bipartition.

number_of_blocks() const

Returns the number of blocks in a Bipartition .

number_of_left_blocks()

Returns the number of blocks containing a positive integer.

number_of_right_blocks()

Returns the number of blocks containing a negative integer.

rank()

Returns the number of transverse blocks.

right_blocks()

Return a pointer to the right blocks of a bipartition.

Setters

set_number_of_blocks(size_t) noexcept

Set the number of blocks.

set_number_of_left_blocks(size_t) noexcept

Set the number of left blocks.

set_rank(size_t) noexcept

Set the rank.