regina::GroupExpressionTerm Struct Reference
Algebraic Structures

Represents a power of a generator in a group presentation. More...

`#include <algebra/grouppresentation.h>`

## Public Member Functions

| GroupExpressionTerm ()
| Creates a new uninitialised term. More...
| GroupExpressionTerm (unsigned long newGen, long newExp)
| Creates a new term initialised to the given value. More...
| GroupExpressionTerm (const GroupExpressionTerm &cloneMe)
| Creates a new term initialised to the given value. More...
GroupExpressionTerm & | operator= (const GroupExpressionTerm &cloneMe)
| Makes this term identical to the given term. More...
bool | operator== (const GroupExpressionTerm &other) const
| Determines whether this and the given term contain identical data. More...
bool | operator!= (const GroupExpressionTerm &other) const
| Determines whether this and the given term do not contain identical data. More...
bool | operator< (const GroupExpressionTerm &other) const
| Imposes an ordering on terms. More...
GroupExpressionTerm | inverse () const
| Returns the inverse of this term. More...
bool | operator+= (const GroupExpressionTerm &other)
| Attempts to merge this term with the given term. More...

## Public Attributes

unsigned long | generator
| The number that identifies the generator in this term. More...
long | exponent
| The exponent to which the generator is raised. More...

## Detailed Description

Represents a power of a generator in a group presentation.

## Constructor & Destructor Documentation

## GroupExpressionTerm() [1/3]

regina::GroupExpressionTerm::GroupExpressionTerm | ( |  | ) |

inline

Creates a new uninitialised term.

## GroupExpressionTerm() [2/3]

regina::GroupExpressionTerm::GroupExpressionTerm | ( | unsigned long | newGen,
|  | long | newExp
| ) |  |

inline

Creates a new term initialised to the given value.

Parameters

  newGen | the number that identifies the generator in the new term.
  newExp | the exponent to which this generator is raised.

## GroupExpressionTerm() [3/3]

regina::GroupExpressionTerm::GroupExpressionTerm | ( | const GroupExpressionTerm & | cloneMe | ) |

inline

Creates a new term initialised to the given value.

Parameters

  cloneMe | a term whose data will be copied to the new term.

## Member Function Documentation

## inverse()

GroupExpressionTerm regina::GroupExpressionTerm::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.

Returns
  the inverse of this term.

## operator!=()

bool regina::GroupExpressionTerm::operator!= | ( | const GroupExpressionTerm & | other | ) | const

inline

Determines whether this and the given term do not contain identical data.

Parameters

  other | the term with which this term will be compared.

Returns
  `true` if and only if this and the given term do not have both the same generator and exponent.

## operator+=()

bool regina::GroupExpressionTerm::operator+= | ( | const GroupExpressionTerm & | 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.

Parameters

  other | the term to merge with this term.

Returns
  `true` if the two terms were merged into this term, or `false` if the two terms have different generators.

## operator<()

bool regina::GroupExpressionTerm::operator< | ( | const GroupExpressionTerm & | other | ) | const

inline

Imposes an ordering on terms.

Terms are ordered lexigraphically as (generator, exponent) pairs.

Parameters

  other | the term to compare with this.

Returns
  true if and only if this term is lexicographically smaller than other.

## operator=()

GroupExpressionTerm & regina::GroupExpressionTerm::operator= | ( | const GroupExpressionTerm & | cloneMe | ) |

inline

Makes this term identical to the given term.

Parameters

  cloneMe | the term whose data will be copied to this term.

Returns
  a reference to this term.

## operator==()

bool regina::GroupExpressionTerm::operator== | ( | const GroupExpressionTerm & | other | ) | const

inline

Determines whether this and the given term contain identical data.

Parameters

  other | the term with which this term will be compared.

Returns
  `true` if and only if this and the given term have both the same generator and exponent.

## Member Data Documentation

## exponent

long regina::GroupExpressionTerm::exponent

The exponent to which the generator is raised.

## generator

unsigned long regina::GroupExpressionTerm::generator

The number that identifies the generator in this term.

The documentation for this struct was generated from the following file:

- algebra/grouppresentation.h

Copyright © 1999-2016, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@maths.uq.edu.au).