atlas  0.6
abelian.h
Go to the documentation of this file.
1 
5 /*
6  Copyright (C) 2004,2005 Fokko du Cloux
7  part of the Atlas of Lie Groups and Representations
8 
9  For license information see the LICENSE file
10 */
11 
12 #ifndef ABELIAN_H /* guard against multiple inclusions */
13 #define ABELIAN_H
14 
15 #include <limits>
16 #include <set>
17 
18 #include "abelian_fwd.h"
19 #include "arithmetic_fwd.h"
20 
21 #include "bitmap.h"
22 #include "matrix.h"
23 
24 /******** type declarations **************************************************/
25 
26 namespace atlas {
27 
28 
29 /******** function declarations **********************************************/
30 
31 namespace abelian {
32 
33  void basis(std::vector<matrix::Vector<int> >&, const bitmap::BitMap&,
34  const FiniteAbelianGroup&);
35 
36  void coset(bitmap::BitMap&, const bitmap::BitMap&, GrpNbr,
37  const FiniteAbelianGroup&);
38 
39  const bitmap::BitMap& cycGenerators(const FiniteAbelianGroup&);
40 
41  void generateSubgroup(bitmap::BitMap&, GrpNbr, const FiniteAbelianGroup&);
42 
43  void generators(GrpNbrList&, const bitmap::BitMap&,
44  const FiniteAbelianGroup&);
45 
46  bool isElementaryAbelian(const std::vector<arithmetic::Denom_t>&);
47 
48  // coset representatives of $G/H$ in $G$
49  bitmap::BitMap quotReps(const bitmap::BitMap& H,const FiniteAbelianGroup& G);
50 
51  void to_array(GrpArr&, GrpNbr, const GroupType&);
52 
53  void to_array(GrpArr&, const matrix::Vector<int>&, const GroupType&);
54 
55  void toEndomorphism(Endomorphism&, const matrix::PID_Matrix<int>&,
56  const FiniteAbelianGroup&);
57 
58  GrpNbr to_GrpNbr(const GrpArr&, const GroupType&);
59 
60  void transpose(Endomorphism&, const FiniteAbelianGroup&);
61 
62 }
63 
64 /******** type definitions ***************************************************/
65 
66 namespace abelian {
67 
79 
83  unsigned long long d_size; // this limits the order of representable groups
96 
97  public:
98 
99 // constructors and destructors
101 
102  explicit FiniteAbelianGroup(const GroupType&);
103 
104 // copy and assignment: defaults are ok
105 
106 // accessors
107  bool operator== (const FiniteAbelianGroup& A) const {
108  return d_type == A.d_type;
109  }
110 
111  bool operator!= (const FiniteAbelianGroup& A) const {
112  return not operator==(A);
113  }
114 
115  unsigned int rank() const { return d_type.size(); }
116  const GroupType& type() const { return d_type; }
117 
118  // calling the following member |size| proved to be error prone
119  unsigned long long order() const { return d_size; } // order of entire group
120 
121 // representation conversions
123  { GrpArr result(rank()); to_array(result,x,d_type); return result; }
124 
126  { GrpArr result(rank()); to_array(result,v,d_type); return result; }
127 
128  GrpNbr toGrpNbr(const GrpArr& a) const { return to_GrpNbr(a,d_type); }
129 
130  void toWeight(matrix::Vector<int>&, const GrpArr&) const;
131 
132  void toWeight(matrix::Vector<int>&, GrpNbr) const;
133 
134  // arithmetic on group elements
135 
136  GrpNbr add(GrpNbr, GrpNbr) const;
137 
138  GrpNbr add(GrpNbr, const GrpArr&) const;
139 
140  GrpArr& add(GrpArr&, const GrpArr&) const;
141 
142  GrpArr& add(GrpArr&, GrpNbr) const;
143 
144  unsigned long annihilator() const;
145 
146  const GroupType& cotype() const {
147  return d_cotype;
148  }
149 
150  GrpNbr leftApply(GrpNbr, const Endomorphism&) const;
151 
152  GrpArr& leftApply(GrpArr&, const Endomorphism&) const;
153 
154  GrpNbr minus(GrpNbr) const;
155 
156  unsigned long order(GrpNbr) const;
157 
158  unsigned long order(const bitmap::BitMap&, GrpNbr) const;
159 
160  unsigned long pairing(const GrpArr&, const GrpArr&) const;
161 
162  unsigned long pairing(const GrpArr&, const GrpArr&, unsigned long) const;
163 
164  GrpNbr prod(GrpNbr, unsigned long) const;
165 
166  GrpNbr subtract(GrpNbr, const GrpNbr) const;
167 
168  GrpArr& subtract(GrpArr&, const GrpArr&) const;
169 
170 }; // |class FiniteAbelianGroup|
171 
198 
199  private:
200 
203  GroupType d_cosource; // cotypes of source components with respect to $M$
204  GroupType d_codest; // cotypes destination components with respect to $M$
205  unsigned long d_annihilator; // the common multiple $M$
207 
208  public:
209 
210 // constructors and destructors
211  Homomorphism(const std::vector<GrpArr>&,
212  const FiniteAbelianGroup&,
213  const FiniteAbelianGroup&);
214 
215 // accessors
216  GrpArr operator*(const GrpArr&) const;
217 
218  GrpNbr operator*(GrpNbr) const;
219 };
220 
221 } // |namespace abelian|
222 
223 } // |namespace atlas|
224 
225 #endif
const bitmap::BitMap & cycGenerators(const FiniteAbelianGroup &A)
Definition: abelian.cpp:495
bool isElementaryAbelian(const std::vector< unsigned long > &c)
Definition: abelian.cpp:560
unsigned long long GrpNbr
element of Abelian group, compact repr.
Definition: abelian_fwd.h:27
bool operator!=(const type_expr &x, const type_expr &y)
Definition: axis-types.h:374
GroupType d_cosource
Definition: abelian.h:203
std::vector< unsigned long > GrpArr
group element, array repr.
Definition: abelian_fwd.h:29
Definition: Atlas.h:79
Definition: abelian.h:78
matrix::Matrix_base< unsigned long > Endomorphism
Definition: abelian_fwd.h:32
const GroupType & type() const
Definition: abelian.h:116
Definition: lists.cpp:13
GroupType d_type
Definition: abelian.h:88
FiniteAbelianGroup()
Definition: abelian.h:100
std::vector< GrpNbr > GrpNbrList
Definition: abelian_fwd.h:28
void generateSubgroup(bitmap::BitMap &B, GrpNbr x, const FiniteAbelianGroup &A)
Definition: abelian.cpp:530
RationalVector< C2 > operator*(const matrix::Matrix< C1 > &M, const RationalVector< C2 > &v)
Definition: ratvec.cpp:158
unsigned long d_annihilator
Definition: abelian.h:205
unsigned int rank() const
Definition: abelian.h:115
void generators(GrpNbrList &gen, const bitmap::BitMap &B, const FiniteAbelianGroup &A)
Definition: abelian.cpp:550
GroupType d_dest
Definition: abelian.h:202
Definition: abelian.h:197
unsigned long long order() const
Definition: abelian.h:119
matrix::PID_Matrix< unsigned long > d_matrix
Definition: abelian.h:206
GrpNbr toGrpNbr(const GrpArr &a) const
Definition: abelian.h:128
GroupType d_codest
Definition: abelian.h:204
std::vector< unsigned long > GroupType
Definition: abelian_fwd.h:31
bitmap::BitMap quotReps(const bitmap::BitMap &B, const FiniteAbelianGroup &A)
Definition: abelian.cpp:580
void to_array(GrpArr &a, GrpNbr x, const GroupType &t)
Definition: abelian.cpp:605
Definitions and declarations for the BitMap class.
GroupType d_cotype
Definition: abelian.h:95
void coset(bitmap::BitMap &C, const bitmap::BitMap &B, GrpNbr x, const FiniteAbelianGroup &A)
Definition: abelian.cpp:468
const GroupType & cotype() const
Definition: abelian.h:146
GrpArr toArray(GrpNbr x) const
Definition: abelian.h:122
bool operator==(const type_expr &x, const type_expr &y)
Definition: axis-types.cpp:257
Definition: Atlas.h:38
Container of a large (more than twice the machine word size) set of bits.
Definition: bitmap.h:52
void basis(std::vector< matrix::Vector< int > > &b, const bitmap::BitMap &B, const FiniteAbelianGroup &A)
Definition: abelian.cpp:427
unsigned long long d_size
Definition: abelian.h:83
GrpArr toArray(const matrix::Vector< int > &v) const
Definition: abelian.h:125
void toEndomorphism(Endomorphism &e, const matrix::PID_Matrix< int > &q, const FiniteAbelianGroup &A)
Definition: abelian.cpp:636
GroupType d_source
Definition: abelian.h:201
GrpNbr to_GrpNbr(const GrpArr &a, const GroupType &t)
Definition: abelian.cpp:652
void transpose(Endomorphism &e, const FiniteAbelianGroup &A)
Definition: abelian.cpp:675
Vertex v
Definition: graph.cpp:116