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

563582 views
1
#include"typedef.h"
2
3
4
int INFO_LEVEL;
5
extern int SFLAG;
6
7
main (int argc, char *argv[])
8
{
9
bravais_TYP *G, *Gtr;
10
matrix_TYP *A, *P, *S;
11
int Pmin;
12
13
extern char **FILENAMES;
14
extern int FILEANZ;
15
16
extern matrix_TYP *get_mat ();
17
extern void put_mat ();
18
extern bravais_TYP *get_bravais();
19
extern matrix_TYP *first_perfect();
20
extern matrix_TYP *trace_bifo();
21
22
read_header(argc, argv);
23
if(FILEANZ != 3){
24
printf("Usage: %s 'file1' 'file2' 'file3'\n",argv[0]);
25
printf("\n");
26
printf("file1: bravais_TYP containing the finite unimodular group G.\n");
27
printf("file2: bravais_TYP containing G^{tr}.\n");
28
printf("file3: matrix_TYP containing a positive definite G-invariant form F.\n");
29
printf("\n");
30
printf("Returns a G-perfect form in the neighbourhood of F.\n");
31
printf("\n");
32
printf("Cf. Normalizer, Perfect_neighbours.\n");
33
if (is_option('h')){
34
exit(0);
35
}
36
else{
37
exit(31);
38
}
39
}
40
41
/* diagonistics for memory-leakages */
42
if (is_option('h')){
43
INFO_LEVEL = optionnumber('h');
44
}
45
if (INFO_LEVEL & 12){
46
SFLAG = 1;
47
}
48
49
G = get_bravais(FILENAMES[0]);
50
Gtr = get_bravais(FILENAMES[1]);
51
A = get_mat(FILENAMES[2]);
52
S = trace_bifo(G->form, Gtr->form, G->form_no);
53
P = first_perfect(A, G, Gtr->form, S, &Pmin);
54
put_mat(P, NULL, "G-perfect form", 2);
55
printf("The Minimum is %d\n", Pmin);
56
put_mat(S, NULL, "tr_bifo", 2);
57
58
/* cleaning up the memory */
59
free_mat(P);
60
free_mat(S);
61
free_mat(A);
62
free_bravais(G);
63
free_bravais(Gtr);
64
65
/* diagonistics for memory-leakages */
66
if (INFO_LEVEL & 12){
67
pointer_statistics(0,0);
68
}
69
70
exit(0);
71
}
72
73