53 int order(
const T& element)
const;
56 template<
typename Scalar>
57 void normalize(Eigen::Matrix<Scalar, -1, -1>& linmap)
const;
63 auto span(
const T& a,
const std::vector<T>& b)
const;
73 void mod_normalize(T& element)
const;
77 bool check_isomorphism_p_group(
int p,
const S& a)
const;
80 std::vector<dense_t<T>> aut_p_group(
int p)
const;
83 std::vector<dense_t<T>> inverses(
const std::vector<
dense_t<T>>& isos)
const;
86 static std::vector<int> primes(
int n);
89 int is_p_group()
const;
98 #include "impl/Abelian.ipp"
Contains general functions and vector overloads independent of everything else.
A finitely generated abelian group.
Definition: Abelian.hpp:11
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 ...
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.).
bool operator==(const AbelianGroup< T > &G) const
Compares for isomorphism.
AbelianGroup< T > operator+(const AbelianGroup< T > &G) const
The direct sum of groups. No sorting!
bool iscyclic() const
Returns 1 if group is cyclic.
T group
The group represented as an array of numbers 1,2,3,4... where 1 corresponds to Z and n corresponds to...
Definition: Abelian.hpp:16
friend std::ostream & operator<<(std::ostream &os, const AbelianGroup< S > &A)
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 ...
bool operator!=(const AbelianGroup< T > &G) const
Compares for non-isomorphism.
int order() const
The order of the group. Returns 0 if it's infinite.
bool istrivial() const
Returns 1 if group is trivial.
int number_of_summands() const
Returns the number of direct summands of the group.
AbelianGroup()=default
Default constructor (trivial group)
void normalize(T &element) const
Normalizes an element in the group to have minimal amount of signs amongst its multiples.
auto & operator[](int i)
Returns the i-th summand of the group (mutable reference version). If the i-th summand is Z then this...
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!...
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,...
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 i...
Everything in this library is under this namespace.
Definition: Box.hpp:9
std::ostream & operator<<(std::ostream &, const Chains< rank_t, diff_t > &)
Prints chain complex.
Eigen::Matrix< scalar_t< T >,-1,-1 > dense_t
Dense column major.
Definition: Aliases.hpp:30