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: 418384
1
#include"typedef.h"
2
3
4
main (int argc, char *argv[])
5
{
6
7
matrix_TYP **x1, **x2, **S, *X;
8
int anz;
9
10
extern char **FILENAMES;
11
extern int FILEANZ;
12
13
extern matrix_TYP **mget_mat();
14
extern matrix_TYP *hyperbolic_isometry();
15
16
read_header(argc, argv);
17
if(FILEANZ != 3)
18
{
19
printf("usage: hypstab 'file1' 'file2' 'file3' ,\n");
20
printf("where 'file1' contains an 1 by n matrix x.\n");
21
printf("where 'file2' contains an 1 by n matrix y.\n");
22
printf("and 'file3' contains a n by n matrix S.\n");
23
printf("of sylvester Typ (-1, n-1) s.t. xSx^{tr} < 0 and ySy^{tr} < 0\n");
24
if (is_option('h')){
25
exit(0);
26
}
27
else{
28
exit(31);
29
}
30
}
31
x1 = mget_mat(FILENAMES[0], &anz);
32
x2 = mget_mat(FILENAMES[1], &anz);
33
S = mget_mat(FILENAMES[2], &anz);
34
X = hyperbolic_isometry(x1[0], x2[0], S[0]);
35
if(X == NULL)
36
printf("There exists no isometry\n");
37
else
38
put_mat(X, NULL, "isometry", 0);
39
40
41
exit(3);
42
}
43
44