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
andj
are performed, ifi
orj
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
ifthis
does not equalthat
.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
andthat
.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
ifthis
is less thanthat
.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
ifthis
equalsthat
.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
ifthis
is greater thanthat
.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
.