Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
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
Project: cocalc-sagemath-dev-slelievre
Views: 4183461/**************************************************************************23snippets.c45Bits of code that, at one time or another, were in ACE.67**************************************************************************/89/******************************************************************10Mode 5 in an experimental mode where we specify the percentage of11deductions to be stacked via dedper. So we will, in general, run12an RA phase at the end of the enumeration. If the number of cosets13doesn't blow out to badly, then we could achieve a significant14speed-up; without the complications of PACE's parallelisation.1516This code might more properly be in PACE, which is intended as a17test-bed for various dedn handling strategies (incl the `parallel'18stategy!).1920Note that we also need to declare dedper in al0.h, define it in21enum.c, initialise it, and print it out in, eg, `dump:0;' &22`sr:1;'.23******************************************************************/2425/* The SAVED macro for dedmode #5 */2627#define SAVED(cos,gen) \28INCR(xsaved); \29if (dedmode == 5 && ((1 + (rand()%100)) > dedper)) \30{ disded = TRUE; } \31else \32{ \33if (topded >= dedsiz-1) \34{ \35INCR(sdoflow); \36switch(dedmode) \37{ \38case 3: \39disded = TRUE; \40topded = -1; \41break; \42case 4: \43case 5: \44al0_dedn(cos,gen); \45break; \46default: \47disded = TRUE; \48break; \49} \50} \51else \52{ \53dedrow[++topded] = cos; \54dedcol[topded] = gen; \55} \56} \57SAVED00;5859/* The `dmod' parsing */6061if (al2_match("ded mo[de]") || al2_match("dmod[e]"))62{63al2_readia();64al2_endcmd();6566if (intcnt == 0)67{68fprintf(fop, "deduction mode = %d", dedmode);69if (dedmode == 5)70{ fprintf(fop, " (%d%%)", dedper); }71fprintf(fop, "\n");72}73else if (intcnt == 1)74{75if (intarr[0] < 0 || intarr[0] > 5)76{ al2_continue("bad mode parameter"); }77dedmode = intarr[0];78dedper = 50; /* default is 1/2 the dedns */79}80else if (intcnt == 2)81{82if (intarr[0] != 5)83{ al2_continue("too many parameters"); }84if (intarr[1] < 0 || intarr[1] > 100)85{ al2_continue("bad percentage parameter"); }86dedmode = intarr[0];87dedper = intarr[1];88}89else90{ al2_continue("bad parameter count"); }9192continue;93}9495/******************************************************************96******************************************************************/9798/******************************************************************99******************************************************************/100101/******************************************************************102******************************************************************/103104/******************************************************************105******************************************************************/106107108109