GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
#include<typedef.h>1#include<base.h>2#include<graph.h>3#include<zass.h>4#include<tsubgroups.h>5#include<matrix.h>6789/* ------------------------------------------------------------------ */10/* Berechne fast die Punktgruppe des affinen Normalisators von R: */11/* nur Stab_{N_Gl_n(Z)(G)} (coz) ohne Punktgruppe von R */12/* ------------------------------------------------------------------ */13/* R: Raumgruppe in Standard_affine_form ohne Translationen */14/* P: Punktgruppe von R, P->gen und P->normal muessen */15/* zusammen den Normalisator von P in Gl_n(Z) erzeugen. */16/* (P->zentr wird nicht beruecksichtigt) */17/* pres: Praesentation von R */18/* anz: speichere die Anzahl der Matrizen dort */19/* ------------------------------------------------------------------ */20matrix_TYP **PoaN(bravais_TYP *R,21bravais_TYP *P,22matrix_TYP *pres,23int *anz)24{25matrix_TYP **N, *coz, **H_G_Z;2627word *relator;2829int i;3031coz_TYP coz_info;323334/* Vorbereitungen */35/* ============== */36relator = (word *)calloc(pres->rows, sizeof(word));37for (i = 0; i < pres->rows; i++){38matrix_2_word(pres, relator + i, i);39}40coz = extract_c(R);4142/* calculate H^1(P, Q^n/Z^n) */43H_G_Z = calculate_H1(P, relator, pres->rows);4445/* identify the cocyle */46coz_info = identify_coz(P, coz, H_G_Z);4748/* get stabilizer */49N = coz_info.Stab;50coz_info.Stab = NULL;51anz[0] = coz_info.Stab_no;5253/* Speicherfreigabe */54/* ================ */55free_mat(coz);56for (i = 0; i < 3; i++)57free_mat(H_G_Z[i]);58free(H_G_Z);59for (i = 0; i < pres->rows; i++)60wordfree(relator + i);61free(relator);62free_coz_TYP(coz_info);6364return(N);65}666768