Operators

inline bool libsemigroups::BMat8::get(size_t i, size_t j) const noexcept

Returns the entry in the (i, j)th position.

This member function returns the entry in the (i, j)th position.

Complexity

Constant.

Note

Note that since all matrices are internally represented as 8 x 8, it is possible to access entries that you might not believe exist.

Warning

No checks on the parameters i and j are performed, if i or j is greater than 7, then bad things will happen.

Parameters
  • i – the row of the entry sought.

  • j – the column of the entry sought.

Throws

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

Returns

A bool.

inline bool libsemigroups::BMat8::operator!=(BMat8 const &that) const noexcept

Returns true if this does not equal that.

This member function checks the mathematical inequality of two BMat8 objects.

Complexity

Constant.

Parameters

that – the BMat8 for comparison.

Throws

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

BMat8 libsemigroups::BMat8::operator*(BMat8 const &that) const noexcept

Returns the matrix product of this and that.

This member function returns the standard matrix product (over the boolean semiring) of two BMat8 objects. Uses the technique given here.

Complexity

Constant.

Parameters

that – the matrix we want to multiply by this.

Throws

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

Returns

A BMat8.

inline bool libsemigroups::BMat8::operator<(BMat8 const &that) const noexcept

Returns true if this is less than that.

This member function checks whether a BMat8 objects is less than another. We order by the results of to_int() for each matrix.

Complexity

Constant.

Parameters

that – the BMat8 for comparison.

Throws

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

inline friend std::ostream &libsemigroups::BMat8::operator<<(std::ostream &os, BMat8 const &bm)

Insertion operator.

This member function allows BMat8 objects to be inserted into a std::ostream.

friend std::ostringstream &libsemigroups::BMat8::operator<<(std::ostringstream &os, BMat8 const &bm)

Insertion operator.

This member function allows BMat8 objects to be inserted into an std::ostringstream.

inline bool libsemigroups::BMat8::operator==(BMat8 const &that) const noexcept

Returns true if this equals that.

This member function checks the mathematical equality of two BMat8 objects.

Complexity

Constant.

Parameters

that – the BMat8 for comparison.

Throws

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

inline bool libsemigroups::BMat8::operator>(BMat8 const &that) const noexcept

Returns true if this is greater than that.

This member function checks whether a BMat8 objects is greater than another. We order by the results of to_int() for each matrix.

Complexity

Constant.

Parameters

that – the BMat8 for comparison.

Throws

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

inline uint64_t libsemigroups::BMat8::to_int() const noexcept

Returns the integer representation of this.

Returns an unsigned integer obtained by interpreting an 8 x 8 BMat8 as a sequence of 64 bits (reading rows left to right, from top to bottom) and then realising this sequence as an unsigned int.

Complexity

Constant.

Parameters

(None)

Throws

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

Returns

A uint64_t.

inline BMat8 libsemigroups::BMat8::transpose() const noexcept

Returns the transpose of this.

Uses the technique found in Knu09.

Complexity

Constant.

Parameters

(None)

Throws

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

Returns

A BMat8.