CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

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

Views: 418386
1
#include"typedef.h"
2
#include"bravais.h"
3
#include"base.h"
4
#include"matrix.h"
5
#include"getput.h"
6
7
8
int INFO_LEVEL;
9
extern int SFLAG;
10
11
main (int argc, char *argv[])
12
{
13
bravais_TYP *Gtr,
14
*H;
15
16
matrix_TYP *A;
17
18
int prime;
19
20
21
read_header(argc, argv);
22
23
if((FILEANZ < 1) || (is_option('h') && optionnumber('h')==0))
24
{
25
printf("Usage: Normalizer 'file1' ['file2' ['file3']] [-p=prime] [-o]\n");
26
printf("\n");
27
printf("file1: bravais_TYP containing the group G.\n");
28
printf("file2: (OPTIONAL) bravais_TYP containing the transposed of G. (cf. Tr_bravais)\n");
29
printf("file3: (OPTIONAL) matrix_TYP of a G-perfect form. (cf. First_perfect)\n");
30
printf("\n");
31
printf("Calculates a set of matrices which together with G generate the\n");
32
printf("normalizer N_GL_n(Z) (G) of G in GL_n(Z).\n");
33
printf("NOTE: the output echoes any input information about G, except input about\n");
34
printf("generators of the normalizer.\n");
35
printf("NOTE: The dimension of the space of invariant forms is a measure for the\n");
36
printf("complexity of the algorithm. Up to degree 6 the only infeasible case are\n");
37
printf("<I_6> and <-I_6>. Here the generators of the normalizer can be taken\n");
38
printf("from `Bravais_cat' with family 1,1,1,1,1,1.\n");
39
printf("\n");
40
printf("Options:\n");
41
printf("-b : The normalizer of the bravais group B(G) is calculated. With this\n");
42
printf(" option the program is much faster. (The normalizer of G is a\n");
43
printf(" subgroup of N_GL_n(Z) (B(G)). )\n");
44
printf("-p=prime: The determinants of the perfect forms are\n");
45
printf(" calculated module prime. The default is 1949.\n");
46
printf("-o : The G-perfect forms are given as additional output.\n");
47
printf("\n");
48
if (is_option('h')){
49
exit(0);
50
}
51
else{
52
exit(31);
53
}
54
}
55
56
INFO_LEVEL = optionnumber('h');
57
if (INFO_LEVEL & 12){
58
SFLAG = 1;
59
}
60
61
62
/* get data */
63
H = get_bravais(FILENAMES[0]);
64
65
if (FILEANZ > 1){
66
Gtr = get_bravais(FILENAMES[1]);
67
}
68
else{
69
Gtr = NULL;
70
}
71
72
/* read an G-perfect form if it is given */
73
if (FILEANZ > 2){
74
A = get_mat(FILENAMES[2]);
75
}
76
else{
77
A = NULL;
78
}
79
80
prime = optionnumber('p');
81
82
83
/* calculate normalizer */
84
normalisator(H, Gtr, A, prime, is_option('b'), is_option('o'));
85
if(!is_option('o')){
86
put_bravais(H, NULL, "group with complete normalizer");
87
}
88
89
90
/* cleaning up the memory */
91
if (A != NULL)
92
free_mat(A);
93
free_bravais(H);
94
if (Gtr != NULL)
95
free_bravais(Gtr);
96
97
/* some diagnostic for memory leakage */
98
if (INFO_LEVEL & 12){
99
pointer_statistics(0,0);
100
}
101
102
exit(0);
103
}
104
105
106