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

563645 views
1
#include "defs.h"
2
3
# define PSP 1000000
4
# define SPACE 3200000
5
# define SVSP 50000
6
# define NPT 100001
7
# define MP 500
8
# define MB 80
9
# define MREL 1024
10
# define DNWDS MREL/32
11
/* SPACE is space available for coset enumeration.
12
MREL is max no of relations allowed.
13
We will be using a boolean array done on the relator set, so DNWDS is the
14
max no. of 32 bit words we need for the relator set.
15
*/
16
17
char inf[80],outf[80],outfg[80],firstnew,gap;
18
/* Default inf=gpname.outperm
19
outf=inf.rel anyway.
20
*/
21
int imsp[SPACE],*done[DNWDS],*imcos[MP];
22
int perm[PSP],sv[SVSP],cp[5*NPT],orb[NPT+1],
23
base[MB],lorb[MB],pno[MP/2],*pptr[MP],*svptr[MB],
24
inv[MP],rno[MB],mp=MP,mrel=MREL,
25
dnwds=DNWDS,mpt=NPT,mb=MB;
26
int psp=PSP,space=SPACE,svsp=SVSP;
27
28
int
29
main (int argc, char *argv[])
30
{ int arg; char c,err;
31
err=0; firstnew=0; arg=1; gap=0;
32
if (argc<=arg) {err=1; goto error;}
33
while (argv[arg][0]=='-')
34
{ c=argv[arg][1];
35
if (c=='g') gap=1;
36
else if (c=='f') firstnew=1;
37
else {err=1; goto error;}
38
arg++; if (argc<=arg) {err=1; goto error;}
39
}
40
strcpy(inf,argv[arg]); strcat(inf,".");
41
if (gap) {strcpy(outfg,inf); strcat(outfg,"relg");}
42
arg++; if (argc<=arg) strcat(inf,"outperm"); else strcat(inf,argv[arg]);
43
strcpy(outf,inf); strcat(outf,".rel");
44
if (grprog()== -1) exit(1);
45
error: if (err)
46
{ fprintf(stderr,"Usage: grrun [-f] [-g] gpname [inf]\n");
47
exit(1);
48
}
49
exit(0);
50
}
51
52