CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

Views: 418386
1
#include"typedef.h"
2
#include"getput.h"
3
#include"bravais.h"
4
#include"matrix.h"
5
6
7
int SFLAG;
8
9
main (int argc, char *argv[])
10
{
11
int anz,
12
i;
13
14
matrix_TYP **F,
15
*tmp;
16
17
read_header(argc, argv);
18
if(FILEANZ != 1)
19
{
20
printf("usage: Inv file\n");
21
printf(" where file contains a matrix_TYP.\n");
22
printf("\n");
23
printf(" Inverts the matrices given in file.\n");
24
printf("\n");
25
printf("\n");
26
if (is_option('h')){
27
exit(0);
28
}
29
else{
30
exit(31);
31
}
32
}
33
34
if (is_option('h') && optionnumber('h')==12){
35
SFLAG = 1;
36
}
37
38
F = mget_mat(FILENAMES[0],&anz);
39
40
printf("#%d\n",anz);
41
42
for (i=0;i<anz;i++){
43
Check_mat(F[i]);
44
tmp = mat_inv(F[i]);
45
rat2kgv(tmp);
46
Check_mat(tmp);
47
put_mat(tmp,NULL,NULL,2);
48
free_mat(tmp);
49
free_mat(F[i]);
50
}
51
52
free(F);
53
if (is_option('h') && optionnumber('h')==12){
54
pointer_statistics(0,0);
55
}
56
57
exit(0);
58
}
59
60
61