Member functions¶
This page lists the member functions of PBR
.
-
size_t libsemigroups::PBR::degree() const noexcept¶
Returns the degree of a PBR.
The degree of a PBR is half the number of points in the PBR.
- Parameters
(None)
- Throws
(None) – This function is
noexcept
and is guaranteed never to throw.- Returns
A value of type
size_t
.
-
inline size_t libsemigroups::PBR::hash_value() const¶
Returns a hash value for a PBR.
This value is recomputed every time this function is called.
- Complexity
Linear in
degree()
.- Parameters
(None)
- Throws
(None) – This function guarantees not to throw a
LibsemigroupsException
.- Returns
A hash value for a
this
.
-
inline bool libsemigroups::PBR::operator<(PBR const &that) const¶
Compare.
- Complexity
At worst linear in degree().
- Parameters
that – a PBR object
- Throws
(None) – This function guarantees not to throw a
LibsemigroupsException
.- Returns
true
ifthis
is less thanthat
, andfalse
otherwise.
-
inline bool libsemigroups::PBR::operator==(PBR const &that) const¶
Check equality.
- Complexity
At worst linear in degree().
- Parameters
that – a PBR
- Throws
(None) – This function guarantees not to throw a
LibsemigroupsException
.- Returns
true
ifthis
equalsthat
, andfalse
otherwise.
-
inline std::vector<uint32_t> &libsemigroups::PBR::operator[](size_t i)¶
Returns a reference to the points adjacent to a given point.
- Complexity
Constant.
- Parameters
i – the point.
- Throws
(None) – This function guarantees not to throw a
LibsemigroupsException
.- Returns
A value reference to a
std::vector<uint32_t>
.
-
inline std::vector<uint32_t> const &libsemigroups::PBR::operator[](size_t i) const¶
Returns a const reference to the points adjacent to a given point.
- Complexity
Constant.
- Parameters
i – the point.
- Throws
(None) – This function guarantees not to throw a
LibsemigroupsException
.- Returns
A value const reference to a
std::vector<uint32_t>
.
-
void libsemigroups::PBR::product_inplace(PBR const &x, PBR const &y, size_t thread_id = 0)¶
Multiply two PBR objects and store the product in
this
.Replaces the contents of
this
by the product ofx
andy
.The parameter
thread_id
is required since some temporary storage is required to find the product ofx
andy
. Note that if different threads call this member function with the same value ofthread_id
then bad things will happen.Warning
No checks are made on whether or not the parameters are compatible. If
x
andy
have different degrees, then bad things will happen.- Parameters
- Throws
(None) – This function guarantees not to throw a
LibsemigroupsException
.- Returns
(None)