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: 418346/****************************************************************************1**2*A collect_relations.c ANUPQ source Eamonn O'Brien3**4*Y Copyright 1995-2001, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany5*Y Copyright 1995-2001, School of Mathematical Sciences, ANU, Australia6**7*/89#include "pq_defs.h"10#include "pcp_vars.h"11#include "pq_functions.h"1213/* collect defining relations and solve corresponding equations;14a commutator relation is stored with a negative length */1516void collect_relations(struct pcp_vars *pcp)17{18register int *y = y_address;1920register int i;21register int j;22register int k;23register int p1;24register int length;25register int cp, cp1, cp2;2627register int relp = pcp->relp;28register int ndrel = pcp->ndrel;29register int lastg = pcp->lastg;3031for (i = 1; i <= ndrel; ++i) {3233/* space is required for two collected parts set up here34and possibly for 5 * pcp->lastg in collect_def_comm */35if (is_space_exhausted(7 * lastg + 7, pcp))36return;3738cp1 = pcp->lused;39cp2 = cp1 + lastg;4041/* original zero out -- bug reported by John Cannon October 1998 */42/*43for (j = 1; j <= lastg; ++j)44y[cp1 + j] = y[cp2 + j] = 0;45*/4647for (j = 1; j <= 2; ++j) {48p1 = y[++relp];49if (p1 != 0) {50cp = (j == 1) ? cp1 : cp2;51/* bug fix */52for (k = 1; k <= lastg; ++k)53y[cp + k] = 0;54length = y[p1];55/* is the relation a word or a commutator? */56if (length > 0)57collect_gen_word(p1, length, cp, pcp);58else if (length < 0) {59/* we may need to update pcp->lused, as space immediately60above it is used in commutator routines */61if (j == 2)62pcp->lused += lastg;63collect_def_comm(p1, cp, pcp);64if (j == 2)65pcp->lused -= lastg;66}67if (!pcp->valid)68return;69}70}7172echelon(pcp);73if ((pcp->fullop && pcp->eliminate_flag) || pcp->diagn)74text(1, i, 0, 0, 0);75if (pcp->overflow || pcp->complete != 0)76return;77}78}798081