regina::GroupPresentation Class Reference
Algebraic Structures

Represents a finite presentation of a group. More...

`#include <algebra/grouppresentation.h>`

Inheritance diagram for regina::GroupPresentation:

## Public Member Functions

| GroupPresentation ()
| Creates a new presentation with no generators and no relations. More...
| GroupPresentation (const GroupPresentation &cloneMe)
| Creates a clone of the given group presentation. More...
| GroupPresentation (unsigned long nGens, const std::vector< std::string > &rels)
| Constructor that allows you to directly pass an arbitrary number of relators in string format. More...
| ~GroupPresentation ()
| Destroys the group presentation. More...
GroupPresentation & | operator= (const GroupPresentation &cloneMe)
| Assignment operator. More...
unsigned long | addGenerator (unsigned long numToAdd=1)
| Adds one or more generators to the group presentation. More...
void | addRelation (GroupExpression *rel)
| Adds the given relation to the group presentation. More...
unsigned long | countGenerators () const
| Returns the number of generators in this group presentation. More...
size_t | countRelations () const
| Returns the number of relations in this group presentation. More...
const GroupExpression & | relation (size_t index) const
| Returns the relation at the given index in this group presentation. More...
bool | isValid () const
| Tests whether all of the relations for the group are indeed words in the generators. More...
bool | intelligentSimplify ()
| Attempts to simplify the group presentation as intelligently as possible without further input. More...
std::unique_ptr< HomGroupPresentation > | intelligentSimplifyDetail ()
| Attempts to simplify the group presentation as intelligently as possible without further input. More...
bool | smallCancellation ()
| Attempts to simplify the group presentation using only small cancellation theory. More...
std::unique_ptr< HomGroupPresentation > | smallCancellationDetail ()
| Attempts to simplify the group presentation using small cancellation theory. More...
bool | simplifyWord (GroupExpression &input) const
| Uses small cancellation theory to reduce the input word, using the current presentation of the group. More...
void | proliferateRelators (unsigned long depth=1)
| A routine to help escape local wells when simplifying presentations, which may be useful when small cancellation theory can't find the simplest relators. More...
std::string | recogniseGroup (bool moreUtf8=false) const
| Attempts to recognise the group corresponding to this presentation. More...
void | writeXMLData (std::ostream &out) const
| Writes a chunk of XML containing this group presentation. More...
size_t | relatorLength () const
| The sum of the word lengths of the relators. More...
std::unique_ptr< AbelianGroup > | abelianisation () const
| Computes the abelianisation of this group. More...
std::unique_ptr< MarkedAbelianGroup > | markedAbelianisation () const
| Computes the abelianisation of this group. More...
bool | identifyAbelian () const
| Attempts to determine if the group is abelian. More...
bool | nielsenTransposition (unsigned long i, unsigned long j)
| Switches the generators in the presentation indexed by i and j respectively, and recomputes the appropriate presentation. More...
bool | nielsenInvert (unsigned long i)
| Replaces a generator in a presentation by its inverse, and recomputes the appropriate presentation. More...
bool | nielsenCombine (unsigned long i, unsigned long j, long k, bool rightMult=true)
| Replaces a generator `gi` by either `(gi)(gj)^k` or `(gj)^k(gi)` in the presentation. More...
bool | intelligentNielsen ()
| Looks for Nielsen moves that will simplify the presentation. More...
std::unique_ptr< HomGroupPresentation > | intelligentNielsenDetail ()
| Looks for Nielsen moves that will simplify the presentation. More...
bool | homologicalAlignment ()
| Rewrites the presentation so that generators of the group map to generators of the abelianisation, with any left-over generators mapping to zero (if possible). More...
std::unique_ptr< HomGroupPresentation > | homologicalAlignmentDetail ()
| Rewrites the presentation so that generators of the group map to generators of the abelianisation, with any left-over generators mapping to zero (if possible). More...
bool | prettyRewriting ()
| An entirely cosmetic re-writing of the presentation, which is fast and superficial. More...
std::unique_ptr< HomGroupPresentation > | prettyRewritingDetail ()
| An entirely cosmetic re-writing of the presentation, which is fast and superficial. More...
bool | identifySimplyIsomorphicTo (const GroupPresentation &other) const
| Attempts to prove that this and the given group presentation are simply isomorphic. More...
std::string | toTeX () const
| Returns a TeX representation of this group presentation. More...
void | writeTeX (std::ostream &out) const
| Writes a TeX represesentation of this group presentation to the given output stream. More...
std::string | compact () const
| Returns a compact one-line representation of this group presentation, including details of all generators and relations. More...
void | writeTextCompact (std::ostream &out) const
| Writes a compact represesentation of this group to the given output stream. More...
void | writeTextShort (std::ostream &out) const
| Writes a short text representation of this object to the given output stream. More...
void | writeTextLong (std::ostream &out) const
| Writes a detailed text representation of this object to the given output stream. More...
std::string | str () const
| Returns a short text representation of this object. More...
std::string | utf8 () const
| Returns a short text representation of this object using unicode characters. More...
std::string | detail () const
| Returns a detailed text representation of this object. More...

