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 "defs.h"
2
3
# define PSP 500000
4
# define SVSP 100000
5
# define NPT 32767
6
# define MB 80
7
# define TRSP 2000000
8
/* TRSP is the space of the array used to store the coset reps, which are
9
stored using a tree structure.
10
*/
11
12
char inf0[80],inf1[80],inf2[80],inf3[80],outf1[80], outf2[80],outf3[80],
13
temp1[90],temp2[90],
14
/* inf1 is gpname.?1 (no default)
15
inf2 is gpname.?2 (no default, the subgroup of inf1 for which transversal
16
is to be computed).
17
Defaults: inf3 gpname.pg
18
outf1 inf3.nr
19
outf2 gpname.dcr
20
outf3 gpname.cr.
21
inf0 is used to remember the gpname alone.
22
*/
23
ofstr[2],ngn[8],expg,exph,cr,dcr,hg,triv,cong;
24
int psp=PSP,trsp=TRSP,svsp=SVSP;
25
int mpt=NPT,mb=MB,nfuse,
26
tree[TRSP],perm[PSP],gorb[NPT+1],lorbg[MB],lorbh[MB],base[MB],
27
fpt[MB],bpt[MB],coh_index[MB+1],*cp[10*NPT],*trad[MB],*sv[SVSP],
28
*tailad[MB],**cpad[MB],**svgptr[MB],**svhptr[MB];
29
30
int
31
main (int argc, char *argv[])
32
{ int arg; char c,err; int d;
33
err=0; cong=0; arg=1; hg=0; cr=0; expg=0; exph=0; dcr=0; nfuse= -1;
34
if (argc<=arg) {err=1; goto error;}
35
while (argv[arg][0]=='-')
36
{ c=argv[arg][1]; if (c=='c') cr=1;
37
else if (c=='g') cong=1;
38
else if (c=='e')
39
{ d=argv[arg][2]; if (d=='g') expg=1; else if (d=='h') exph=1;
40
else {err=1; goto error;}
41
}
42
else if (c=='d')
43
{ dcr=1; hg=1; d=argv[arg][2]; if (d!='\0')
44
{ d-='0'; if (d<0 || d>9) {err=1;goto error;} ofstr[1]='\0'; nfuse=d;}
45
}
46
else if (c=='h') hg=2;
47
else {err=1; goto error;}
48
arg++; if (argc<=arg) {err=1; goto error;}
49
}
50
if (argc<=arg+2) {err=1; goto error;}
51
strcpy(inf1,argv[arg]); strcat(inf1,"."); strcpy(inf2,inf1);
52
strcpy(inf3,inf1); strcpy(outf1,inf1); strcpy(outf3,inf1); strcpy(outf2,inf1);
53
strcpy(inf0,inf1); strcpy(temp1,inf1); strcpy(temp2,inf1);
54
strcat(temp1,"conpt"); strcat(temp2,"crt");
55
strcat(inf1,argv[arg+1]);
56
arg+=2; if (strcmp(argv[arg],"triv")==0) triv=1;
57
else {triv=0; strcat(inf2,argv[arg]);}
58
if (hg)
59
{ arg++;
60
if (argc<=arg) strcat(inf3,"pg");
61
else
62
strcat(inf3,argv[arg]);
63
}
64
if (dcr)
65
{ arg++; if (argc<=arg) strcat(outf2,"dcr"); else strcat(outf2,argv[arg]); }
66
if (cr)
67
{ arg++; if (argc<=arg) strcat(outf3,"cr"); else strcat(outf3,argv[arg]);}
68
if (dcr && nfuse>=0)
69
{arg++; if (argc<=arg) strcpy(ngn,"ng"); else strcpy(ngn,argv[arg]);}
70
if (hg && dcr==0)
71
{ arg++;
72
if (argc<=arg) {strcpy(outf1,inf3);strcat(outf1,".nr");}
73
else strcat(outf1,argv[arg]);
74
}
75
if (cnprg1()== -1) exit(1);
76
if (hg || cong) if (cnprg2()== -1) exit(1);
77
error: if (err)
78
{ fprintf(stderr,"Usage:\n");
79
fprintf(stderr,"conrun [-g] [-c] [-d(n)] [-h] [-eg] [-eh]\n");
80
fprintf(stderr,
81
"gpname inf1 inf2 (if -h [inf3]) [outf2(dcr)] [outf3(cr)].\n");
82
exit(1);
83
}
84
exit(0);
85
}
86
87