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 find_image.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
#include "pga_vars.h"
13
#include "pq_functions.h"
14
15
/* find the image of the allowable subgroup having supplied label under
16
the action of automorphism; compute and return its label */
17
18
int
19
find_image(int label, int **auts, struct pga_vars *pga, struct pcp_vars *pcp)
20
{
21
int index;
22
int **A;
23
int **Image, **Image_transpose;
24
int **S, **S_transpose;
25
int *subset;
26
int K;
27
28
subset = allocate_vector(pga->s, 0, 0);
29
30
A = allocate_matrix(pga->q, pga->q, 0, FALSE);
31
assemble_matrix(A, pga->q, auts, pcp);
32
33
S = label_to_subgroup(&index, &subset, label, pga);
34
S_transpose = transpose(S, pga->s, pga->q);
35
Image_transpose =
36
multiply_matrix(A, pga->q, pga->q, S_transpose, pga->s, pga->p);
37
Image = transpose(Image_transpose, pga->q, pga->s);
38
K = echelonise_matrix(Image, pga->s, pga->q, pga->p, subset, pga);
39
40
free_matrix(A, pga->q, 0);
41
free_matrix(S, pga->s, 0);
42
free_matrix(S_transpose, pga->q, 0);
43
free_matrix(Image_transpose, pga->q, 0);
44
45
label = subgroup_to_label(Image, K, subset, pga);
46
free_matrix(Image, pga->s, 0);
47
free_vector(subset, 0);
48
49
return label;
50
}
51
52