1 /*
2   This is affine.h
3 
4   Coxeter version 3.0 Copyright (C) 2002 Fokko du Cloux
5   See file main.cpp for full copyright notice
6 */
7 
8 #ifndef AFFINE_H  /* guarantee single inclusion */
9 #define AFFINE_H
10 
11 #include "globals.h"
12 #include "coxgroup.h"
13 
14 namespace affine {
15   using namespace coxeter;
16 
17 //******** type declarations *************************************************
18   class AffineCoxGroup;
19   class AffineBigRankCoxGroup;
20   class GeneralABRCoxGroup;
21   class AffineMedRankCoxGroup;
22   class GeneralAMRCoxGroup;
23   class AffineSmallRankCoxGroup;
24   class GeneralASRCoxGroup;
25 
26 //******** type definitions **************************************************
27 
28 class AffineCoxGroup : public CoxGroup {
29  public:
30 /* constructors and destructors */
new(size_t size)31   void* operator new(size_t size) {return arena().alloc(size);}
delete(void * ptr)32   void operator delete(void* ptr)
33     {return arena().free(ptr,sizeof(AffineCoxGroup));}
34 
35   AffineCoxGroup(const Type& x, const Rank& l);
36   virtual ~AffineCoxGroup();
37 /* accessors */
38   CoxSize order() const;                                         /* inlined */
39 };
40 
41 class AffineBigRankCoxGroup : public AffineCoxGroup {
42  public:
43 /* constructors and destructors */
new(size_t size)44   void* operator new(size_t size) {return arena().alloc(size);}
delete(void * ptr)45   void operator delete(void* ptr)
46     {return arena().free(ptr,sizeof(AffineBigRankCoxGroup));}
47   AffineBigRankCoxGroup(const Type& x, const Rank& l);
48   virtual ~AffineBigRankCoxGroup();
49 };
50 
51 class GeneralABRCoxGroup:public AffineBigRankCoxGroup {
52  public:
53 /* constructors and destructors */
new(size_t size)54   void* operator new(size_t size) {return arena().alloc(size);}
delete(void * ptr)55   void operator delete(void* ptr)
56     {return arena().free(ptr,sizeof(GeneralABRCoxGroup));}
57   GeneralABRCoxGroup(const Type& x, const Rank& l);
58   ~GeneralABRCoxGroup();
59 };
60 
61 class AffineMedRankCoxGroup : public AffineCoxGroup {
62  public:
63 /* constructors and destructors */
new(size_t size)64   void* operator new(size_t size) {return arena().alloc(size);}
delete(void * ptr)65   void operator delete(void* ptr)
66     {return arena().free(ptr,sizeof(AffineMedRankCoxGroup));}
67   AffineMedRankCoxGroup(const Type& x, const Rank& l);
68   virtual ~AffineMedRankCoxGroup();
69 };
70 
71 class GeneralAMRCoxGroup:public AffineMedRankCoxGroup {
72  public:
73 /* constructors and destructors */
new(size_t size)74   void* operator new(size_t size) {return arena().alloc(size);}
delete(void * ptr)75   void operator delete(void* ptr)
76     {return arena().free(ptr,sizeof(GeneralAMRCoxGroup));}
77   GeneralAMRCoxGroup(const Type& x, const Rank& l);
78   ~GeneralAMRCoxGroup();
79 };
80 
81 class AffineSmallRankCoxGroup : public AffineMedRankCoxGroup {
82  public:
83 /* constructors and destructors */
new(size_t size)84   void* operator new(size_t size) {return arena().alloc(size);}
delete(void * ptr)85   void operator delete(void* ptr)
86     {return arena().free(ptr,sizeof(AffineSmallRankCoxGroup));}
87   AffineSmallRankCoxGroup(const Type& x, const Rank& l);
88   virtual ~AffineSmallRankCoxGroup();
89 };
90 
91 class GeneralASRCoxGroup:public AffineSmallRankCoxGroup {
92  public:
93 /* constructors and destructors */
new(size_t size)94   void* operator new(size_t size) {return arena().alloc(size);}
delete(void * ptr)95   void operator delete(void* ptr)
96     {return arena().free(ptr,sizeof(GeneralASRCoxGroup));}
97   GeneralASRCoxGroup(const Type& x, const Rank& l);
98   ~GeneralASRCoxGroup();
99 };
100 
101 //******* Inline implementations ******************************************
102 
103 /**
104   Return the order of this Coxeter group, which is infinite.
105 */
order()106 inline CoxSize AffineCoxGroup::order() const {return infinite_coxsize;}
107 }
108 
109 #endif
110