## Protected Attributes

unsigned long | nGenerators
| The number of generators. More...
std::vector< GroupExpression * > | relations
| The relations between the generators. More...

## Detailed Description

Represents a finite presentation of a group.

A presentation consists of a number of generators and a set of relations between these generators that together define the group.

If there are g generators, they will be numbered 0, 1, ..., g-1.

Todo:
  Let's make intelligent simplify a tad more intelligent, and the GUI call a bit more safe. Perhaps parallelize the GUI call, and give users parameters to ensure it won't crash the computer. Also look at the FPGroup package. We should also have a simple way of creating GroupPresentation objects directly from text strings. We would like to have something like GroupPresentation( numGens, "abAAB", "bccd" ) etc., with arbitrary numbers of relators. Maybe std::tuple. Or "variadic templates"?

## Constructor & Destructor Documentation

## GroupPresentation() [1/3]

regina::GroupPresentation::GroupPresentation | ( |  | ) |

inline

Creates a new presentation with no generators and no relations.

## GroupPresentation() [2/3]

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

Creates a clone of the given group presentation.

Parameters

  cloneMe | the presentation to clone.

## GroupPresentation() [3/3]

regina::GroupPresentation::GroupPresentation | ( | unsigned long | nGens,
|  | const std::vector< std::string > & | rels
| ) |  |

Constructor that allows you to directly pass an arbitrary number of relators in string format.

The first argument nGens is the number of generators one wants the group to have. The second argument rels is a vector of strings, where each string gives a single relator. See the GroupExpression::GroupExpression(const std::string&, bool*) constructor notes for information on what format these strings can take.

If any of the given strings could not be interpreted as words, this routine will insert the trivial (unit) word in its place.

If you are compiling Regina against C++11, you can use the C++11 initializer_list construction to construct an GroupPresentation directly using syntax of the form `GroupPresentation(nGens, { "rel1", "rel2", ... })`.

Python:
  Not present.

Parameters

  nGens | the number of generators.
  rels | a vector of relations each given in string form, as outlined above.

## ~GroupPresentation()

regina::GroupPresentation::~GroupPresentation | ( |  | ) |

inline

Destroys the group presentation.

All relations that are stored will be deallocated.

## Member Function Documentation

## abelianisation()

std::unique_ptr<AbelianGroup> regina::GroupPresentation::abelianisation | ( |  | ) | const

Computes the abelianisation of this group.

Returns
  a newly allocated abelianisation of this group.

## addGenerator()

unsigned long regina::GroupPresentation::addGenerator | ( | unsigned long | numToAdd = `1` | ) |

inline

Adds one or more generators to the group presentation.

If the new presentation has g generators, the new generators will be numbered g-1, g-2 and so on.

Parameters

  numToAdd | the number of generators to add.

Returns
  the number of generators in the new presentation.

## addRelation()

void regina::GroupPresentation::addRelation | ( | GroupExpression * | rel | ) |

inline

Adds the given relation to the group presentation.

The relation must be of the form `expression = 1`.

This presentation will take ownership of the given expression, may change it and will be responsible for its deallocation.

Warning
  This routine does not check whether or not your relation is a word only in the generators of this group. In other words, it does not stop you from using generators beyond the countGenerators() bound.

Python:
  In Python, this routine clones its argument instead of claiming ownership of it.

Parameters

  rel | the expression that the relation sets to 1; for instance, if the relation is `g1^2 g2 = 1` then this parameter should be the expression `g1^2 g2`.

## compact()

std::string regina::GroupPresentation::compact | ( |  | ) | const

Returns a compact one-line representation of this group presentation, including details of all generators and relations.

See writeTextCompact() for details on how this is formed.

Returns
  a compact representation of this group presentation.

## countGenerators()

unsigned long regina::GroupPresentation::countGenerators | ( |  | ) | const

