![]() |
Mackey
V3.1
A C++ library for computing RO(G) graded homology
|
#include <Abelian.hpp>
Public Member Functions | |
| AbelianGroup ()=default | |
| Default constructor (trivial group) More... | |
| AbelianGroup (const T &a) | |
| bool | istrivial () const |
| Returns 1 if group is trivial. More... | |
| bool | iscyclic () const |
| Returns 1 if group is cyclic. More... | |
| auto | operator[] (int i) const |
| Returns the i-th summand of the group (unmutable). If the i-th summand is Z then this returns 1 and if it's Z/n it returns n. More... | |
| auto & | operator[] (int i) |
| Returns the i-th summand of the group (mutable reference version). If the i-th summand is Z then this returns 1 and if it's Z/n it returns n. More... | |
| int | number_of_summands () const |
| Returns the number of direct summands of the group. More... | |
| bool | operator== (const AbelianGroup< T > &G) const |
| Compares for isomorphism. More... | |
| bool | operator!= (const AbelianGroup< T > &G) const |
| Compares for non-isomorphism. More... | |
| AbelianGroup< T > | operator+ (const AbelianGroup< T > &G) const |
| The direct sum of groups. No sorting! More... | |
| int | order () const |
| The order of the group. Returns 0 if it's infinite. More... | |
| int | order (const T &element) const |
| The order of an element in the group, provided as an array that expresses it as a linear combination of the generators. Returns 0 if it's infinite. More... | |
| template<typename Scalar > | |
| void | normalize (Eigen::Matrix< Scalar, -1, -1 > &linmap) const |
| Normalize linear map whose range is this group (reduce n in Z/n to 0 etc.). More... | |
| void | normalize (T &element) const |
| Normalizes an element in the group to have minimal amount of signs amongst its multiples. More... | |
| auto | span (const T &a, const std::vector< T > &b) const |
| Expresses a as a linear combination of elements b[i] in the group. If a is not in their span, returns empty matrix. More... | |
| bool | inSpan (const T &a, const std::vector< T > &b) const |
| Finds if an element is in the span of other given elements in the group. More... | |
| int | isMultiple (const T &a, const T &b) const |
| Returns k if a=k*b in group. Returns 0 if a is not a multiple of b (so make sure a!=0) More... | |
| std::pair< std::vector< dense_t< T > >, std::vector< dense_t< T > > > | all_automorphisms () const |
| Returns all automorphisms of the group together with their inverses. Currently only for p-groups and Z+p-groups (otherwise returns empty) More... | |
Friends | |
| template<typename S > | |
| std::ostream & | operator<< (std::ostream &os, const AbelianGroup< S > &A) |
Class for finitely generated abelian groups
|
default |
Default constructor (trivial group)
| AbelianGroup | ( | const T & | a | ) |
Given an array of numbers a[0],a[1],...,a[n] constructs the group G(a[0])+G(a[1])+...+G(a[n]) where G(1)=Z and G(n)=Z/n if n>=1 We assume that in the provided array, a[i] divides a[j] if i<=j
| bool istrivial | ( | ) | const |
Returns 1 if group is trivial.
| bool iscyclic | ( | ) | const |
Returns 1 if group is cyclic.
| auto operator[] | ( | int | i | ) | const |
Returns the i-th summand of the group (unmutable). If the i-th summand is Z then this returns 1 and if it's Z/n it returns n.
| auto& operator[] | ( | int | i | ) |
Returns the i-th summand of the group (mutable reference version). If the i-th summand is Z then this returns 1 and if it's Z/n it returns n.
| int number_of_summands | ( | ) | const |
Returns the number of direct summands of the group.
| bool operator== | ( | const AbelianGroup< T > & | G | ) | const |
Compares for isomorphism.
| bool operator!= | ( | const AbelianGroup< T > & | G | ) | const |
Compares for non-isomorphism.
| AbelianGroup<T> operator+ | ( | const AbelianGroup< T > & | G | ) | const |
The direct sum of groups. No sorting!
| int order | ( | ) | const |
The order of the group. Returns 0 if it's infinite.
| int order | ( | const T & | element | ) | const |
The order of an element in the group, provided as an array that expresses it as a linear combination of the generators. Returns 0 if it's infinite.
| void normalize | ( | Eigen::Matrix< Scalar, -1, -1 > & | linmap | ) | const |
Normalize linear map whose range is this group (reduce n in Z/n to 0 etc.).
| void normalize | ( | T & | element | ) | const |
Normalizes an element in the group to have minimal amount of signs amongst its multiples.
| auto span | ( | const T & | a, |
| const std::vector< T > & | b | ||
| ) | const |
Expresses a as a linear combination of elements b[i] in the group. If a is not in their span, returns empty matrix.
| bool inSpan | ( | const T & | a, |
| const std::vector< T > & | b | ||
| ) | const |
Finds if an element is in the span of other given elements in the group.
| int isMultiple | ( | const T & | a, |
| const T & | b | ||
| ) | const |
Returns k if a=k*b in group. Returns 0 if a is not a multiple of b (so make sure a!=0)
Returns all automorphisms of the group together with their inverses. Currently only for p-groups and Z+p-groups (otherwise returns empty)
|
friend |