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

563648 views
1
#include "defs.h"
2
3
# define NPT 32767
4
# define PSP 2000000
5
# define SVSP 200000
6
# define MP 1000
7
# define MB 80
8
9
/* NPT = max no of points, MP = max no of perms, PSP = space for perms,
10
SVSP = space for Schreier vectors, MB-1 = max no of base pts.
11
*/
12
char wrd,nt,isbase,inf[80],outf1[80],outf2[80],fixed[NPT+1];
13
/* defaults: inf gpname.inperm
14
outf1 gpname.outperm
15
outf2 gpname.words
16
*/
17
short perm[PSP],sv[SVSP],cp[5*NPT],actgen[MP],orb[NPT+1],
18
base[MB],lorb[MB],order[MB],pno[MP/2], *pptr[MP],*svptr[MB],
19
mp=MP,mb=MB-1,mnpt=NPT;
20
int psp=PSP,svsp=SVSP;
21
22
int main(int argc, char *argv[])
23
{ short arg; char d,err;
24
nt=wrd=isbase=0; err=0; arg=1;
25
if (argc<=arg) {err=1; goto error;}
26
while (argv[arg][0]=='-')
27
{ d=argv[arg][1]; arg++;
28
if (d=='w') wrd=1; else if (d=='n') nt=1;
29
else if (d=='b') isbase=1;
30
else {err=1;goto error;}
31
if (argc<=arg) {err=1;goto error;}
32
}
33
strcpy(inf,argv[arg]); strcat(inf,"."); strcpy(outf1,inf);
34
if (wrd) {strcpy(outf2,inf); strcat(outf2,"words");}
35
arg++; if (argc<=arg) strcat(inf,"inperm"); else strcat(inf,argv[arg]);
36
arg++; if (argc<=arg) strcat(outf1,"outperm"); else strcat(outf1,argv[arg]);
37
if (gpprog()== -1) exit(1);
38
error:
39
if (err)
40
{ fprintf(stderr,"Usage: gprun [-n] [-w] [-b] gpname [inf] [outf1].\n");
41
exit(1);
42
}
43
else exit(0);
44
}
45
46