-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgeneral.h
108 lines (89 loc) · 3.19 KB
/
general.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/*
This is general.h
Coxeter version 3.0 Copyright (C) 2002 Fokko du Cloux
See file main.cpp for full copyright notice
*/
#ifndef GENERAL_H /* guard against multiple inclusions */
#define GENERAL_H
#include "globals.h"
#include "coxgroup.h"
namespace general {
using namespace coxeter;
/******** type declarations **************************************************/
class GeneralCoxGroup;
class BigRankCoxGroup;
class GeneralBRCoxGroup;
class MedRankCoxGroup;
class GeneralMRCoxGroup;
class SmallRankCoxGroup;
class GeneralSRCoxGroup;
/********* type definitions **************************************************/
class GeneralCoxGroup : public CoxGroup {
public:
/* constructors and destructors */
void* operator new(size_t size) {return arena().alloc(size);}
void operator delete(void* ptr)
{return arena().free(ptr,sizeof(GeneralCoxGroup));}
GeneralCoxGroup(const Type& x, const Rank& l);
virtual ~GeneralCoxGroup();
/* accessors */
virtual CoxSize order() const; /* inlined */
};
class BigRankCoxGroup : public GeneralCoxGroup {
public:
/* constructors and destructors */
void* operator new(size_t size) {return arena().alloc(size);}
void operator delete(void* ptr)
{return arena().free(ptr,sizeof(BigRankCoxGroup));}
BigRankCoxGroup(const Type& x, const Rank& l);
virtual ~BigRankCoxGroup();
};
class GeneralBRCoxGroup:public BigRankCoxGroup { /* leaf class */
public:
/* constructors and destructors */
void* operator new(size_t size) {return arena().alloc(size);}
void operator delete(void* ptr)
{return arena().free(ptr,sizeof(GeneralBRCoxGroup));}
GeneralBRCoxGroup(const Type& x, const Rank& l);
~GeneralBRCoxGroup();
};
class MedRankCoxGroup : public GeneralCoxGroup {
public:
/* constructors and destructors */
void* operator new(size_t size) {return arena().alloc(size);}
void operator delete(void* ptr)
{return arena().free(ptr,sizeof(MedRankCoxGroup));}
MedRankCoxGroup(const Type& x, const Rank& l);
virtual ~MedRankCoxGroup();
};
class GeneralMRCoxGroup:public MedRankCoxGroup { /* leaf class */
public:
/* constructors and destructors */
void* operator new(size_t size) {return arena().alloc(size);}
void operator delete(void* ptr)
{return arena().free(ptr,sizeof(GeneralMRCoxGroup));}
GeneralMRCoxGroup(const Type& x, const Rank& l);
~GeneralMRCoxGroup();
};
class SmallRankCoxGroup : public MedRankCoxGroup {
public:
/* constructors and destructors */
void* operator new(size_t size) {return arena().alloc(size);}
void operator delete(void* ptr)
{return arena().free(ptr,sizeof(SmallRankCoxGroup));}
SmallRankCoxGroup(const Type& x, const Rank& l);
virtual ~SmallRankCoxGroup();
};
class GeneralSRCoxGroup:public SmallRankCoxGroup { /* leaf class */
public:
/* constructors and destructors */
void* operator new(size_t size) {return arena().alloc(size);}
void operator delete(void* ptr)
{return arena().free(ptr,sizeof(GeneralSRCoxGroup));}
GeneralSRCoxGroup(const Type& x, const Rank& l);
~GeneralSRCoxGroup();
};
/******** inline definitions *************************************************/
inline CoxSize GeneralCoxGroup::order() const {return undef_coxsize;}
}
#endif