Operators¶
This page contains information about the comparison operators for the Blocks class.
-
inline bool libsemigroups::Blocks::operator!=(Blocks const &that) const¶
Compare two blocks objects for inequality.
Two Blocks objects are equal if and only if their underlying signed partitions are equal. It is ok to compare blocks of different degree with this operator.
- Complexity
At worst linear in
degree().
- Parameters:
that – a Blocks instance
- Throws:
(None) – This function guarantees not to throw a
LibsemigroupsException.- Returns:
trueifthisequalsthat.
-
bool libsemigroups::Blocks::operator<(Blocks const &that) const¶
Compare two blocks objects for less.
This operator defines a total order on the set of all Blocks objects (including those of different degree).
- Complexity
Linear in
degree().
- Parameters:
that – a Blocks instance
- Throws:
(None) – This function only throws if
std::vector<uint32_t>::operator[] does.- Returns:
trueifthisis less thanthat.
-
bool libsemigroups::Blocks::operator==(Blocks const &that) const¶
Compare two blocks objects for equality.
Two Blocks objects are equal if and only if their underlying signed partitions are equal. It is ok to compare blocks of different degree with this operator.
- Complexity
At worst linear in
degree().
- Parameters:
that – a Blocks instance
- Throws:
(None) – This function only throws if
std::vector<uint32_t>::operator==does.- Returns:
trueifthisequalsthat.
-
inline uint32_t const &libsemigroups::Blocks::operator[](size_t i) const¶
Returns a const reference to the index of the block containing a point.
- Complexity
Constant.
- Parameters:
i – the point.
- Throws:
(None) – This function guarantees not to throw a
LibsemigroupsException.- Returns:
A value const reference to a value of type
uint32_t.