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 <matrix.h>3#include <longtools.h>4#include <zass.h>5#include <tools.h>6#include <graph.h>789101112/* ----------------------------------------------------------------------------- */1314151617int obergruppenzahl(matrix_TYP *L,18matrix_TYP **Norm,19matrix_TYP **NormInv,20matrix_TYP **StabStdCoz,21int Stab_anz,22int *wort)23{24matrix_TYP *N, *NL, **orbit, *tmp;2526int i, j, k, counter;272829/* Normalisatorelement, welches zum Standardvertreter konjugiert */30if (wort != NULL){31N = init_mat(Norm[0]->rows, Norm[0]->rows, "1");32for (i = 1; i <= wort[0]; i++){33mat_muleq(N, Norm[wort[i]]);34}35NL = mat_mul(N, L);36free_mat(N);37}38else{39NL = copy_mat(L);40}4142/* transformiere Gitter */43long_col_hnf(NL);4445/* Berechne Bahn */46counter = 1;47orbit = (matrix_TYP **)calloc(32, sizeof(matrix_TYP *));48orbit[0] = NL;49for (i = 0; i < counter; i++){50for (j = 0; j < Stab_anz; j++){51tmp = mat_mul(StabStdCoz[j], orbit[i]);52long_col_hnf(tmp);53for (k = 0; k < counter; k++){54if (cmp_mat(tmp, orbit[k]) == 0)55break;56}57if (k == counter){58orbit[counter] = tmp;59counter++;60if (counter % 32 == 0)61orbit = (matrix_TYP **)realloc(orbit, (counter + 32) * sizeof(matrix_TYP *));62}63else{64free_mat(tmp);65}66}67}6869/* Aufraeumen */70for (i = 0; i < counter; i++)71free_mat(orbit[i]);72free(orbit);7374return(counter);75}767778798081828384