atlas  0.6
testrun.h
Go to the documentation of this file.
1 
2 /*
3  This is testrun.h
4 
5  Copyright (C) 2004,2005 Fokko du Cloux
6  part of the Atlas of Lie Groups and Representations
7 
8  For license information see the LICENSE file
9 */
10 
11 #ifndef TESTRUN_H /* guard against multiple inclusions */
12 #define TESTRUN_H
13 
14 #include "abelian.h"
15 #include "lietype.h"
16 #include "prerootdata.h"
17 #include "realredgp.h"
18 
19 namespace atlas {
20 
21 /******** type declarations **************************************************/
22 
23 namespace testrun {
24 
27 
28  class GroupIterator;
29 
30  class LieTypeIterator;
31  class CoveringIterator;
32  class RealFormIterator;
33  class SubGroupIterator;
34  class TorusMapIterator;
35 
36 }
37 
38 /******** function declarations **********************************************/
39 
40 namespace testrun {
41 
42 }
43 
44 /******** type definitions ***************************************************/
45 
46 namespace testrun {
47 
48 // Dixit Fokko: base class for group iterators
49 /*
50  It is unclear to me [MvL] what exactly this class was intended for. Visibly
51  an abstract base class, but currently nothing is derived from it, nor is
52  anything implemented. None of the iterators defined in the sequel have
53  |RealReductiveGroup| as value type, so it is not those that were intended to
54  be derived from |GroupIterator|. Maybe different kinds of iterators over
55  |RealReductiveGroup| were envisioned, based on restrictive criteria listed
56  in the |Category| enumeration. For now this is both useless and unused.
57  */
58 
60 
61  public:
62 // associated types
63  typedef std::forward_iterator_tag iterator_category;
64  typedef RealReductiveGroup value_type;
65  typedef ptrdiff_t difference_type;
66  typedef const value_type* pointer;
67  typedef const value_type& reference;
68 
69 // constructors and destructors
71 
72  virtual ~GroupIterator() {}
73 
74 // accessors
75  virtual bool operator== (const GroupIterator& i) const = 0;
76 
77  bool operator!= (const GroupIterator& i) const {
78  return not operator== (i);
79  }
80 
81  virtual reference operator* () const = 0;
82 
83  virtual pointer operator-> () const = 0;
84 
85  virtual bool operator() () const = 0;
86 
87 // manipulators
88  virtual GroupIterator& operator++ () = 0;
89 // note : operator++ (int) cannot be defined here because it must return
90 // an object.
91 }; // |class GroupIterator|
92 
94 
95  private:
96 
97  bool d_done;
99  LieType d_type;
100  size_t d_firstRank;
101  size_t d_lastRank;
102 
103  public:
104 
105 // associated types
106  typedef std::forward_iterator_tag iterator_category;
107  typedef LieType value_type;
108  typedef const value_type* pointer;
109  typedef const value_type& reference;
110 
111 // constructors and destructors
112  LieTypeIterator(Category cat, size_t rank);
113 
114  virtual ~LieTypeIterator() {}
115 
116 // accessors
117  bool operator== (const LieTypeIterator& i) const {
118  return d_type == i.d_type;
119  }
120 
121  bool operator!= (const LieTypeIterator& i) const {
122  return not operator== (i);
123  }
124 
125  reference operator* () const {
126  return d_type;
127  }
128 
129  pointer operator-> () const {
130  return &d_type;
131  }
132 
133  bool operator() () const {
134  return not d_done;
135  }
136 
137 // manipulators
138  LieTypeIterator& operator++ ();
139 
140  LieTypeIterator operator++ (int) {
141  LieTypeIterator tmp(*this);
142  ++(*this);
143  return tmp;
144  }
145 }; // |class LieTypeIterator|
146 
148 
149  private:
150 
151  size_t d_rank;
152  BitMap::iterator d_first;
153  BitMap::iterator d_last;
154  std::vector<BitMap::iterator> d_data; // internal state
155  std::vector<abelian::GrpNbr> d_returnValue; // dereferenced |d_data|
156  bool d_done;
157 
158  public:
159 
160 // associated types
161  typedef std::forward_iterator_tag iterator_category;
162  typedef std::vector<abelian::GrpNbr> value_type;
163  typedef const value_type* pointer;
164  typedef const value_type& reference;
165 
166 // constructors and destructors
168 
169  TorusMapIterator(size_t, const BitMap&);
170 
171  // copy-like constructor, but move iterators to point to new (copied) bitmap
172  TorusMapIterator(const TorusMapIterator&, const BitMap&);
173 
175 
176 // accessors
177  bool operator== (const TorusMapIterator& i) const {
178  return d_data == i.d_data;
179  }
180 
181  bool operator!= (const TorusMapIterator& i) const {
182  return not operator== (i);
183  }
184 
185  reference operator* () const {
186  return d_returnValue;
187  }
188 
189  pointer operator-> () const {
190  return &d_returnValue;
191  }
192 
193  bool operator() () const {
194  return not d_done;
195  }
196 
197  size_t rank() const {
198  return d_rank;
199  }
200 
201 // manipulators
202  TorusMapIterator& operator++ ();
203 
204  TorusMapIterator operator++ (int) {
205  TorusMapIterator tmp(*this);
206  ++(*this);
207  return tmp;
208  }
209 
210  void reset(const BitMap&);
211 }; // |class TorusMapIterator|
212 
214 
215  private:
216 
218  std::vector<BitMap> d_prevRank;
219  std::set<BitMap> d_thisRank;
220  std::vector<BitMap>::const_iterator d_prev;
221  BitMap d_subgroup;
223  BitMap::iterator d_generator;
224  unsigned long d_rank;
225  bool d_done;
226 
227 // private member functions
228  void incrementGenerator();
229  void resetGenerator();
230 
231  public:
232 
233 // associated types
234  typedef std::forward_iterator_tag iterator_category;
235  typedef BitMap value_type;
236  typedef ptrdiff_t difference_type;
237  typedef const value_type* pointer;
238  typedef const value_type& reference;
239 
240 // constructors and destructors
242 
244 
246 
247 // copy and assignment
249 
250  SubgroupIterator& operator= (const SubgroupIterator&);
251 
252 // accessors
253  bool operator== (const SubgroupIterator& i) const {
254  return d_subgroup == i.d_subgroup;
255  }
256 
257  bool operator!= (const SubgroupIterator& i) const {
258  return not operator== (i);
259  }
260 
261  reference operator* () const {
262  return d_subgroup;
263  }
264 
265  bool operator() () const {
266  return not d_done;
267  }
268 
270  return *d_group;
271  }
272 
273  unsigned long rank() const {
274  return d_rank;
275  }
276 
277 // manipulators
278  SubgroupIterator& operator++ ();
279 
280  SubgroupIterator operator++ (int) {
281  SubgroupIterator tmp(*this);
282  ++(*this);
283  return tmp;
284  }
285 }; // |class SubgroupIterator|
286 
288 
289  const LieType d_lieType;
290  // the center of the dual to the simply connected semisimple group
292  size_t d_rank;
294  size_t d_torusRank;
295 
296 // iterator management
297  BitMap d_quotReps; // flags coset representatives mod |d_subgroup|
298  SubgroupIterator d_subgroup; // current subgroup quotiented by
300  bool d_done;
301 
302 // data for the PreRootDatum
303  WeightList d_smithBasis; // basis span fund. weights, adapted to root lattice
304  PreRootDatum d_preRootDatum;
305 
306 // private member functions
308  CoveringIterator& operator= (const CoveringIterator&);
309 
310  public:
311 
312 // associated types
313  typedef std::forward_iterator_tag iterator_category;
314  typedef PreRootDatum value_type;
315  typedef const value_type* pointer;
316  typedef const value_type& reference;
317 
318 // constructors and destructors
320 
321  explicit CoveringIterator(const LieType&);
322  ~CoveringIterator();
323 
324 // accessors
325  bool operator== (const CoveringIterator& i) const {
326  return d_preRootDatum == i.d_preRootDatum;
327  }
328 
329  bool operator!= (const CoveringIterator& i) const {
330  return not operator== (i);
331  }
332 
333  reference operator* () const {
334  return d_preRootDatum;
335  }
336 
337  pointer operator-> () const {
338  return &d_preRootDatum;
339  }
340 
341  bool operator() () const {
342  return not d_done;
343  }
344 
346  return *d_dcenter;
347  }
348 
349  const BitMap& group() const {
350  return *d_subgroup;
351  }
352 
353  void makeBasis(WeightList&) const;
354 
355  // report where we are in Fokko-interface fashion
356  RatWeightList kernel_generators () const;
357 
358 // manipulators
359  CoveringIterator& operator++ ();
360 }; // |class CoveringIterator|
361 
363 }; // |class RealFormIterator|
364 
365 }
366 
367 }
368 
369 #endif
SubgroupIterator d_subgroup
Definition: testrun.h:298
std::vector< abelian::GrpNbr > value_type
Definition: testrun.h:162
size_t d_torusRank
Definition: testrun.h:294
Definition: testrun.h:93
virtual ~LieTypeIterator()
Definition: testrun.h:114
Definition: testrun.h:25
std::vector< BitMap::iterator > d_data
Definition: testrun.h:154
unsigned long d_rank
Definition: testrun.h:224
const abelian::FiniteAbelianGroup & dcenter()
Definition: testrun.h:345
bool operator!=(const type_expr &x, const type_expr &y)
Definition: axis-types.h:374
size_t d_rank
Definition: testrun.h:292
std::forward_iterator_tag iterator_category
Definition: testrun.h:161
std::forward_iterator_tag iterator_category
Definition: testrun.h:234
Definition: abelian.h:78
BitMap d_cycGenerators
Definition: testrun.h:222
PreRootDatum d_preRootDatum
Definition: testrun.h:304
~TorusMapIterator()
Definition: testrun.h:174
BitMap::iterator d_last
Definition: testrun.h:153
const LieType d_lieType
Definition: testrun.h:289
BitMap::iterator d_generator
Definition: testrun.h:223
bool d_done
Definition: testrun.h:225
const value_type * pointer
Definition: testrun.h:108
BitMap value_type
Definition: testrun.h:235
BitMap d_subgroup
Definition: testrun.h:221
LieType value_type
Definition: testrun.h:107
PreRootDatum value_type
Definition: testrun.h:314
std::vector< RatWeight > RatWeightList
Definition: Atlas.h:164
size_t d_firstRank
Definition: testrun.h:100
Function and constant declarations for namespace lietype.
Definition: lists.cpp:13
const value_type & reference
Definition: testrun.h:109
const value_type & reference
Definition: testrun.h:316
unsigned long rank() const
Definition: testrun.h:273
const value_type & reference
Definition: testrun.h:164
BitMap::iterator d_first
Definition: testrun.h:152
~SubgroupIterator()
Definition: testrun.h:245
std::vector< abelian::GrpNbr > d_returnValue
Definition: testrun.h:155
Definition: testrun.h:213
const value_type & reference
Definition: testrun.h:238
RealReductiveGroup value_type
Definition: testrun.h:64
Definition: testrun.h:25
const abelian::FiniteAbelianGroup * d_dcenter
Definition: testrun.h:291
TorusMapIterator()
Definition: testrun.h:167
Definition: testrun.h:25
std::forward_iterator_tag iterator_category
Definition: testrun.h:313
RationalVector< C2 > operator*(const matrix::Matrix< C1 > &M, const RationalVector< C2 > &v)
Definition: ratvec.cpp:158
Category
Definition: testrun.h:25
GroupIterator()
Definition: testrun.h:70
std::vector< Weight > WeightList
Definition: Atlas.h:162
ptrdiff_t difference_type
Definition: testrun.h:236
Definition: testrun.h:362
const abelian::FiniteAbelianGroup & group() const
Definition: testrun.h:269
bool d_done
Definition: testrun.h:97
size_t rank() const
Definition: testrun.h:197
std::forward_iterator_tag iterator_category
Definition: testrun.h:106
std::forward_iterator_tag iterator_category
Definition: testrun.h:63
WeightList d_smithBasis
Definition: testrun.h:303
CoveringIterator()
Definition: testrun.h:319
BitMap d_quotReps
Definition: testrun.h:297
bool d_done
Definition: testrun.h:300
virtual ~GroupIterator()
Definition: testrun.h:72
TorusMapIterator d_torusMap
Definition: testrun.h:299
std::set< BitMap > d_thisRank
Definition: testrun.h:219
const abelian::FiniteAbelianGroup * d_group
Definition: testrun.h:217
const value_type * pointer
Definition: testrun.h:315
Category d_category
Definition: testrun.h:98
const value_type * pointer
Definition: testrun.h:237
const value_type * pointer
Definition: testrun.h:66
const value_type & reference
Definition: testrun.h:67
Definition: testrun.h:26
std::vector< BitMap >::const_iterator d_prev
Definition: testrun.h:220
size_t d_rank
Definition: testrun.h:151
LieType d_type
Definition: testrun.h:99
Definition: testrun.h:26
bool operator==(const type_expr &x, const type_expr &y)
Definition: axis-types.cpp:257
bool d_done
Definition: testrun.h:156
Definition: testrun.h:25
Definition: Atlas.h:38
Definition: testrun.h:59
size_t d_lastRank
Definition: testrun.h:101
const value_type * pointer
Definition: testrun.h:163
Definition: testrun.h:25
ptrdiff_t difference_type
Definition: testrun.h:65
std::vector< BitMap > d_prevRank
Definition: testrun.h:218
Definition: testrun.h:287
const BitMap & group() const
Definition: testrun.h:349
Definition: testrun.h:147
size_t d_semisimpleRank
Definition: testrun.h:293
SubgroupIterator()
Definition: testrun.h:241