Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

563595 views
1
#ifdef __cplusplus
2
extern "C" {
3
#endif
4
5
#ifndef _NAME_H_
6
#define _NAME_H_
7
8
#ifndef _CARAT_TYPEDEF_H
9
#include "typedef.h"
10
#endif
11
12
#ifndef _GMP_H
13
#include "gmp.h"
14
#endif
15
16
17
#define EXIT_SUCCESS 0
18
#define EXIT_FAILURE 1
19
20
/* I tried to make the program as modular as possible.
21
So I hope that it will be easy to expand the entries
22
of the database. ...
23
*/
24
25
#define ALL_MATCH 65535
26
27
#define NR_OF_ELEMENTS_IN_EACH_ENTRY 10
28
29
#define COND_ABBREVIATION 0
30
#define COND_DEGREE 1
31
#define COND_SYMBOL 2
32
#define COND_ORDER 3
33
#define COND_DISCRIMINANT 4
34
#define COND_ZCLASSES 5
35
#define COND_AFFINE 6
36
#define COND_TORSIONFREE 7
37
#define COND_NO_CONCLASS 8
38
#define COND_NO_IDEM 9
39
40
#define SET_COND 0
41
#define DEL_COND 1
42
#define DISPLAY_POSSIBLE 2
43
44
typedef struct
45
{
46
char *abbreviation; /* filename of the group*/
47
int degree; /* dimension of the group */
48
char *symbol; /* family symbol */
49
int order;
50
char *discriminant;
51
int zclasses; /* number of Z-classes in the Q-class */
52
int affine; /* number of affine classes in the Q-class */
53
int torsionfree; /* number of torsionfree affine classes */
54
int no_conclass; /* number of conjugacy classes in group. */
55
int no_idem; /* number of conjugacy classes in group. */
56
} entry;
57
58
typedef struct
59
{
60
long nr;
61
entry *entry;
62
} database;
63
64
typedef struct
65
{
66
entry entry;
67
int *exists;
68
} conditions;
69
70
#ifdef __STDC__
71
72
/*************************************************************************
73
| FILE : HM_symbol.c
74
**************************************************************************/
75
76
void display_HM_symbol(char *qname,
77
int zname1,
78
int zname2,
79
MP_INT *aff_name);
80
81
/*************************************************************************
82
| FILE : Q_catalog.c
83
**************************************************************************/
84
extern void (*(display_element [NR_OF_ELEMENTS_IN_EACH_ENTRY])) (entry *data);
85
extern void (*(load_element [NR_OF_ELEMENTS_IN_EACH_ENTRY])) (const char *string, entry *data);
86
extern void (*(delete_element [NR_OF_ELEMENTS_IN_EACH_ENTRY])) (entry *data);
87
extern int (*(compare_element [NR_OF_ELEMENTS_IN_EACH_ENTRY])) (entry *data1, entry *data2
88
);
89
extern const char *name_element [NR_OF_ELEMENTS_IN_EACH_ENTRY];
90
91
void apply_cond_to_display_list (conditions *cond,
92
database *database,
93
int display_list[],
94
int new_condition);
95
96
void unapply_cond_to_display_list (database *database,
97
int display_list[],
98
int unset_condition);
99
100
void display_data_list (database *datas,
101
int display_list[]);
102
103
database *load_database (const char *filename,
104
int degree);
105
106
void free_database (database *datas);
107
108
/*************************************************************************
109
| FILE : aff_class_inf.c
110
**************************************************************************/
111
112
matrix_TYP *aff_class_inf(bravais_TYP *R,
113
bravais_TYP *DATAZ,
114
matrix_TYP *PRES,
115
MP_INT *aff_name,
116
bravais_TYP **RC);
117
118
void extend(matrix_TYP *T);
119
120
bravais_TYP *space_group_from_matrix(bravais_TYP *G,
121
matrix_TYP *x,
122
matrix_TYP *cocycle,
123
matrix_TYP *D);
124
125
126
/*************************************************************************
127
| FILE: compute_q_matrix.c
128
**************************************************************************/
129
130
matrix_TYP *compute_q_matrix (bravais_TYP *G);
131
132
/*************************************************************************
133
| FILE: point_group.c
134
**************************************************************************/
135
136
bravais_TYP *point_group(bravais_TYP *R,
137
int opt);
138
139
/*************************************************************************
140
| FILE: q_class_inf.c
141
**************************************************************************/
142
143
matrix_TYP *q_class_inf (bravais_TYP *G,
144
database *database,
145
char *qclass_name,
146
char *symbol,
147
bravais_TYP **OUT,
148
matrix_TYP **PRES,
149
int transformation);
150
151
/*************************************************************************
152
| FILE: z_class_inf.c
153
**************************************************************************/
154
155
matrix_TYP *z_class_inf(bravais_TYP *G,
156
bravais_TYP *DATABASEGROUP,
157
bravais_TYP **RES,
158
int *name);
159
160
/*************************************************************************
161
| FILE: reverse_name_fct.c
162
**************************************************************************/
163
164
bravais_TYP *get_qclass_by_name(char *name,
165
matrix_TYP **PRES,
166
int dim);
167
168
bravais_TYP *get_zclass_by_name(bravais_TYP *G,
169
int *first,
170
int *second,
171
int ignore);
172
173
bravais_TYP *split_extension(bravais_TYP *G);
174
175
bravais_TYP *get_affine_class_by_name(bravais_TYP *G,
176
matrix_TYP *PRES,
177
MP_INT *aff_name,
178
int check);
179
180
bravais_TYP *reverse_name(char *qname,
181
int zname[2],
182
MP_INT aff_name,
183
int i,
184
boolean iflag,
185
char **affstring);
186
187
#else
188
189
190
/*************************************************************************
191
| FILE : HM_symbol.c
192
**************************************************************************/
193
194
void display_HM_symbol();
195
196
/*************************************************************************
197
| FILE : Q_catalog.c
198
**************************************************************************/
199
extern void ();
200
201
void unapply_cond_to_display_list ();
202
203
void display_data_list ();
204
205
database *load_database ();
206
207
void free_database ();
208
209
210
/*************************************************************************
211
| FILE : aff_class_inf.c
212
**************************************************************************/
213
214
matrix_TYP *aff_class_inf();
215
216
void extend();
217
218
bravais_TYP *space_group_from_matrix();
219
220
/*************************************************************************
221
| FILE: compute_q_matrix.c
222
**************************************************************************/
223
224
matrix_TYP *compute_q_matrix ();
225
226
/*************************************************************************
227
| FILE: point_group.c
228
**************************************************************************/
229
230
bravais_TYP *point_group();
231
232
/*************************************************************************
233
| FILE: q_class_inf.c
234
**************************************************************************/
235
236
matrix_TYP *q_class_inf ();
237
238
/*************************************************************************
239
| FILE: z_class_inf.c
240
**************************************************************************/
241
242
matrix_TYP *z_class_inf();
243
244
/*************************************************************************
245
| FILE: reverse_name_fct.c
246
**************************************************************************/
247
248
bravais_TYP *get_qclass_by_name();
249
250
bravais_TYP *get_zclass_by_name();
251
252
bravais_TYP *split_extension();
253
254
bravais_TYP *get_affine_class_by_name();
255
256
bravais_TYP *reverse_name();
257
258
#endif
259
260
#endif
261
262
#ifdef __cplusplus
263
}
264
#endif
265
266