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/**************************************************************************23al1.h4Colin Ramsay ([email protected])56 Dec 0067ADVANCED COSET ENUMERATOR, Version 3.00189Copyright 200010Centre for Discrete Mathematics and Computing,11Department of Mathematics and12Department of Computer Science & Electrical Engineering,13The University of Queensland, QLD 4072.14(http://staff.itee.uq.edu.au/havas)1516This is the header file for Level 1 of ACE; that is, a set of basic17wrapper routines round the core enumerator. This can also be thought of as18a simple interface between application programmes (eg, ACE Level 2) and the19clever bits.2021**************************************************************************/2223#include "al0.h"2425#define LLL 75 /* Approx limit on output line length */2627/******************************************************************28The memory for the coset table is currently allocated as one29contiguous block. This is done by the user; Level 1 expects to be30`handed' the workspace for the table, pointed to by costable.31DEFWORK should be used as the default number of words (i.e.,32entries) in toto. The size is indicated via a size/multiplier33combination (workspace/workmult). The usual K/M/G multipliers are34used, with a choice of meanings to suit computer scientists, or35engineers, or mathematicians. The default (under pressure) is to36use powers of 10. While coset numbers are limited to 2G, table37sizes can exceed the 32-bit limit. tabsiz indicates the maximum38number of rows which can (safely) be fitted into the allocated39space (depends on ncol); if this works out to less than 2, the40_start() function will complain.41******************************************************************/4243#define DEFWORK 10000004445#ifdef AL1_BINARY46# define KILO 102447# define MEGA 104857648# define GIGA 107374182449#else50# define KILO 100051# define MEGA 100000052# define GIGA 100000000053#endif5455extern int workspace, workmult, *costable;56extern int tabsiz;5758/******************************************************************59The group relations and subgroup generators are stored as linked60lists. Each item on the list consists of an array of generators61(i.e., the word), along with its total length, its exponent &62whether or not it was enter as x^2 (ie, as an involn). In the63words, -ve numbers represent inverses. The word starts at word[1].64Each list has a header containing the list's length and head/tail65pointers.66******************************************************************/6768typedef struct Wlelt69{70int *word; /* array of generators */71int len, exp; /* total length, and exponent */72Logic invol; /* ?entered as an involution */73struct Wlelt *next; /* next in list */74}75Wlelt; /* word list element */7677typedef struct78{79int len; /* list length */80Wlelt *first, *last; /* head & tail of list */81}82Wlist; /* word list */8384/******************************************************************85We find coset rep's by backtracing the table. currrep is the86currently active rep've, repsiz is its size & repsp is the space87allocated to currrep. Note that the rep is in terms of columns!88******************************************************************/8990extern int *currrep, repsiz, repsp;9192/******************************************************************93Logic control variables for current enumeration.94******************************************************************/9596extern Logic asis; /* TRUE: use presentation as given. FALSE:97reduce/reorder relations/generators. */9899/******************************************************************100Group stuff:101******************************************************************/102103extern char *grpname; /* Enumeration (i.e., group) name */104extern Wlist *rellst; /* The group's relator list */105extern int trellen; /* Total list length */106107extern int ndgen; /* Number of group generators */108extern Logic *geninv; /* Are generators involutions? */109extern int *gencol; /* Translates +/- gen'r nos to columns */110extern int *colgen; /* col nos to +/- gen'r nos */111112extern Logic galpha; /* True if the generators are letters */113extern char algen[28]; /* Translate generator number (1..ndgen, in114its order of entry) to its letter (ie, 'a'...'z').115A printable string, hence 1+26+1=28 posns! */116extern int genal[27]; /* Translate generator letter (where a=1,117etc) to its order of entry (ie, number). */118119/******************************************************************120Subgroup stuff:121******************************************************************/122123extern char *subgrpname; /* Subgroup name */124extern Wlist *genlst; /* The subgroup's renerator list */125extern int tgenlen; /* Total list length */126127/******************************************************************128Many of the Level 0 parameters can be set directly. However, some129of them have slightly different meanings at Level 1 (eg, a special130value can be used to indicate a `default'), or can effect a131continuing enumeration. All of the following variables are132`aliases' for Level 0 parameters, and it is up to the _start()133function to decide when & how they should be transferred to their134Level 0 namesakes.135******************************************************************/136137extern int rfactor1, cfactor1;138extern int pdsiz1, dedsiz1;139extern int maxrow1, ffactor1, nrinsgp1;140141/******************************************************************142Externally visible functions defined in util1.c143******************************************************************/144145void al1_init(void);146void al1_dump(Logic);147void al1_prtdetails(int);148void al1_rslt(int);149Wlist *al1_newwl(void);150Wlelt *al1_newelt(void);151void al1_addwl(Wlist*, Wlelt*);152void al1_concatwl(Wlist*, Wlist*);153void al1_emptywl(Wlist*);154void al1_prtwl(Wlist*, int);155Logic al1_addrep(int);156Logic al1_bldrep(int);157int al1_trrep(int);158int al1_ordrep(void);159void al1_prtct(int, int, int, Logic, Logic);160161/******************************************************************162Externally visible functions defined in control.c163******************************************************************/164165int al1_start(int);166167168169