inline

Returns the number of generators in this group presentation.

Returns
  the number of generators.

## countRelations()

size_t regina::GroupPresentation::countRelations | ( |  | ) | const

inline

Returns the number of relations in this group presentation.

Returns
  the number of relations.

## detail()

std::string regina::Output< GroupPresentation , false >::detail | ( |  | ) | const

inherited

Returns a detailed text representation of this object.

This text may span many lines, and should provide the user with all the information they could want. It should be human-readable, should not contain extremely long lines (which cause problems for users reading the output in a terminal), and should end with a final newline. There are no restrictions on the underlying character set.

Returns
  a detailed text representation of this object.

## homologicalAlignment()

bool regina::GroupPresentation::homologicalAlignment | ( |  | ) |

Rewrites the presentation so that generators of the group map to generators of the abelianisation, with any left-over generators mapping to zero (if possible).

Consider this a homological-alignment of the presentation.

See homologicalAlignmentDetail() for further details on what this routine does.

Returns
  `true` if presentation was changed, or `false` if the presentation was already homologically aligned. See homologicalAlignmentDetail() if you wish to get the isomorphism.

## homologicalAlignmentDetail()

std::unique_ptr<HomGroupPresentation> regina::GroupPresentation::homologicalAlignmentDetail | ( |  | ) |

Rewrites the presentation so that generators of the group map to generators of the abelianisation, with any left-over generators mapping to zero (if possible).

Consider this a homological-alignment of the presentation.

If the abelianisation of this group has rank N and M invariant factors `d0 | d2 | ... | d(M-1)`, this routine applies Nielsen moves to the presentation to ensure that under the markedAbelianisation() routine, generators 0 through M-1 are mapped to generators of the relevant `Z_di` group. Similarly, generators M through M+N-1 are mapped to +/-1 in the appropriate factor. All further generators will be mapped to zero.

If this routine does return a homomorphism (because the presentation was changed), then this homomorphsm will in fact be a declared isomorphism. See the HomGroupPresentation class notes for details on what this means.

Returns
  a newly allocated homomorphism giving the reduction map from the old presentation to the new, or a null pointer if this presentation was not changed.

## identifyAbelian()

bool regina::GroupPresentation::identifyAbelian | ( |  | ) | const

Attempts to determine if the group is abelian.

A return value of `true` indicates that this routine successfully certified that the group is abelian. A return value of `false` indicates an inconclusive result: either the group is non-abelian, or the group is abelian but this routine could not prove so.

If the group is abelian, then markedAbelianization() is the easiest way to see precisely which abelian group it is, and how the generators sit in that group.

You will have better results from this algorithm if the presentation has been simplified, since this algorithm uses small cancellation theory in an attempt to reduce the commutators of all pairs of generators.

Warning
  If you have not adequately simplified this presentation this routine will most likely return `false`. Consider running intelligentSimplify, possibly in concert with proliferateRelators(), in order to discover adequately many commutators.

Returns
  `true` if the group is shown to be abelian, or `false` if the result is inconclusive.

## identifySimplyIsomorphicTo()

bool regina::GroupPresentation::identifySimplyIsomorphicTo | ( | const GroupPresentation & | other | ) | const

Attempts to prove that this and the given group presentation are simply isomorphic.

A simple isomorphism is an isomorphism where each generator gi of this presentation is sent to some generator gj+/-1 of the other presentation. Moreover, at present this routine only looks for maps where both presentations have the same number of generators, and where distinct generators gi of this presentation correspond to distinct generators gj of the other presentation (possibly with inversion, as noted above).

If this routine returns `true`, it means that the two presentations are indeed simply isomorphic.

If this routine returns `false`, it could mean one of many things:

- The groups are not isomorphic;
- The groups are isomorphic, but not simply isomorphic;
- The groups are simply isomorphic but this routine could not prove it, due to difficulties with the word problem.

Parameters

  other | the group presentation to compare with this.

Returns
  `true` if this routine could certify that the two group presentations are simply isomorphic, or `false` if it could not.

## intelligentNielsen()

bool regina::GroupPresentation::intelligentNielsen | ( |  | ) |

Looks for Nielsen moves that will simplify the presentation.

Performs one of the most-effective moves, if it can find any.

Returns
  `true` if and only if it performed a Nielsen move. You can call intelligentNielsen() to get the isomorphism.

## intelligentNielsenDetail()

std::unique_ptr<HomGroupPresentation> regina::GroupPresentation::intelligentNielsenDetail | ( |  | ) |

