#include <ngrouppresentation.h>
Inheritance diagram for regina::NGroupPresentation:
Public Member Functions | |
NGroupPresentation () | |
Creates a new presentation with no generators and no relations. | |
NGroupPresentation (const NGroupPresentation &cloneMe) | |
Creates a clone of the given group presentation. | |
virtual | ~NGroupPresentation () |
Destroys the group presentation. | |
unsigned long | addGenerator (unsigned long numToAdd=1) |
Adds one or more generators to the group presentation. | |
void | addRelation (NGroupExpression *rel) |
Adds the given relation to the group presentation. | |
unsigned long | getNumberOfGenerators () const |
Returns the number of generators in this group presentation. | |
unsigned long | getNumberOfRelations () const |
Returns the number of relations in this group presentation. | |
const NGroupExpression & | getRelation (unsigned long index) const |
Returns the relation at the given index in this group presentation. | |
bool | intelligentSimplify () |
Attempts to simplify the group presentation as intelligently as possible without further input. | |
std::string | recogniseGroup () const |
Attempts to recognise the group corresponding to this presentation. | |
void | writeXMLData (std::ostream &out) const |
Writes a chunk of XML containing this group presentation. | |
void | writeToFile (NFile &out) const |
Writes this group presentation to the given old-style binary file. | |
virtual void | writeTextShort (std::ostream &out) const |
Writes this object in short text format to the given output stream. | |
virtual void | writeTextLong (std::ostream &out) const |
Writes this object in long text format to the given output stream. | |
Static Public Member Functions | |
static NGroupPresentation * | readFromFile (NFile &in) |
Reads a group presentation from the given old-style binary file. | |
Protected Attributes | |
unsigned long | nGenerators |
The number of generators. | |
std::vector< NGroupExpression * > | relations |
The relations between the generators. |
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.
|
Creates a new presentation with no generators and no relations.
|
|
Creates a clone of the given group presentation.
|
|
Destroys the group presentation. All relations that are stored will be deallocated. |
|
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.
|
|
Adds the given relation to the group presentation.
The relation must be of the form This presentation will take ownership of the given expression, may change it and will be responsible for its deallocation.
|
|
Returns the number of generators in this group presentation.
|
|
Returns the number of relations in this group presentation.
|
|
Returns the relation at the given index in this group presentation.
The relation will be of the form
|
|
Attempts to simplify the group presentation as intelligently as possible without further input. As with the NTriangulation routine of the same name, this routine is not as intelligent as it makes out to be. In fact, currently it does almost nothing.
|
|
Reads a group presentation from the given old-style binary file. The presentation will be newly allocated, and responsibility for its destruction lies with the caller of this routine.
|
|
Attempts to recognise the group corresponding to this presentation. This routine is much more likely to be successful if you have already called intelligentSimplify(). Note that the presentation might be simplified a little during the execution of this routine, although not nearly as much as would be done by intelligentSimplify().
|
|
Writes this object in long text format to the given output stream. The output should provided the user with all the information they could want. The output should end with a newline. The default implementation of this routine merely calls writeTextShort() and adds a newline.
Reimplemented from regina::ShareableObject. |
|
Writes this object in short text format to the given output stream. The output should fit on a single line and no newline should be written.
Implements regina::ShareableObject. |
|
Writes this group presentation to the given old-style binary file.
|
|
Writes a chunk of XML containing this group presentation.
|
|
The number of generators.
|
|
The relations between the generators.
|