Attributes

This page contains information about attributes of the Blocks class.

inline uint32_t libsemigroups::Blocks::degree() const noexcept

Returns the degree of a blocks object.

The degree of a Blocks object is the size of the set of which it is a partition, or the size of the blocks parameter to Blocks::Blocks.

Exceptions

This function is noexcept and is guaranteed never to throw.

Parameters

(None)

Returns

The degree of a Blocks object.

size_t libsemigroups::Blocks::hash_value() const noexcept

Returns a hash value for a Blocks instance.

This value is recomputed every time this function is called.

Exceptions

This function is noexcept and is guaranteed never to throw.

Complexity

Linear in degree().

Parameters

(None)

Returns

A hash value for a this.

inline bool libsemigroups::Blocks::is_transverse_block(size_t index) const noexcept

Check if a block is a transverse block.

This function returns true if the block with index index is a transverse (or signed) block and it returns false if it is not transverse (or unsigned).

Exceptions

This function is noexcept and is guaranteed never to throw.

Complexity

Constant.

Parameters

index – the index of a block

Returns

true if the block with index index is transverse, and false if not.

inline uint32_t libsemigroups::Blocks::number_of_blocks() const noexcept

Returns the number of blocks in a Blocks object.

This function returns the number of parts in the partition that instances of this class represent.

Exceptions

This function is noexcept and is guaranteed never to throw.

Complexity

At worst \(O(2n)\) where \(n\) is the degree().

Parameters

(None)

Returns

The number of blocks in a Bipartition object.

uint32_t libsemigroups::Blocks::rank() const

Returns the number of transverse blocks.

This function returns the number of true values in lookup().

Exceptions

Throws if std::count throws.

Complexity

At most linear in the number of blocks.

Parameters

(None)

Returns

The number of signed (transverse) blocks in this.