CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

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

Views: 418346
1
/****************************************************************************
2
**
3
*A down_class.c ANUPQ source Eamonn O'Brien
4
**
5
*Y Copyright 1995-2001, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany
6
*Y Copyright 1995-2001, School of Mathematical Sciences, ANU, Australia
7
**
8
*/
9
10
#include "pq_defs.h"
11
#include "pcp_vars.h"
12
13
/* remove any class pcp->cc + 1 part on the value represented by y[ptr] */
14
15
void down_class(int ptr, struct pcp_vars *pcp)
16
{
17
register int *y = y_address;
18
19
register int p1;
20
register int p2;
21
register int count;
22
register int count1;
23
register int lastg = pcp->lastg;
24
#include "access.h"
25
26
p1 = ptr;
27
if (y[p1] >= 0) {
28
if (y[p1] > lastg)
29
y[p1] = 0;
30
return;
31
}
32
33
p2 = -y[p1];
34
count = y[p2 + 1];
35
count1 = count;
36
while (FIELD2(y[p2 + count1 + 1]) > lastg) {
37
if (--count1 <= 0) {
38
y[p2] = y[p1] = 0;
39
return;
40
}
41
}
42
43
if (count1 >= count)
44
return;
45
46
if (count == count1 + 1)
47
/* only 1 generator of class pcp->cc + 1 found; mark
48
it with a -1 header block */
49
y[p2 + count1 + 2] = -1;
50
else {
51
y[p2 + count1 + 2] = 0;
52
y[p2 + count1 + 3] = count - count1 - 2;
53
}
54
y[p2 + 1] = count1;
55
}
56
57