|
libsemigroups
|
Class for partitioned binary relations (PBR). More...
#include <elements.h>


Public Member Functions | |
| size_t | complexity () const override |
| Returns the approximate time complexity of multiplying PBRs. More... | |
| size_t | degree () const override |
| Returns the degree of a PBR. More... | |
| Element * | identity () const override |
Returns the identity PBR with degree equal to that of this. More... | |
| void | redefine (Element const *x, Element const *y, size_t const &thread_id) override |
Multiply x and y and stores the result in this. More... | |
Public Member Functions inherited from libsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR > | |
| ElementWithVectorData () | |
| A constructor. More... | |
| ElementWithVectorData (std::vector< std::vector< u_int32_t > > *vector) | |
| A constructor. More... | |
| ElementWithVectorData (std::vector< std::vector< u_int32_t > > const &vector) | |
| A constructor. More... | |
| std::vector< u_int32_t > | at (size_t pos) const |
Returns the pos entry in the vector containing the defining data. More... | |
| std::vector< std::vector< u_int32_t > >::iterator | begin () const |
| Returns an iterator. More... | |
| std::vector< std::vector< u_int32_t > >::iterator | cbegin () const |
| Returns a const iterator. More... | |
| std::vector< std::vector< u_int32_t > >::iterator | cend () const |
| Returns a const iterator. More... | |
| void | copy (Element const *x) override |
Copy another Element into this. More... | |
| std::vector< std::vector< u_int32_t > >::iterator | end () const |
| Returns an iterator. More... | |
| bool | operator< (Element const &that) const override |
Returns true if this is less than that. More... | |
| bool | operator== (Element const &that) const override |
Returns true if this equals that. More... | |
| std::vector< u_int32_t > | operator[] (size_t pos) const |
Returns the pos entry in the vector containing the defining data. More... | |
| Element * | really_copy (size_t increase_deg_by=0) const override |
Returns a pointer to a copy of this. More... | |
| void | really_delete () override |
| Deletes the defining data of an ElementWithVectorData. More... | |
| void | swap (Element *x) override |
Swap another Element with this. More... | |
Public Member Functions inherited from libsemigroups::Element | |
| Element (elm_t type=Element::elm_t::NOT_RWSE) | |
| A constructor. More... | |
| virtual | ~Element () |
| A default destructor. More... | |
| elm_t | get_type () const |
| Returns the type libsemigroups::Element::elm_t of an Element object. More... | |
| size_t | hash_value () const |
| Return the hash value of an Element. More... | |
| virtual void | redefine (Element const *x, Element const *y) |
Multiplies x and y and stores the result in this. More... | |
Protected Member Functions | |
| void | cache_hash_value () const override |
| Calculate and cache a hash value. More... | |
Protected Member Functions inherited from libsemigroups::Element | |
| void | reset_hash_value () const |
| Reset the cached value used by Element::hash_value. More... | |
Additional Inherited Members | |
Public Types inherited from libsemigroups::Element | |
| enum | elm_t { RWSE = 0, NOT_RWSE = 1 } |
| This enum contains some different types of Element. More... | |
Static Protected Member Functions inherited from libsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR > | |
| static size_t | vector_hash (std::vector< T > const *vec) |
Returns a hash value for a vector provided there is a specialization of std::hash for the template type T. More... | |
Protected Attributes inherited from libsemigroups::ElementWithVectorData< std::vector< u_int32_t >, PBR > | |
| std::vector< std::vector< u_int32_t > > * | _vector |
The vector containing the defining data of this. More... | |
Protected Attributes inherited from libsemigroups::Element | |
| size_t | _hash_value |
| This data member holds a cached version of the hash value of an Element. It is stored here if it is ever computed. It is invalidated by libsemigroups::Element::redefine and sometimes by libsemigroups::Element::really_copy, and potentially any other non-const data member of Element or any of its subclasses. More... | |
Static Protected Attributes inherited from libsemigroups::Element | |
| static size_t const | UNDEFINED = std::numeric_limits<size_t>::max() |
| UNDEFINED value. More... | |
Class for partitioned binary relations (PBR).
Partitioned binary relations (PBRs) are a generalisation of bipartitions, which were introduced by Martin and Mazorchuk.
|
overrideprotectedvirtual |
Calculate and cache a hash value.
This method is used to compute and cache the hash value of this.
Implements libsemigroups::Element.
|
overridevirtual |
Returns the approximate time complexity of multiplying PBRs.
The approximate time complexity of multiplying PBRs is \(2n ^ 3\) where \(n\) is the degree.
Implements libsemigroups::Element.
|
overridevirtual |
Returns the degree of a PBR.
The degree of a PBR is half the number of points in the PBR, which is also half the length of the underlying vector ElementWithVectorData::_vector.
Implements libsemigroups::Element.
|
overridevirtual |
Returns the identity PBR with degree equal to that of this.
This method returns a new PBR with degree equal to the degree of this where every value is adjacent to its negative. Equivalently, \(i\) is adjacent \(i + n\) and vice versa for every \(i\) less than the degree \(n\).
Implements libsemigroups::Element.
|
overridevirtual |
Multiply x and y and stores the result in this.
This method redefines this to be the product of the parameters x and y. This method asserts that the degrees of x, y, and this, are all equal, and that neither x nor y equals this.
The parameter thread_id is required since some temporary storage is required to find the product of x and y. Note that if different threads call this method with the same value of thread_id then bad things will happen.
Reimplemented from libsemigroups::Element.
1.8.13