#include <nabeliangroup.h>
Inheritance diagram for regina::NAbelianGroup:
Public Member Functions | |
NAbelianGroup () | |
Creates a new trivial group. | |
NAbelianGroup (const NAbelianGroup &cloneMe) | |
Creates a clone of the given group. | |
virtual | ~NAbelianGroup () |
Destroys the group. | |
void | addRank (unsigned extraRank=1) |
Increments the rank of the group by the given non-negative integer. | |
void | addTorsionElement (const NLargeInteger °ree, unsigned mult=1) |
Adds the given torsion element to the group. | |
void | addTorsionElement (unsigned long degree, unsigned mult=1) |
Adds the given torsion element to the group. | |
void | addTorsionElements (const std::multiset< NLargeInteger > &torsion) |
Adds the given set of torsion elements to this group. | |
void | addGroup (const NMatrixInt &presentation) |
Adds the abelian group defined by the given presentation to this group. | |
void | addGroup (const NAbelianGroup &group) |
Adds the given abelian group to this group. | |
unsigned | getRank () const |
Returns the rank of the group. | |
unsigned | getTorsionRank (const NLargeInteger °ree) const |
Returns the rank in the group of the torsion term of given degree. | |
unsigned | getTorsionRank (unsigned long degree) const |
Returns the rank in the group of the torsion term of given degree. | |
unsigned long | getNumberOfInvariantFactors () const |
Returns the number of invariant factors that describe the torsion elements of this group. | |
const NLargeInteger & | getInvariantFactor (unsigned long index) const |
Returns the given invariant factor describing the torsion elements of this group. | |
bool | isTrivial () const |
Determines whether this is the trivial (zero) group. | |
bool | operator== (const NAbelianGroup &other) const |
Determines whether this and the given abelian group are isomorphic. | |
void | writeXMLData (std::ostream &out) const |
Writes a chunk of XML containing this abelian group. | |
void | writeToFile (NFile &out) const |
Writes this abelian group to the given old-style binary file. | |
virtual void | writeTextShort (std::ostream &out) const |
The text representation will be of the form 3 Z + 4 Z_2 + Z_120 . | |
Static Public Member Functions | |
static NAbelianGroup * | readFromFile (NFile &in) |
Reads an abelian group from the given old-style binary file. | |
Protected Member Functions | |
void | replaceTorsion (const NMatrixInt &matrix) |
Replaces the torsion elements of this group with those in the abelian group represented by the given Smith normal form presentation matrix. | |
Protected Attributes | |
unsigned | rank |
The rank of the group (the number of Z components). | |
std::multiset< NLargeInteger > | invariantFactors |
The invariant factors d0,. |
The torsion elements of the group are stored in terms of their invariant factors. For instance, Z_2+Z_3 will appear as Z_6, and Z_2+Z_2+Z_3 will appear as Z_2+Z_6.
In general the factors will appear as Z_d0+...+Z_dn, where the invariant factors di are all greater than 1 and satisfy d0|d1|...|dn. Note that this representation is unique.
|
Creates a new trivial group.
|
|
Creates a clone of the given group.
|
|
Destroys the group.
|
|
Adds the given abelian group to this group. Note that this routine might be slow since calculating the new invariant factors is not trivial.
|
|
Adds the abelian group defined by the given presentation to this group. Note that this routine might be slow since calculating the new invariant factors is not trivial.
|
|
Increments the rank of the group by the given non-negative integer.
|
|
Adds the given torsion element to the group. Note that this routine might be slow since calculating the new invariant factors is not trivial. If many different torsion elements are to be added, consider using addTorsionElements() instead so the invariant factors need only be calculated once. In this routine we add a specified number of copies of Z_d, where d is some given degree.
|
|
Adds the given torsion element to the group. Note that this routine might be slow since calculating the new invariant factors is not trivial. If many different torsion elements are to be added, consider using addTorsionElements() instead so the invariant factors need only be calculated once. In this routine we add a specified number of copies of Z_d, where d is some given degree.
|
|
Adds the given set of torsion elements to this group. Note that this routine might be slow since calculating the new invariant factors is not trivial. The torsion elements to add are described by a list of integers k1,...,km, where we are adding Z_k1,...,Z_km. Unlike invariant factors, the ki are not required to divide each other.
|
|
Returns the given invariant factor describing the torsion elements of this group. See the NAbelianGroup class notes for further details. If the invariant factors are d0|d1|...|dn, this routine will return di where i is the value of parameter index.
|
|
Returns the number of invariant factors that describe the torsion elements of this group. See the NAbelianGroup class notes for further details.
|
|
Returns the rank of the group. This is the number of included copies of Z.
|
|
Returns the rank in the group of the torsion term of given degree. If the given degree is d, this routine will return the largest m for which mZ_d is a subgroup of this group. For instance, if this group is Z_6+Z_12, the torsion term of degree 2 has rank 2 (one occurrence in Z_6 and one in Z_12), and the torsion term of degree 4 has rank 1 (one occurrence in Z_12).
|
|
Returns the rank in the group of the torsion term of given degree. If the given degree is d, this routine will return the largest m for which mZ_d is a subgroup of this group. For instance, if this group is Z_6+Z_12, the torsion term of degree 2 has rank 2 (one occurrence in Z_6 and one in Z_12), and the torsion term of degree 4 has rank 1 (one occurrence in Z_12).
|
|
Determines whether this is the trivial (zero) group.
|
|
Determines whether this and the given abelian group are isomorphic.
|
|
Reads an abelian group from the given old-style binary file. The group will be newly allocated, and responsibility for its destruction lies with the caller of this routine.
|
|
Replaces the torsion elements of this group with those in the abelian group represented by the given Smith normal form presentation matrix. Any zero columns in the matrix will also be added to the rank as additional copies of Z. Note that preexisting torsion elements will be deleted, but preexisting rank will not.
|
|
The text representation will be of the form The torsion elements will be written in terms of the invariant factors of the group, as described in the NAbelianGroup notes. Implements regina::ShareableObject. |
|
Writes this abelian group to the given old-style binary file.
|
|
Writes a chunk of XML containing this abelian group.
|
|
The invariant factors d0,. ..,dn as described in the NAbelianGroup notes. |
|
The rank of the group (the number of Z components).
|