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"orbit.h"
3
#include"getput.h"
4
#include"sort.h"
5
6
main (int argc, char *argv[])
7
{
8
9
matrix_TYP **Mat, *erg;
10
bravais_TYP *G;
11
int i, Manz, length;
12
int *option;
13
14
extern char **FILENAMES;
15
extern int FILEANZ;
16
17
read_header(argc, argv);
18
if(FILEANZ != 2)
19
{
20
printf("Usage: %s 'file1' 'file2' [-i] [-r] [-l] [-k] [-t] [-L=n] [-S=n] [-p] [-u]\n",argv[0]);
21
printf("\n");
22
printf("file1: matrix_TYP, contains matrices X_i forming a G-set (union of G-orbits)\n");
23
printf("file2: bravais_TYP, contains generators of a group G\n");
24
printf("\n");
25
printf("Calulates the orbit representatives of the G-orbits on {X_1,...},\n");
26
printf("where the action is specified by the options. Default option is action by\n");
27
printf("left multiplication.\n");
28
printf("\n");
29
printf("Options:\n");
30
printf("-i : Use the generators given in file2 and their\n");
31
printf(" inverses to calculate the orbit.\n");
32
printf("-r : Operate from the right.\n");
33
printf("-l : Operate from the left (default).\n");
34
printf("-k : Operate via conjugation, ie. x -> g x g^-1 \n");
35
printf("-L=n : Calculate at most n elements of the Orbit.\n");
36
printf(" 0 means infinity.\n");
37
printf("-S=n : If given as -S or -S=0 a generating set for\n");
38
printf(" the stabilizer is calculated. If given as\n");
39
printf(" -S=n at most n matrices of the stabilizer\n");
40
printf(" are calculated.\n");
41
printf("-p : Operate on pairs of the form {M,-M}.\n");
42
printf("-u : Operate on the set of rows of the matrix given\n");
43
printf(" in file1.\n");
44
printf("-g : Operate on sublattices of Z^n spanned by the columns of the \n");
45
printf(" matrices gX with g in G.\n");
46
printf("-f : Operates on quadratic forms via x -> g^-tr x g^-1\n");
47
printf("\n");
48
printf("Cf. Orbit.\n");
49
if (is_option('h')){
50
exit(0);
51
}
52
else{
53
exit(31);
54
}
55
}
56
Mat = mget_mat (FILENAMES[0], &Manz);
57
G = get_bravais(FILENAMES[1]);
58
option = make_orbit_options();
59
mat_quicksort(Mat, 0, Manz-1, mat_comp);
60
erg = orbit_representatives(Mat, Manz, G, option, &length, 1);
61
printf("#%d\n", length);
62
for(i=0;i<length;i++)
63
put_mat(Mat[erg->array.SZ[0][i]], NULL, "", 2);
64
printf(" length of i-th orbit is\n");
65
for(i=0;i<length;i++)
66
printf("%d, ", erg->array.SZ[1][i]);
67
printf("\n");
68
69
exit(0);
70
}
71
72