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#include"typedef.h"1#include"orbit.h"2#include"getput.h"3#include"sort.h"45main (int argc, char *argv[])6{78matrix_TYP **Mat, *erg;9bravais_TYP *G;10int i, Manz, length;11int *option;1213extern char **FILENAMES;14extern int FILEANZ;1516read_header(argc, argv);17if(FILEANZ != 2)18{19printf("Usage: %s 'file1' 'file2' [-i] [-r] [-l] [-k] [-t] [-L=n] [-S=n] [-p] [-u]\n",argv[0]);20printf("\n");21printf("file1: matrix_TYP, contains matrices X_i forming a G-set (union of G-orbits)\n");22printf("file2: bravais_TYP, contains generators of a group G\n");23printf("\n");24printf("Calulates the orbit representatives of the G-orbits on {X_1,...},\n");25printf("where the action is specified by the options. Default option is action by\n");26printf("left multiplication.\n");27printf("\n");28printf("Options:\n");29printf("-i : Use the generators given in file2 and their\n");30printf(" inverses to calculate the orbit.\n");31printf("-r : Operate from the right.\n");32printf("-l : Operate from the left (default).\n");33printf("-k : Operate via conjugation, ie. x -> g x g^-1 \n");34printf("-L=n : Calculate at most n elements of the Orbit.\n");35printf(" 0 means infinity.\n");36printf("-S=n : If given as -S or -S=0 a generating set for\n");37printf(" the stabilizer is calculated. If given as\n");38printf(" -S=n at most n matrices of the stabilizer\n");39printf(" are calculated.\n");40printf("-p : Operate on pairs of the form {M,-M}.\n");41printf("-u : Operate on the set of rows of the matrix given\n");42printf(" in file1.\n");43printf("-g : Operate on sublattices of Z^n spanned by the columns of the \n");44printf(" matrices gX with g in G.\n");45printf("-f : Operates on quadratic forms via x -> g^-tr x g^-1\n");46printf("\n");47printf("Cf. Orbit.\n");48if (is_option('h')){49exit(0);50}51else{52exit(31);53}54}55Mat = mget_mat (FILENAMES[0], &Manz);56G = get_bravais(FILENAMES[1]);57option = make_orbit_options();58mat_quicksort(Mat, 0, Manz-1, mat_comp);59erg = orbit_representatives(Mat, Manz, G, option, &length, 1);60printf("#%d\n", length);61for(i=0;i<length;i++)62put_mat(Mat[erg->array.SZ[0][i]], NULL, "", 2);63printf(" length of i-th orbit is\n");64for(i=0;i<length;i++)65printf("%d, ", erg->array.SZ[1][i]);66printf("\n");6768exit(0);69}707172