Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
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
Project: cocalc-sagemath-dev-slelievre
Views: 418346/* author: Oliver Heidbuechel */1/* last change: 14.09.2000 */234#include <ZZ.h>5#include<typedef.h>6#include<getput.h>7#include<matrix.h>8#include<longtools.h>9#include<tools.h>10#include"zass.h"11#include <base.h>12#include <bravais.h>13#include <graph.h>14#include <presentation.h>15161718int INFO_LEVEL;19extern int SFLAG;20boolean GRAPH_DEBUG;212223main (int argc, char *argv[])24{25matrix_TYP **presentation,26*erg,27**base;2829bahn **strong;3031bravais_TYP *G;3233Q_data_TYP *data;3435int i,36panz,37OPT[6],38U[6], O[6];39404142read_header(argc, argv);43if (FILEANZ < 1 || FILEANZ > 2 || (is_option('h') && optionnumber('h') == 0)){44printf("\n");45printf("Usage: %s 'file1' [-h] [-o] [-i] [-f] ['file2']\n",argv[0]);46printf("\n");47printf("file1: REDUCED pointgroup G with CORRECT order\n");48printf("file2: (Optional) Presentation of G\n");49printf("\n");50printf("Calculates the graph of inclusions of the Q-class given by G.\n");51printf("For further information on the output see example 13 of\n");52printf("the CARAT introduction (http://wwwb.math.rwth-aachen.de/carat).\n");53printf("\n");54printf("Options:\n");55printf("-h : Give this help.\n");56printf("-o : Do not calculate the corresponding supergroup numbers.\n");57printf(" The programm is faster then.\n");58printf("-i : Print the Z-classes to 'file1.i' and the affine classes\n");59printf(" to 'file1.i.j',\n");60printf("-f : Recalculate the formspace even if it is given.\n");61printf("-d : Only for debugging!\n");62printf("\n");63printf("CAUTION: If the formspace and the normalizer are given,\n");64printf(" they have to be correct.\n");65printf("\n");66printf("Cf.: KSupergroups, KSubgroups\n");67printf("\n");68exit(11);69}7071INFO_LEVEL = optionnumber('h');72if (INFO_LEVEL & 12){73SFLAG = 1;74}7576/* get data */77G = get_bravais(FILENAMES[0]);787980/* trivial cases */81if (G->order == 0){82printf("There is 1 Z-Class with 1 Space Group!\n");83erg = init_mat(1,1,"");84put_mat(erg,0,0,0);85free_mat(erg);86free_bravais(G);87exit(0);88}89if (G->order == 2){90for (i = 0 ; i < G->gen_no; i++){91if (!G->gen[i]->flags.Scalar){92break;93}94}95if (i == G->gen_no){96U[0] = 2; U[1] = 6; U[2] = 14; U[3] = 30; U[4] = 62; U[5] = 126;97O[0] = 1; O[1] = 3; O[2] = 7; O[3] = 15; O[4] = 31; O[5] = 63;98printf("There is 1 Z-Class with 1 Space Group!\n");99printf("1: 1 (%i", U[G->dim - 1]);100if (!is_option('o'))101printf(", %i", O[G->dim - 1]);102printf(", 2^1)\n");103erg = init_mat(1,1,"1");104put_mat(erg,0,0,0);105free_bravais(G);106free_mat(erg);107exit(0);108}109}110111/* get more data */112if (FILEANZ == 2){113presentation = mget_mat(FILENAMES[1],&panz);114if (panz > 1){115fprintf(stderr, "You should only give a single matrix as presention!\n");116exit(12);117}118}119else{120base = get_base(G);121strong = strong_generators(base,G,TRUE);122presentation = (matrix_TYP **)calloc(1, sizeof(matrix_TYP *));123OPT[0] = 0;124presentation[0] = pres(strong, G, OPT);125}126if (G->form == NULL || G->form_no == 0 || is_option('f')){127if (G->form != NULL){128for (i=0; i< G->form_no; i++)129free_mat(G->form[i]);130free(G->form);131}132G->form = formspace(G->gen,G->gen_no,1, &G->form_no);133}134if (is_option('d')){135GRAPH_DEBUG = TRUE;136}137data = get_Q_data(G, presentation[0], is_option('l'));138139/* write informations about the Q-class */140put_Q_data(data, FILENAMES[0], is_option('i'));141142/* calculate the graph */143erg = subgroupgraph(data, !is_option('o'));144put_mat(erg,0,0,0);145146147/* clean up */148free_mat(erg);149free_Q_data(data);150free_mat(presentation[0]);151free(presentation);152if (FILEANZ == 1){153for (i = 0; i < G->dim; i++){154free_mat(base[i]);155free_bahn(strong[i]);156free(strong[i]);157}158free(strong);159free(base);160}161free_bravais(G);162163/* for debugging */164if (INFO_LEVEL & 12){165fprintf(stderr,"write pointer_statistics\n");166pointer_statistics(0,0);167}168169exit(0);170}171172173174175176177178179