#include <ngrouppresentation.h>
Public Member Functions | |
NGroupExpressionTerm () | |
Creates a new uninitialised term. | |
NGroupExpressionTerm (unsigned long newGen, long newExp) | |
Creates a new term initialised to the given value. | |
NGroupExpressionTerm (const NGroupExpressionTerm &cloneMe) | |
Creates a new term initialised to the given value. | |
NGroupExpressionTerm & | operator= (const NGroupExpressionTerm &cloneMe) |
Makes this term identical to the given term. | |
bool | operator== (const NGroupExpressionTerm &other) const |
Determines whether this and the given term contain identical data. | |
NGroupExpressionTerm | inverse () const |
Returns the inverse of this term. | |
bool | operator+= (const NGroupExpressionTerm &other) |
Attempts to merge this term with the given term. | |
void | writeToFile (NFile &out) const |
Writes this term to the given old-style binary file. | |
Static Public Member Functions | |
static NGroupExpressionTerm | readFromFile (NFile &in) |
Reads a term from the given old-style binary file. | |
Public Attributes | |
unsigned long | generator |
The number that identifies the generator in this term. | |
long | exponent |
The exponent to which the generator is raised. |
regina::NGroupExpressionTerm::NGroupExpressionTerm | ( | ) | [inline] |
Creates a new uninitialised term.
regina::NGroupExpressionTerm::NGroupExpressionTerm | ( | unsigned long | newGen, | |
long | newExp | |||
) | [inline] |
Creates a new term initialised to the given value.
newGen | the number that identifies the generator in the new term. | |
newExp | the exponent to which this generator is raised. |
regina::NGroupExpressionTerm::NGroupExpressionTerm | ( | const NGroupExpressionTerm & | cloneMe | ) | [inline] |
Creates a new term initialised to the given value.
cloneMe | a term whose data will be copied to the new term. |
NGroupExpressionTerm & regina::NGroupExpressionTerm::operator= | ( | const NGroupExpressionTerm & | cloneMe | ) | [inline] |
Makes this term identical to the given term.
cloneMe | the term whose data will be copied to this term. |
bool regina::NGroupExpressionTerm::operator== | ( | const NGroupExpressionTerm & | other | ) | const [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. NGroupExpressionTerm regina::NGroupExpressionTerm::inverse | ( | ) | const [inline] |
Returns the inverse of this term.
The inverse has the same generator but a negated exponent.
Note that this term will remain unchanged.
bool regina::NGroupExpressionTerm::operator+= | ( | const NGroupExpressionTerm & | other | ) | [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. void regina::NGroupExpressionTerm::writeToFile | ( | NFile & | out | ) | const |
Writes this term to the given old-style binary file.
out | the file to which to write. |
static NGroupExpressionTerm regina::NGroupExpressionTerm::readFromFile | ( | NFile & | in | ) | [static] |
Reads a term from the given old-style binary file.
in | the file from which to read. |
unsigned long regina::NGroupExpressionTerm::generator |
The number that identifies the generator in this term.
The exponent to which the generator is raised.