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

563665 views
1
#include<typedef.h>
2
#include<base.h>
3
#include<graph.h>
4
#include<zass.h>
5
#include<tsubgroups.h>
6
#include<matrix.h>
7
8
9
10
/* ------------------------------------------------------------------ */
11
/* Berechne fast die Punktgruppe des affinen Normalisators von R: */
12
/* nur Stab_{N_Gl_n(Z)(G)} (coz) ohne Punktgruppe von R */
13
/* ------------------------------------------------------------------ */
14
/* R: Raumgruppe in Standard_affine_form ohne Translationen */
15
/* P: Punktgruppe von R, P->gen und P->normal muessen */
16
/* zusammen den Normalisator von P in Gl_n(Z) erzeugen. */
17
/* (P->zentr wird nicht beruecksichtigt) */
18
/* pres: Praesentation von R */
19
/* anz: speichere die Anzahl der Matrizen dort */
20
/* ------------------------------------------------------------------ */
21
matrix_TYP **PoaN(bravais_TYP *R,
22
bravais_TYP *P,
23
matrix_TYP *pres,
24
int *anz)
25
{
26
matrix_TYP **N, *coz, **H_G_Z;
27
28
word *relator;
29
30
int i;
31
32
coz_TYP coz_info;
33
34
35
/* Vorbereitungen */
36
/* ============== */
37
relator = (word *)calloc(pres->rows, sizeof(word));
38
for (i = 0; i < pres->rows; i++){
39
matrix_2_word(pres, relator + i, i);
40
}
41
coz = extract_c(R);
42
43
/* calculate H^1(P, Q^n/Z^n) */
44
H_G_Z = calculate_H1(P, relator, pres->rows);
45
46
/* identify the cocyle */
47
coz_info = identify_coz(P, coz, H_G_Z);
48
49
/* get stabilizer */
50
N = coz_info.Stab;
51
coz_info.Stab = NULL;
52
anz[0] = coz_info.Stab_no;
53
54
/* Speicherfreigabe */
55
/* ================ */
56
free_mat(coz);
57
for (i = 0; i < 3; i++)
58
free_mat(H_G_Z[i]);
59
free(H_G_Z);
60
for (i = 0; i < pres->rows; i++)
61
wordfree(relator + i);
62
free(relator);
63
free_coz_TYP(coz_info);
64
65
return(N);
66
}
67
68