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

563690 views
1
#include"typedef.h"
2
#include"tools.h"
3
#include"matrix.h"
4
#include"bravais.h"
5
#include"ZZ.h"
6
7
void scan_argv (argc, argv, filename)
8
int argc;
9
char *argv[], **filename;
10
{
11
if ( argc != 2 )
12
*filename = NULL;
13
else
14
*filename = argv[1];
15
}
16
17
int ABBRUCH;
18
/*{{{}}}*/
19
/*{{{ ZZ_usage*/
20
void ZZ_usage(progname)
21
char *progname;
22
{
23
fprintf(stderr,"Usage: %s -bghl <#level> n <#number> pqrstu <file>\n\n",progname);
24
fprintf(stderr,"-b : Print only the matrices of change of base and their inverse.\n");
25
fprintf(stderr,"-g : Do not compute elementary divisors of the gram matrix.\n");
26
fprintf(stderr,"-h : Print this help\n");
27
fprintf(stderr,"-l #: Stop after reaching level #level (default #=%d).\n",LEVEL);
28
fprintf(stderr,"-n #: Stop after computation of #number \"Zentrierungen\" (default #=%d).\n",NUMBER);
29
fprintf(stderr,"-p<d0>/<d1>/<d2> ... : treat the lattice as a direct sum of <d0> sublattices\n");
30
fprintf(stderr," of dimensions <d1>, <d2> etc. (0 <= d0 <= 6) and compute only those\n");
31
fprintf(stderr," centerings that have surjective projections on them.\n");
32
fprintf(stderr,"-q : Quiet mode. Suppress any messages to stdin/stdout.\n");
33
fprintf(stderr,"-r : With ZZ_lll-reduction.\n");
34
fprintf(stderr,"-s : Print less information.\n");
35
fprintf(stderr,"-t : Create the data-file \"ZZ.tmp\".\n");
36
fprintf(stderr,"-u : Do not compute elementary divisors of the change of base\n\n");
37
}
38
39
/*}}} */
40
41
42
void foo()
43
{
44
/* printf("Hello world!\n"); */
45
}
46
47
int main (argc, argv)
48
49
int argc;
50
char *argv[];
51
{
52
matrix_TYP *Gram, **help2;
53
ZZ_data_t data;
54
ZZ_tree_t tree;
55
56
int i, j, k;
57
58
char *file_name;
59
60
scan_argv(argc, argv, &file_name);
61
Gram= ZZ_fget_data (&data,&tree,file_name);
62
if ( constituents == 1)
63
{
64
for ( i = 0; i < data.p_consts.k; i++)
65
{
66
help2= ZZ_irr_const( data.DELTA, data.r,
67
data.p_consts.p[i],
68
&data.p_consts.s[i]);
69
data.n[i] = (int *)malloc(data.p_consts.s[i]*sizeof(int));
70
data.p_consts.Delta[i]=(matrix_TYP ***)malloc(data.p_consts.s[i]*sizeof(matrix_TYP **));
71
for ( j = 0 ; j < data.p_consts.s[i]; j ++ )
72
{
73
data.p_consts.Delta[i][j]= (matrix_TYP **)malloc(data.r*sizeof(matrix_TYP *));
74
for ( k = 0; k < data.r; k ++ ) {
75
data.p_consts.Delta[i][j][k] = help2[j*data.r+k];
76
data.p_consts.Delta[i][j][k]->prime = data.p_consts.p[i];
77
}
78
data.n[i][j] = data.p_consts.Delta[i][j][0]->rows;
79
}
80
free( help2 );
81
}
82
ZZ_test_konst (&data);
83
/*{{{ */
84
/*{{{ */
85
for ( i = 0; i < data.p_consts.k; i++) {
86
/*{{{ */
87
/*------------------------------------------------------------*\
88
| initialize Endomorphisms |
89
\*------------------------------------------------------------*/
90
data.EnCo[i] = (ZZ_prod_t *)malloc(data.p_consts.s[i]*sizeof(ZZ_prod_t));
91
data.Endo[i] =(matrix_TYP ***)malloc(data.p_consts.s[i]*sizeof(matrix_TYP **));
92
}
93
94
data.epi_base = NULL;
95
data.epi = init_mat(data.N,data.N,"ik");
96
tree.root->k_vec = (int **)malloc(data.p_consts.k*sizeof(int *));
97
data.VK =(int **)malloc(data.p_consts.k*sizeof(int *));
98
for(i = 0; i < data.p_consts.k; i++) {
99
tree.root->k_vec[i] = (int *)calloc(data.p_consts.s[i],sizeof(int));
100
data.VK[i] = (int *)calloc(data.p_consts.s[i]+1,sizeof(int));
101
data.VK[i]++;
102
}
103
ZZ_make_endo (&data);
104
/*}}} */
105
/*}}} */
106
/*}}} */
107
}
108
if( verbose == TRUE )
109
{
110
/*{{{ */
111
for ( i = 0; i < data.p_consts.k; i++)
112
{
113
fprintf(stderr,"Primzahl: %d\n",data.p_consts.p[i]);
114
for ( j = 0 ; j < data.p_consts.s[i]; j ++ )
115
{
116
fprintf(stderr,"Konstituent %d:\n",j);
117
for ( k = 0; k < data.r; k ++ )
118
{
119
fprintf(stderr,"Erzeuger %d:\n",k);
120
fput_mat ( stderr, data.p_consts.Delta[i][j][k], "Konstituent", 0);
121
}
122
}
123
}
124
/*}}} */
125
}
126
ZZ_intern( Gram, &data, &tree );
127
ZZ_fput_data (&data, &tree,ABBRUCH);
128
ZZ_free_data(&data);
129
free(Gram);
130
}
131
132
133