Looks for Nielsen moves that will simplify the presentation.

Performs one of the most-effective moves, if it can find any.

If this routine does return a homomorphism (because some move was performed), then this homomorphsm will in fact be a declared isomorphism. See the HomGroupPresentation class notes for details on what this means.

Returns
  a newly allocated homomorphism describing the map from the original presentation to the new presentation, or a null pointer if no move was performed.

## intelligentSimplify()

bool regina::GroupPresentation::intelligentSimplify | ( |  | ) |

Attempts to simplify the group presentation as intelligently as possible without further input.

See intelligentSimplifyDetail() for further details on how the simplification is done.

Returns
  `true` if and only if the group presentation was changed. You can call intelligentSimplifyDetail() to get the isomorphism.

## intelligentSimplifyDetail()

std::unique_ptr<HomGroupPresentation> regina::GroupPresentation::intelligentSimplifyDetail | ( |  | ) |

Attempts to simplify the group presentation as intelligently as possible without further input.

The current simplification method uses a combination of small cancellation theory and Nielsen moves.

If this routine does return a homomorphism (because the presentation was changed), then this homomorphsm will in fact be a declared isomorphism. See the HomGroupPresentation class notes for details on what this means.

Returns
  a newly allocated homomorphism describing the reduction map from the original presentation to the new presentation, or a null pointer if this presentation was not changed.

## isValid()

bool regina::GroupPresentation::isValid | ( |  | ) | const

Tests whether all of the relations for the group are indeed words in the generators.

This routine returns `false` if at least one relator uses an out-of-bound generator, and `true` otherwise.

This routine is intended only for sanity checking: you should never have an invalid group presentation in the first place.

Returns
  `true` if and only if all of the relations are words in the generators.

## markedAbelianisation()

std::unique_ptr<MarkedAbelianGroup> regina::GroupPresentation::markedAbelianisation | ( |  | ) | const

Computes the abelianisation of this group.

The coordinates in the chain complex correspond to the generators and relators for this group.

Returns
  a newly allocated abelianisation of this group.

## nielsenCombine()

bool regina::GroupPresentation::nielsenCombine | ( | unsigned long | i,
|  | unsigned long | j,
|  | long | k,
|  | bool | rightMult = `true`
| ) |  |

Replaces a generator `gi` by either `(gi)(gj)^k` or `(gj)^k(gi)` in the presentation.

It it is the third type of Nielsen move one can apply to a presentation.

This means that, if the new generator `Gi` is the old `(gi)(gj)^k` or `(gj)^k(gi)`, then we can construct the new presentation from the old by replacing occurrences of `Gi` by `(Gi)(gj)^(-k)` or `(gj)^(-k)(Gi)` respectively.

Precondition
  Both i and j are strictly less than countGenerators().

Parameters

  i | indicates the generator to replace.
  j | indicates the generator to combine with `gi`.
  k | indicates the power to which we raise `gj` when performing the replacement; this may be positive or negative (or zero, but this will have no effect).
  rightMult | `true` if we should replace `gi` by `(gi)(gj)^k`, or `false` if we should replace `gi` by `(gj)^k(gi)`.

Returns
  `true` if and only if the nielsen automorphism had an effect on at least one relation.

## nielsenInvert()

bool regina::GroupPresentation::nielsenInvert | ( | unsigned long | i | ) |

Replaces a generator in a presentation by its inverse, and recomputes the appropriate presentation.

This is the second generator type of the automorphism group of a free group.

Precondition
  i is strictly less than countGenerators().

Parameters

  i | indicates the generator to invert.

Returns
  `true` if and only if the Nielsen automorphism had an effect on at least one relation.

## nielsenTransposition()

bool regina::GroupPresentation::nielsenTransposition | ( | unsigned long | i,
|  | unsigned long | j
| ) |  |

Switches the generators in the presentation indexed by i and j respectively, and recomputes the appropriate presentation.

It is one of the standard Nielsen moves, which is the first of three generator types of the automorphism group of a free group.

Precondition
  Both i and j are strictly less than countGenerators().

Parameters

  i | indicates the first of the two generators to switch.
  j | indicates the second of the two generators to switch.

Returns
  `true` if and only if the Nielsen automorphism had an effect on at least one relation.

## operator=()

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

Assignment operator.

Parameters

  cloneMe | the group presentation that this will become a copy of.

Returns
  a reference to this group presentation.

## prettyRewriting()

