atlas  0.6
Public Member Functions | Private Attributes | List of all members
atlas::abelian::FiniteAbelianGroup Class Reference

#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 GroupTypetype () 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
 
GrpArradd (GrpArr &, const GrpArr &) const
 
GrpArradd (GrpArr &, GrpNbr) const
 
unsigned long annihilator () const
 
const GroupTypecotype () const
 
GrpNbr leftApply (GrpNbr, const Endomorphism &) const
 
GrpArrleftApply (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
 
GrpArrsubtract (GrpArr &, const GrpArr &) const
 

Private Attributes

unsigned long long d_size
 
GroupType d_type
 
GroupType d_cotype
 

Detailed Description

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.

Constructor & Destructor Documentation

atlas::abelian::FiniteAbelianGroup::FiniteAbelianGroup ( )
inline
atlas::abelian::FiniteAbelianGroup::FiniteAbelianGroup ( const GroupType t)
explicit

Member Function Documentation

GrpNbr atlas::abelian::FiniteAbelianGroup::add ( GrpNbr  x,
GrpNbr  y 
) const

Synopsis: x + y.

Of course adding as integers does not do the right thing; decompose

GrpNbr atlas::abelian::FiniteAbelianGroup::add ( GrpNbr  x,
const GrpArr b 
) const

Synopsis: x + b. Note that |x| is by value, so here |add| cannot mean |+=|

GrpArr & atlas::abelian::FiniteAbelianGroup::add ( GrpArr a,
const GrpArr b 
) const

Synopsis: a += b.

Precondition: a and b hold valid arrays for the group;

The only difficulty is doing it without triggering overflow.

GrpArr & atlas::abelian::FiniteAbelianGroup::add ( GrpArr a,
GrpNbr  x 
) const

Synopsis: a += x.

unsigned long atlas::abelian::FiniteAbelianGroup::annihilator ( ) const

Synopsis: returns the l.c.m. of the orders of the elements of the group.

const GroupType& atlas::abelian::FiniteAbelianGroup::cotype ( ) const
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.

GrpNbr atlas::abelian::FiniteAbelianGroup::minus ( GrpNbr  ) const
bool atlas::abelian::FiniteAbelianGroup::operator!= ( const FiniteAbelianGroup A) const
inline
unsigned long long atlas::abelian::FiniteAbelianGroup::order ( ) const
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 t-torsion 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.

GrpNbr atlas::abelian::FiniteAbelianGroup::prod ( GrpNbr  x,
unsigned long  n 
) const

Computes n.x in the group

unsigned int atlas::abelian::FiniteAbelianGroup::rank ( ) const
inline
GrpNbr atlas::abelian::FiniteAbelianGroup::subtract ( GrpNbr  ,
const GrpNbr   
) const
GrpArr & atlas::abelian::FiniteAbelianGroup::subtract ( GrpArr a,
const GrpArr b 
) const

Synopsis: a -= b.

GrpArr atlas::abelian::FiniteAbelianGroup::toArray ( GrpNbr  x) const
inline
GrpArr atlas::abelian::FiniteAbelianGroup::toArray ( const matrix::Vector< int > &  v) const
inline
GrpNbr atlas::abelian::FiniteAbelianGroup::toGrpNbr ( const GrpArr a) const
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|.

const GroupType& atlas::abelian::FiniteAbelianGroup::type ( ) const
inline

Member Data Documentation

GroupType atlas::abelian::FiniteAbelianGroup::d_cotype
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.

unsigned long long atlas::abelian::FiniteAbelianGroup::d_size
private

Cardinality of the group.

GroupType atlas::abelian::FiniteAbelianGroup::d_type
private

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


The documentation for this class was generated from the following files: