Regina 7.3.1 Calculation Engine
|
Represents a power of a generator in a group presentation. More...
#include <algebra/grouppresentation.h>
Public Member Functions | |
GroupExpressionTerm ()=default | |
Creates a new uninitialised term. | |
GroupExpressionTerm (unsigned long gen, long exp) | |
Creates a new term initialised to the given value. | |
GroupExpressionTerm (const GroupExpressionTerm &)=default | |
Creates a new term initialised to the given value. | |
GroupExpressionTerm & | operator= (const GroupExpressionTerm &)=default |
Makes this term identical to the given term. | |
bool | operator== (const GroupExpressionTerm &other) const |
Determines whether this and the given term contain identical data. | |
bool | operator!= (const GroupExpressionTerm &other) const |
Determines whether this and the given term do not contain identical data. | |
bool | operator< (const GroupExpressionTerm &other) const |
Imposes an ordering on terms. | |
GroupExpressionTerm | inverse () const |
Returns the inverse of this term. | |
bool | operator+= (const GroupExpressionTerm &other) |
Attempts to merge this term with the given term. | |
Public Attributes | |
unsigned long | generator |
The number that identifies the generator in this term. | |
long | exponent |
The exponent to which the generator is raised. | |
Represents a power of a generator in a group presentation.
These objects are small enough to pass by value and swap with std::swap(), with no need for any specialised move operations or swap functions.
|
default |
Creates a new uninitialised term.
|
inline |
Creates a new term initialised to the given value.
gen | the number that identifies the generator in the new term. |
exp | the exponent to which this generator is raised. |
|
default |
Creates a new term initialised to the given value.
|
inline |
Returns the inverse of this term.
The inverse has the same generator but a negated exponent.
Note that this term will remain unchanged.
|
inline |
Determines whether this and the given term do not contain identical data.
other | the term with which this term will be compared. |
true
if and only if this and the given term do not have both the same generator and exponent.
|
inline |
Attempts to merge this term with the given term.
If both terms have the same generator, the two exponents will be added and stored in this term. If the generators are different, this routine will do nothing.
Note that this term might be changed but the given term will remain unchanged.
other | the term to merge with this term. |
true
if the two terms were merged into this term, or false
if the two terms have different generators.
|
inline |
Imposes an ordering on terms.
Terms are ordered lexigraphically as (generator, exponent) pairs.
other | the term to compare with this. |
|
default |
Makes this term identical to the given term.
|
inline |
Determines whether this and the given term contain identical data.
other | the term with which this term will be compared. |
true
if and only if this and the given term have both the same generator and exponent. long regina::GroupExpressionTerm::exponent |
The exponent to which the generator is raised.
unsigned long regina::GroupExpressionTerm::generator |
The number that identifies the generator in this term.