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
3
#include"getput.h"
4
#include"matrix.h"
5
#include"reduction.h"
6
7
int INFO_LEVEL;
8
9
10
int main (int argc, char *argv[])
11
{
12
13
matrix_TYP **Mat, *T, *Red;
14
int i, anz;
15
16
17
read_header(argc, argv);
18
if(FILEANZ != 1)
19
{
20
printf("Usage: %s 'file' [-t]\n",argv[0]);
21
printf("\n");
22
printf("file: matrix_TYP containing a set of symmetric positive definite matrices.\n");
23
printf("\n");
24
printf("Reduces all matrices in file by the Minkowski reduction algorithm.\n");
25
printf("WARNING: The algorithm might be very slow for some examples. In almost\n");
26
printf("all examples it pays to reduce the matrices by Pair_red before.\n");
27
printf("\n");
28
printf("Options:\n");
29
printf("-t : Give the transforming matrices as well, i.e. matrices\n");
30
printf(" T satisfying T^tr * F_old * T = F_new.\n");
31
printf("\n");
32
printf("Cf. Pair_red, Rform, Conj_bravais.\n");
33
printf("\n");
34
if (is_option('h')){
35
exit(0);
36
}
37
else{
38
exit(31);
39
}
40
}
41
Mat = mget_mat (FILENAMES[0], &anz);
42
if(anz > 1)
43
printf("#%d\n", anz);
44
for(i=0;i<anz;i++)
45
{
46
T = init_mat(Mat[i]->cols, Mat[i]->cols, "1");
47
Red = mink_red(Mat[i], T);
48
put_mat(Red, NULL, "reduced matrix", 2);
49
if(is_option('t') == TRUE)
50
put_mat(T, NULL, "Transformation matrix", 0);
51
free_mat(Red);
52
free_mat(T);
53
}
54
55
exit(0);
56
}
57
58