#define MAX_INTERACTIVE_OPTION 18/* maximum number of menu options */
#define COMBINATION 100
/* interactive menu for p-group generation */
void interactive_pga(Logical group_present,
FILE *StartFile, int group_nmr, int ***auts, struct pga_vars *pga, struct pcp_vars *pcp)
{ struct pga_vars flag; int option;
Logical soluble_group = TRUE;
FILE *OutputFile = 0;
FILE *LINK_input = 0;
char *StartName = 0; int t;
int **perms = 0; int index; int **S = 0; int k; int K; int label; int *a = 0, *b = 0; char *c = 0; int *orbit_length = 0; int nmr_of_exponents; int *subset = 0; int alpha; int upper_step; int rep; int i;
list_interactive_pga_menu();
do {
option = read_option(MAX_INTERACTIVE_OPTION); switch (option) {
if (pga->s > upper_step)
printf("Desired step size is invalid for current group\n"); else { if (pga->s < upper_step) {
printf("The permitted relative step sizes range from %d to %d\n",
pga->s,
upper_step);
read_value( TRUE, "Input the chosen relative step size: ", &pga->s, 0);
}
#ifdefined(GAP_LINK_VIA_FILE) if (!soluble_group)
CloseFile(LINK_input); #endif
t = runTime() - t;
printf("Time to compute permutations is %.2f seconds\n",
t * CLK_SCALE);
} else
printf("You must first select option %d\n", DEGREE);
break;
case ORBITS:
orbit_option(option, perms, &a, &b, &c, &orbit_length, pga); break;
case STABILISERS: case STABILISER:
assert(perms);
stabiliser_option(
option, auts, perms, a, b, c, orbit_length, pga, pcp); /* free_space(pga->soluble,perms,orbit_length, a,b,c,pga);
*/ break;
case MATRIX_TO_LABEL:
S = allocate_matrix(pga->s, pga->q, 0, FALSE);
subset = allocate_vector(pga->s, 0, FALSE);
printf("Input the %d x %d subgroup matrix:\n", pga->s, pga->q);
read_matrix(S, pga->s, pga->q);
K = echelonise_matrix(S, pga->s, pga->q, pga->p, subset, pga);
printf("The standard matrix is:\n");
print_matrix(S, pga->s, pga->q);
printf("The label is %d\n", subgroup_to_label(S, K, subset, pga));
free_vector(subset, 0); break;
case LABEL_TO_MATRIX:
read_value(TRUE, "Input allowable subgroup label: ", &label, 1);
S = label_to_subgroup(&index, &subset, label, pga);
printf("The corresponding standard matrix is\n");
print_matrix(S, pga->s, pga->q); break;
case IMAGE:
t = runTime(); /* invert_automorphisms(auts,pga,pcp); print_auts(pga->m,pcp->lastg,auts,pcp);
*/
printf("Input the subgroup label and automorphism number: ");
read_value(TRUE, "", &label, 1);
read_value(FALSE, "", &alpha, 1);
printf("Image is %d\n", find_image(label, auts[alpha], pga, pcp));
t = runTime() - t;
printf("Computation time in seconds is %.2f\n", t * CLK_SCALE); break;
case SUBGROUP_RANK:
read_subgroup_rank(&k);
printf("Closure of initial segment subgroup has rank %d\n",
close_subgroup(k, auts, pga, pcp)); break;
case ORBIT_REP:
printf("Input label for subgroup: ");
read_value(TRUE, "", &label, 1);
rep = abs(a[label]); for (i = 1; i <= pga->nmr_orbits && pga->rep[i] != rep; ++i)
;
printf("Subgroup with label %d has representative %d and is in orbit " "%d\n",
label,
rep,
i); break;
case COMPACT_DESCRIPTION:
Compact_Description = TRUE;
read_value(TRUE, "Lower bound for order (0 for all groups generated)? ",
&Compact_Order, 0); break;
case AUT_CLASSES:
t = runTime();
permute_elements();
t = runTime() - t;
printf("Time to compute orbits is %.2f seconds\n", t * CLK_SCALE); break;
caseEXIT: case MAX_INTERACTIVE_OPTION:
printf("Exiting from interactive p-group generation menu\n"); break;
} /* switch */
} while (option != 0 && option != MAX_INTERACTIVE_OPTION);
#ifdefined(GAP_LINK) if (!soluble_group)
QuitGap(); #endif
}
/* list available menu options */
void list_interactive_pga_menu(void)
{
printf("\nAdvanced Menu for p-Group Generation\n");
printf("-------------------------------------\n");
printf("%d. Read automorphism information for starting group\n",
SUPPLY_AUTS);
printf("%d. Extend and display automorphisms\n", EXTEND_AUTS);
printf("%d. Specify input file and group number\n", RESTORE_GP);
printf("%d. List group presentation\n", DISPLAY_GP);
printf("%d. Carry out intermediate stage calculation\n", SINGLE_STAGE);
printf("%d. Compute definition sets & find degree\n", DEGREE);
printf("%d. Construct permutations of subgroups under automorphisms\n",
PERMUTATIONS);
printf("%d. Compute and list orbit information\n", ORBITS);
printf("%d. Process all orbit representatives\n", STABILISERS);
printf("%d. Process individual orbit representative\n", STABILISER);
printf("%d. Compute label for standard matrix of subgroup\n",
MATRIX_TO_LABEL);
printf("%d. Compute standard matrix for subgroup from label\n",
LABEL_TO_MATRIX);
printf("%d. Find image of allowable subgroup under automorphism\n", IMAGE);
printf("%d. Find rank of closure of initial segment subgroup\n",
SUBGROUP_RANK);
printf("%d. List representative and orbit for supplied label\n", ORBIT_REP);
printf("%d. Write compact descriptions of generated groups to file\n",
COMPACT_DESCRIPTION);
printf("%d. Find automorphism classes of elements of vector space\n",
AUT_CLASSES);
printf("%d. Exit to main p-group generation menu\n", MAX_INTERACTIVE_OPTION);
}
void orbit_option(int option, int **perms, int **a, int **b, char **c, int **orbit_length, struct pga_vars *pga)
{ int t;
Logical soluble_group; /* FILE * file; */
if (option == STABILISER) {
read_value(TRUE, "Input the orbit representative: ", &rep[1], 1); /* find the length of the orbit having this representative */ for (i = 1; i <= pga->nmr_orbits && pga->rep[i] != rep[1]; ++i)
; if (pga->rep[i] == rep[1])
length[1] = orbit_length[i]; else {
printf("%d is not an orbit representative\n", rep[1]); return;
}
}
if (option == STABILISER)
setup_reps(rep, 1,
length,
perms,
a,
b,
c,
auts,
OutputFile,
OutputFile,
pga,
pcp); else
setup_reps(pga->rep,
pga->nmr_orbits,
orbit_length,
perms,
a,
b,
c,
auts,
OutputFile,
OutputFile,
pga,
pcp);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.