Blocks

class Blocks

Defined bipart.hpp.

Blocks is a class representing signed partitions of the set \(\{0, \ldots, n - 1\}\).

It is possible to associate to every Bipartition a pair of blocks, Bipartition::left_blocks() and Bipartition::right_blocks(), which determine the Green’s \(\mathscr{L}\)- and \(\mathscr{R}\)-classes of the Bipartition in the monoid of all bipartitions. This is the purpose of this class.

The Blocks class is not currently used widely in libsemigroups but are used extensively in the GAP package Semigroups package for GAP.

Member types

const_iterator

Type for const iterators pointing to the index of the block.

iterator

Type for iterators pointing to the index of the block.

lookup_const_iterator

Type for const iterators pointing to the transverse block lookup.

Constructors

Blocks() noexcept = default

Constructs a blocks object of size 0.

Blocks(Blocks const&) = default

Default copy constructor.

Blocks(Blocks&&) = default

Default move constructor.

Blocks(const_iterator,const_iterator)

Constructs a blocks object from iterators.

Blocks(size_t)

Constructs a blocks object of given degree.

operator=(Blocks const&) = default

Default copy assignment operator.

operator=(Blocks&&) = default

Default move assignment operator.

Initialisation

set_block(size_t, uint32_t)

Set the block that a point belongs to.

set_is_transverse_block(size_t, bool)

Set whether or not the block containing a point is transverse.

Operators

operator!=(Blocks const&) const

Compare two blocks objects for inequality.

operator<(Blocks const&) const

Compare two blocks objects for less.

operator==(Blocks const&) const

Compare two blocks objects for equality.

operator[](size_t) const

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

Attributes

degree() const noexcept

Returns the degree of a blocks object.

hash_value() const noexcept

Returns a hash value for a Blocks instance.

is_transverse_block(size_t) const noexcept

Check if a block is a transverse block.

number_of_blocks() const noexcept

Returns the number of blocks in a Blocks object.

rank() const

Returns the number of transverse blocks.

Iterators

cbegin() const noexcept

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

cbegin_lookup() const noexcept

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

cend() const noexcept

Returns a const iterator pointing one past-the-end of the last block.

cend_lookup() const noexcept

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