bool regina::GroupPresentation::prettyRewriting | ( |  | ) |

An entirely cosmetic re-writing of the presentation, which is fast and superficial.

See prettyRewritingDetail() for further details on what this routine does.

Returns
  `true` if and only if the choice of generators for the group has changed. You can call prettyRewritingDetail() to get the the isomorphism.

## prettyRewritingDetail()

std::unique_ptr<HomGroupPresentation> regina::GroupPresentation::prettyRewritingDetail | ( |  | ) |

An entirely cosmetic re-writing of the presentation, which is fast and superficial.

1. If there are any length 1 relators, those generators are deleted, and the remaining relators simplified.
2. It sorts the relators by number of generator indices that appear, followed by relator numbers (lexico) followed by relator length.
3. inverts relators if net sign of the generators is negative.
4. Given each generator, it looks for the smallest word where that generator appears with non-zero weight. If negative weight, it inverts that generator.
5. It cyclically permutes relators to start with smallest gen.

If this routine does return a homomorphism (because the choice of generators was changed), then this homomorphsm will in fact be a declared isomorphism. See the HomGroupPresentation class notes for details on what this means.

Todo:
  As a final step, make elementary simplifications to aid in seeing standard relators like commutators.

Returns
  a newly allocated homomorphism describing the map from the original presentation to the new presentation, or a null pointer if the choice of generators did not change.

## proliferateRelators()

void regina::GroupPresentation::proliferateRelators | ( | unsigned long | depth = `1` | ) |

A routine to help escape local wells when simplifying presentations, which may be useful when small cancellation theory can't find the simplest relators.

Given a presentation <g_i | r_i>, this routine appends consequences of the relators {r_i} to the presentation that are of the form ab, where both a and b are cyclic permutations of relators from the collection {r_i}.

Passing depth=1 means it will only form products of two relators. Depth=2 means products of three, etc. Depth=4 is typically the last depth before the exponential growth of the operation grows out of hand. It also conveniently trivializes all the complicated trivial group presentations that we've come across so far.

Warning
  Do not call this routine with depth n before having called it at depth n-1 first. Depth=0 is invalid, and depth=1 should be your first call to this routine. This routine gobbles up an exponential amount of memory (exponential in your presentation size times n). So do be careful when using it.

Parameters

  depth | controls the depth of the proliferation, as described above; this must be strictly positive.

## recogniseGroup()

std::string regina::GroupPresentation::recogniseGroup | ( | bool | moreUtf8 = `false` | ) | const

Attempts to recognise the group corresponding to this presentation.

This routine is much more likely to be successful if you have already called intelligentSimplify().

Currently, the groups this routine recognises include: the trivial group, abelian groups, free groups, extensions over the integers, and free products of any group the algorithm can recognise (inductively).

The string returned from this routine may use some unicode characters, which will be encoding using UTF-8. If moreUtf8 is passed as `false` then unicode will be used sparingly; if moreUtf8 is `true` then unicode will be use more liberally, resulting in strings that look nicer but require more complex fonts to be available on the user's machine.

Examples of the format of the returned string are:

- `0` for the trivial group;
- `Z_n` for cyclic groups with n > 1;
- `Free(n)` for free groups with n > 1 generators - see AbelianGroup::str() for how abelian groups are presented;
- `FreeProduct(G1, G2, ... , Gk)` for free products, where one replaces G1 through Gk by text strings representing the free summands;
- `Z~G w/ monodromy H` for extensions over Z, where G is a description of the kernel of the homomorphism to the integers, and H is a text string representing the monodromy - see HomMarkedAbelianGroup.str() for details on how these are presented.

Todo:
  Feature (long-term): Make this recognition more effective.

Returns
  a simple string representation of the group if it is recognised, or an empty string if the group is not recognised.

## relation()

const GroupExpression & regina::GroupPresentation::relation | ( | size_t | index | ) | const

inline

Returns the relation at the given index in this group presentation.

The relation will be of the form `expresson = 1`.

Parameters

  index | the index of the desired relation; this must be between 0 and countRelations()-1 inclusive.

Returns
  the expression that the requested relation sets to 1; for instance, if the relation is `g1^2 g2 = 1` then this will be the expression `g1^2 g2`.

## relatorLength()

size_t regina::GroupPresentation::relatorLength | ( |  | ) | const

inline

The sum of the word lengths of the relators.

Word lengths are computing using GroupExpression::wordLength(). Used as a coarse measure of the complexity of the presentation.

