Regina Calculation Engine
|
Represents a finitely generated abelian group. More...
#include <algebra/abeliangroup.h>
Public Member Functions | |
AbelianGroup () | |
Creates a new trivial group. More... | |
AbelianGroup (const AbelianGroup &cloneMe) | |
Creates a clone of the given group. More... | |
AbelianGroup (const MatrixInt &M, const MatrixInt &N) | |
Creates an abelian group as the homology of a chain complex. More... | |
AbelianGroup (const MatrixInt &M, const MatrixInt &N, const Integer &p) | |
Creates an abelian group as the homology of a chain complex, using mod-p coefficients. More... | |
void | addRank (int extraRank=1) |
Increments the rank of the group by the given integer. More... | |
void | addTorsionElement (const Integer °ree, unsigned mult=1) |
Adds the given torsion element to the group. More... | |
void | addTorsionElement (unsigned long degree, unsigned mult=1) |
Adds the given torsion element to the group. More... | |
void | addTorsionElements (const std::multiset< Integer > &torsion) |
Adds the given set of torsion elements to this group. More... | |
void | addGroup (const MatrixInt &presentation) |
Adds the abelian group defined by the given presentation to this group. More... | |
void | addGroup (const AbelianGroup &group) |
Adds the given abelian group to this group. More... | |
unsigned | rank () const |
Returns the rank of the group. More... | |
unsigned | torsionRank (const Integer °ree) const |
Returns the rank in the group of the torsion term of given degree. More... | |
unsigned | torsionRank (unsigned long degree) const |
Returns the rank in the group of the torsion term of given degree. More... | |
size_t | countInvariantFactors () const |
Returns the number of invariant factors that describe the torsion elements of this group. More... | |
const Integer & | invariantFactor (size_t index) const |
Returns the given invariant factor describing the torsion elements of this group. More... | |
bool | isTrivial () const |
Determines whether this is the trivial (zero) group. More... | |
bool | isZ () const |
Determines whether this is the infinite cyclic group (Z). More... | |
bool | isZn (unsigned long n) const |
Determines whether this is the non-trivial cyclic group on the given number of elements. More... | |
bool | operator== (const AbelianGroup &other) const |
Determines whether this and the given abelian group are isomorphic. More... | |
bool | operator!= (const AbelianGroup &other) const |
Determines whether this and the given abelian group are non-isomorphic. More... | |
void | writeXMLData (std::ostream &out) const |
Writes a chunk of XML containing this abelian group. More... | |
void | writeTextShort (std::ostream &out, bool utf8=false) const |
Writes a short text representation of this object to the given output stream. More... | |
void | writeTextLong (std::ostream &out) const |
A default implementation for detailed output. 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 Member Functions | |
void | replaceTorsion (const MatrixInt &matrix) |
Replaces the torsion elements of this group with those in the abelian group represented by the given Smith normal form presentation matrix. More... | |
Protected Attributes | |
unsigned | rank_ |
The rank of the group (the number of Z components). More... | |
std::multiset< Integer > | invariantFactors |
The invariant factors d0,...,dn as described in the AbelianGroup notes. More... | |
Represents a finitely generated abelian group.
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.
|
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.
|
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.
__str__()
.
|
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.
|
inlineinherited |
A default implementation for detailed output.
This routine simply calls T::writeTextShort() and appends a final newline.
out | the output stream to which to write. |