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.

Parameters

(None)

Throws

(None) – This function is noexcept and is guaranteed never to throw.

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.

Complexity

Linear in degree().

Parameters

(None)

Throws

(None) – This function is noexcept and is guaranteed never to throw.

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

Complexity

Constant.

Parameters

index – the index of a block

Throws

(None) – This function is noexcept and is guaranteed never to throw.

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.

Complexity

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

Parameters

(None)

Throws

(None) – This function is noexcept and is guaranteed never to throw.

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

Complexity

At most linear in the number of blocks.

Parameters

(None)

Throws

(None) – Throws if std::count throws.

Returns

The number of signed (transverse) blocks in this.