Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

563640 views
1
#include <typedef.h>
2
#include <base.h>
3
#include <matrix.h>
4
#include <longtools.h>
5
#include <zass.h>
6
#include <tools.h>
7
#include <graph.h>
8
9
10
11
12
13
/* ----------------------------------------------------------------------------- */
14
15
16
17
18
int obergruppenzahl(matrix_TYP *L,
19
matrix_TYP **Norm,
20
matrix_TYP **NormInv,
21
matrix_TYP **StabStdCoz,
22
int Stab_anz,
23
int *wort)
24
{
25
matrix_TYP *N, *NL, **orbit, *tmp;
26
27
int i, j, k, counter;
28
29
30
/* Normalisatorelement, welches zum Standardvertreter konjugiert */
31
if (wort != NULL){
32
N = init_mat(Norm[0]->rows, Norm[0]->rows, "1");
33
for (i = 1; i <= wort[0]; i++){
34
mat_muleq(N, Norm[wort[i]]);
35
}
36
NL = mat_mul(N, L);
37
free_mat(N);
38
}
39
else{
40
NL = copy_mat(L);
41
}
42
43
/* transformiere Gitter */
44
long_col_hnf(NL);
45
46
/* Berechne Bahn */
47
counter = 1;
48
orbit = (matrix_TYP **)calloc(32, sizeof(matrix_TYP *));
49
orbit[0] = NL;
50
for (i = 0; i < counter; i++){
51
for (j = 0; j < Stab_anz; j++){
52
tmp = mat_mul(StabStdCoz[j], orbit[i]);
53
long_col_hnf(tmp);
54
for (k = 0; k < counter; k++){
55
if (cmp_mat(tmp, orbit[k]) == 0)
56
break;
57
}
58
if (k == counter){
59
orbit[counter] = tmp;
60
counter++;
61
if (counter % 32 == 0)
62
orbit = (matrix_TYP **)realloc(orbit, (counter + 32) * sizeof(matrix_TYP *));
63
}
64
else{
65
free_mat(tmp);
66
}
67
}
68
}
69
70
/* Aufraeumen */
71
for (i = 0; i < counter; i++)
72
free_mat(orbit[i]);
73
free(orbit);
74
75
return(counter);
76
}
77
78
79
80
81
82
83
84