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

563516 views
1
#include"typedef.h"
2
#include"getput.h"
3
#include"bravais.h"
4
#include"matrix.h"
5
6
main (int argc, char *argv[])
7
{
8
int anz,
9
anz2,
10
i;
11
12
char comment[1000];
13
14
matrix_TYP **Formen,
15
**A,
16
*tmp;
17
18
read_header(argc, argv);
19
if(FILEANZ < 2 || is_option('h'))
20
{
21
printf("Usage: Normlin file1 file2\n");
22
printf("\n");
23
printf("where file1 and file2 contain a matrix_TYP.\n");
24
printf("\n");
25
printf("Calculates for each matrix A in 'file2' a matrix X with the\n");
26
printf("property that\n");
27
printf(" \\sum_j X_{i,j} F_j = A^{tr} F_j A with F_j in 'file1'\n");
28
printf("\n");
29
printf("CAUTION: The matrix describes the action on rows!\n");
30
printf("\n");
31
if (is_option('h')){
32
exit(0);
33
}
34
else{
35
exit(31);
36
}
37
}
38
39
Formen = mget_mat(FILENAMES[0],&anz);
40
A = mget_mat(FILENAMES[1],&anz2);
41
42
for (i=0;i<anz2;i++){
43
tmp = normlin(Formen,A[i],anz);
44
sprintf(comment,"Normalin for %d-th matrix of %s on the formspace %s",
45
i+1,FILENAMES[1],FILENAMES[2]);
46
Check_mat(tmp);
47
put_mat(tmp,NULL,comment,2);
48
free_mat(tmp);
49
}
50
51
exit(0);
52
}
53
54