atlas
0.6

#include <abelian.h>
Public Member Functions  
FiniteAbelianGroup ()  
FiniteAbelianGroup (const GroupType &)  
bool  operator== (const FiniteAbelianGroup &A) const 
bool  operator!= (const FiniteAbelianGroup &A) const 
unsigned int  rank () const 
const GroupType &  type () const 
unsigned long long  order () const 
GrpArr  toArray (GrpNbr x) const 
GrpArr  toArray (const matrix::Vector< int > &v) const 
GrpNbr  toGrpNbr (const GrpArr &a) const 
void  toWeight (matrix::Vector< int > &, const GrpArr &) const 
void  toWeight (matrix::Vector< int > &, GrpNbr) const 
GrpNbr  add (GrpNbr, GrpNbr) const 
GrpNbr  add (GrpNbr, const GrpArr &) const 
GrpArr &  add (GrpArr &, const GrpArr &) const 
GrpArr &  add (GrpArr &, GrpNbr) const 
unsigned long  annihilator () const 
const GroupType &  cotype () const 
GrpNbr  leftApply (GrpNbr, const Endomorphism &) const 
GrpArr &  leftApply (GrpArr &, const Endomorphism &) const 
GrpNbr  minus (GrpNbr) const 
unsigned long  order (GrpNbr) const 
unsigned long  order (const bitmap::BitMap &, GrpNbr) const 
Computes the order of x modulo B, where B is a subgroup represented by flagging the GrpNbr values of its elements in a bitmap. More...  
unsigned long  pairing (const GrpArr &, const GrpArr &) const 
Computes the m in [0,n[ s.t. a(b) = e^{m.2i/n}, where a is interpreted as an element of the dual group ($(G,^)$), which in our representation can be identified with the group itself, b as an element of the group, and n is the annihilator of the group (the last entry in d_type). This is a sort of scalar product, weighted by cotype, modulo n. More...  
unsigned long  pairing (const GrpArr &, const GrpArr &, unsigned long) const 
GrpNbr  prod (GrpNbr, unsigned long) const 
GrpNbr  subtract (GrpNbr, const GrpNbr) const 
GrpArr &  subtract (GrpArr &, const GrpArr &) const 
Private Attributes  
unsigned long long  d_size 
GroupType  d_type 
GroupType  d_cotype 
A class representing a finite Abelian group as a product of finite cyclic groups of orders d_type[0], d_type[1], d_type[2]... It is assumed that d_type[0] divides d_type[1], which divides d_type[2], and so on; these orders are therefore invariants that characterise the group. The vector d_cotype has in its jth coordinate the quotient d_type[last]/d_type[j]. This means that the jth factor of the group may be written as the quotient of the cyclic group of order d_type[last] by the subgroup of order d_cotype[j]. The integer d_size is the order of the group.

inline 

explicit 
Synopsis: x + y.
Of course adding as integers does not do the right thing; decompose
Synopsis: x + b. Note that x is by value, so here add cannot mean +=
Synopsis: a += b.
Precondition: a and b hold valid arrays for the group;
The only difficulty is doing it without triggering overflow.
unsigned long atlas::abelian::FiniteAbelianGroup::annihilator  (  )  const 
Synopsis: returns the l.c.m. of the orders of the elements of the group.

inline 
GrpNbr atlas::abelian::FiniteAbelianGroup::leftApply  (  GrpNbr  x, 
const Endomorphism &  q  
)  const 
Synopsis: applies the matrix q to the element x, on the left.
The idea is that the matrix defines an endomorphism of the group in terms of the array representation.
GrpArr & atlas::abelian::FiniteAbelianGroup::leftApply  (  GrpArr &  a, 
const Endomorphism &  q  
)  const 
Synopsis: applies the matrix q to the array a, on the left.
The idea is that the matrix defines an endomorphism of the group in terms of the array representation.

inline 

inline 

inline 
unsigned long atlas::abelian::FiniteAbelianGroup::order  (  GrpNbr  x  )  const 
Synopsis: computes the order of x in the group.
unsigned long atlas::abelian::FiniteAbelianGroup::order  (  const bitmap::BitMap &  B, 
GrpNbr  x  
)  const 
Computes the order of x modulo B, where B is a subgroup represented by flagging the GrpNbr values of its elements in a bitmap.
We just keep adding x until we end up at an element flagged in B
unsigned long atlas::abelian::FiniteAbelianGroup::pairing  (  const GrpArr &  a, 
const GrpArr &  b  
)  const 
Computes the m in [0,n[ s.t. a(b) = e^{m.2i/n}, where a is interpreted as an element of the dual group ($(G,^)$), which in our representation can be identified with the group itself, b as an element of the group, and n is the annihilator of the group (the last entry in d_type). This is a sort of scalar product, weighted by cotype, modulo n.
T
unsigned long atlas::abelian::FiniteAbelianGroup::pairing  (  const GrpArr &  a, 
const GrpArr &  b,  
unsigned long  t  
)  const 
Synopsis: computes the m in [0,t[ s.t. a(b) = e^{2i pi m/t}, where a is interpreted as an element of the dual group, b as an element of the group.
Precondition: pairing(a,b) is an element of ttorsion in Z/n, where n is the annihilator of the group;
The required m is just pairing(a,b)/(n/t).
NOTE: this is a sloppy implementation, that doesn't deal carefully with overflow. It is expected to be used only for very small groups.
NOTE: we put in an assertion for safety.
Computes n.x in the group

inline 
Synopsis: a = b.

inline 
void atlas::abelian::FiniteAbelianGroup::toWeight  (  matrix::Vector< int > &  v, 
const GrpArr &  a  
)  const 
Synopsis: put in v a representative of a.
NOTE: sloppy implementation; we don't check for overflow, which may happen in all cases, as the coefficients of v will be signed quantities.
void atlas::abelian::FiniteAbelianGroup::toWeight  (  matrix::Vector< int > &  v, 
GrpNbr  x  
)  const 
Synopsis: put in v a representative of x.

inline 

private 
If m is the largest order of an element (equal to d_type[last]), then the group is a product of quotients of Z/mZ, by the subgroups of order d_cotype[j]; each of these orders divides its predecessor, and d_cotype[last] is equal to 1.

private 
Cardinality of the group.

private 
Sizes of the canonical cyclic factors, arranged so that each divides the next.