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

563604 views
1
#include "typedef.h"
2
#include "datei.h"
3
4
extern int INFO_LEVEL;
5
6
lattice_element **lattice(char *symb,int dim,int almost,int zclass,int *no,
7
int OPTION)
8
{
9
lattice_element **res;
10
11
FILE *infile;
12
13
int i;
14
15
/* saves space on the stack */
16
static char filename[1000];
17
18
/* get the appropiate filename */
19
sprintf(filename,"%s%s%d/%s%s_%d_%d",TOPDIR,"/tables/lattices/dim",
20
dim,"lattice_",symb,almost,zclass);
21
22
infile = fopen(filename,"r");
23
24
/* save cores */
25
if (infile == NULL){
26
fprintf(stderr,"Couldn't find my input file %s\n",filename);
27
exit(4);
28
}
29
30
fscanf(infile,"#%d\n",no);
31
32
if (INFO_LEVEL & 1){
33
fprintf(stderr,"%d\n",no[0]);
34
}
35
36
/* now read the data for lattice */
37
res = (lattice_element **) malloc(no[0] * sizeof(lattice_element *));
38
39
/* read the subgroups */
40
for (i=0;i<no[0];i++){
41
42
/* get the element of lattice */
43
res[i] = fget_lattice_element(infile,OPTION);
44
45
/* output for debugging */
46
if (INFO_LEVEL & 1){
47
fput_lattice_element(res[i],NULL);
48
}
49
}
50
51
fclose(infile);
52
53
return res;
54
}
55
56
57
58