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 action.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 "constants.h"
12
#include "pcp_vars.h"
13
#include "pq_functions.h"
14
#include "standard.h"
15
#include "word_types.h"
16
17
/* specify automorphims in terms of defining generators
18
and compute resultant action on pc generators;
19
return action as array auts */
20
21
int ***determine_action(int format, int *nmr_of_auts, struct pcp_vars *pcp)
22
{
23
register int *y = y_address;
24
25
register int i, j, k;
26
int ***auts;
27
int cp, pcp_generator;
28
29
read_value(TRUE, "Input the number of automorphisms: ", nmr_of_auts, 0);
30
31
auts = allocate_array(*nmr_of_auts, pcp->lastg, pcp->lastg, TRUE);
32
33
cp = pcp->lused;
34
for (i = 1; i <= *nmr_of_auts; ++i) {
35
printf("Now enter the data for automorphism %d\n", i);
36
for (j = 1; j <= pcp->ndgen; ++j) {
37
pcp_generator = y[pcp->dgen + j];
38
printf("Input image of defining generator %d as word:\n", j);
39
setup_defgen_word_to_collect(stdin, format, ACTION, cp, pcp);
40
if (pcp_generator > 0) {
41
for (k = 1; k <= pcp->lastg; ++k)
42
auts[i][pcp_generator][k] = y[cp + k];
43
}
44
}
45
}
46
47
extend_automorphisms(auts, *nmr_of_auts, pcp);
48
print_auts(*nmr_of_auts, pcp->lastg, auts, pcp);
49
50
return auts;
51
}
52
53