Returns
  the sum of word lengths.

## simplifyWord()

bool regina::GroupPresentation::simplifyWord | ( | GroupExpression & | input | ) | const

Uses small cancellation theory to reduce the input word, using the current presentation of the group.

The input word will be modified directly.

Warning
  This routine is only as good as the relator table for the group. You might want to consider running intelligentSimplify(), possibly in concert with proliferateRelators(), before using this routine for any significant tasks.

Parameters

  input | is the word you would like to simplify. This must be a word in the generators of this group.

Returns
  `true` if and only if the input word was modified.

## smallCancellation()

bool regina::GroupPresentation::smallCancellation | ( |  | ) |

Attempts to simplify the group presentation using only small cancellation theory.

See smallCancellationDetail() for further details on how the simplification is done.

Returns
  `true` if and only if the group presentation was changed. You can call smallCancellationDetail() to get the isomorphism.

## smallCancellationDetail()

std::unique_ptr<HomGroupPresentation> regina::GroupPresentation::smallCancellationDetail | ( |  | ) |

Attempts to simplify the group presentation using small cancellation theory.

The simplification method is based on the Dehn algorithm for hyperbolic groups, i.e. small cancellation theory. This means we look to see if part of one relator can be used to simplify others. If so, make the substitution and simplify. We continue until no more presentation-shortening substitutions are available. We follow that by killing any available generators using words where generators appear a single time.

If this routine does return a homomorphism (because the presentation was changed), then this homomorphsm will in fact be a declared isomorphism. See the HomGroupPresentation class notes for details on what this means.

Todo:
  Optimise (long-term): This routine could use some small tweaks - recognition of utility of some score==0 moves, such as commutators, for example.

Returns
  a newly allocated homomorphism describing the reduction map from the original presentation to the new presentation, or a null pointer if this presentation was not changed.

## str()

std::string regina::Output< GroupPresentation , false >::str | ( |  | ) | const

inherited

Returns a short text representation of this object.

This text should be human-readable, should fit on a single line, and should not end with a newline. Where possible, it should use plain ASCII characters.

Python:
  In addition to str(), this is also used as the Python "stringification" function `__str__()`.

Returns
  a short text representation of this object.

## toTeX()

std::string regina::GroupPresentation::toTeX | ( |  | ) | const

Returns a TeX representation of this group presentation.

See writeTeX() for details on how this is formed.

Returns
  a TeX representation of this group presentation.

## utf8()

std::string regina::Output< GroupPresentation , false >::utf8 | ( |  | ) | const

inherited

Returns a short text representation of this object using unicode characters.

Like str(), this text should be human-readable, should fit on a single line, and should not end with a newline. In addition, it may use unicode characters to make the output more pleasant to read. This string will be encoded in UTF-8.

Returns
  a short text representation of this object.

## writeTeX()

void regina::GroupPresentation::writeTeX | ( | std::ostream & | out | ) | const

Writes a TeX represesentation of this group presentation to the given output stream.

The output will be of the form < generators | relators >. There will be no final newline.

Python:
  The parameter out does not exist; standard output will be used.

Parameters

  out | the output stream to which to write.

## writeTextCompact()

void regina::GroupPresentation::writeTextCompact | ( | std::ostream & | out | ) | const

Writes a compact represesentation of this group to the given output stream.

The output will be of the form < generators | relators >. The full relations will be included, and the entire output will be written on a single line. There will be no final newline.

Python:
  The parameter out does not exist; standard output will be used.

Parameters

  out | the output stream to which to write.

## writeTextLong()

void regina::GroupPresentation::writeTextLong | ( | std::ostream & | out | ) | const

Writes a detailed text representation of this object to the given output stream.

Python:
  Not present.

Parameters

  out | the output stream to which to write.

## writeTextShort()

void regina::GroupPresentation::writeTextShort | ( | std::ostream & | out | ) | const

inline

Writes a short text representation of this object to the given output stream.

Python:
  Not present.

Parameters

  out | the output stream to which to write.

## writeXMLData()

void regina::GroupPresentation::writeXMLData | ( | std::ostream & | out | ) | const

Writes a chunk of XML containing this group presentation.

Python:
  Not present.

Parameters

  out | the output stream to which the XML should be written.

## Member Data Documentation

## nGenerators

unsigned long regina::GroupPresentation::nGenerators

protected

The number of generators.

## relations

std::vector<GroupExpression*> regina::GroupPresentation::relations

protected

The relations between the generators.

The documentation for this class 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).