/* Parse the remaining arguments. */ switch (argc) { case0: break; case1: if (!isdigit(argv[0][0])) /* The only argument left is a file name. */
InputFile = argv[0]; else /* The only argument left is the class. */
Cl = atoi(argv[0]); /* TODO: Use strtol instead of atoi */ break; case2: /* Two arguments left. */
InputFile = argv[0];
Cl = atoi(argv[1]); /* TODO: Use strtol instead of atoi */ break; default:
usage((char *)0); break;
} if (Cl <= 0) usage("<class> must be positive.");
/* Open the input stream. */ if (strcmp(InputFile, "<stdin>") == 0) {
fp = stdin;
} else { if ((fp = fopen(InputFile, "r")) == NULL) {
perror(InputFile); exit(1);
}
}
/* Read in the finite presentation. */
Presentation(fp, InputFile); /* Set the number of generators. */
WordInit(Epimorphism);
InitEngel(leftEngel, rightEngel, revEngel, engel, nrEngelGens);
InitTrMetAb(trmetab);
InitPrint(stdout);
printHeader();
time = RunTime();
if (Gap) printf("NqLowerCentralFactors := [\n");
if (Gap & Verbose) fprintf(stderr, "#I Class 1:");
printf("# Calculating the abelian quotient ...\n");
InitEpim();
if (Gap & Verbose) {
fprintf(stderr, " %d generators with relative orders ",
Dimension[Class]); for (g = NrPcGens - Dimension[Class] + 1; g <= NrPcGens; g++)
fprintf(stderr, " %d", (int)(Exponent[g]));
fprintf(stderr, "\n");
}
printf("# The abelian quotient");
printf(" has %d generators\n", Dimension[Class]);
printf("# with the following exponents:"); for (g = NrPcGens - Dimension[Class] + 1; g <= NrPcGens; g++)
printf(" %d", (int)(Exponent[g]));
printf("\n"); if (Verbose) {
printf("# runtime : %ld msec\n", RunTime() - time);
printf("# total runtime : %ld msec\n", RunTime() - begin);
}
printf("#\n");
while (Class < Cl) {
time = RunTime(); if (Gap & Verbose) {
fprintf(stderr, "#I Class %d:", Class + 1);
}
printf("# Calculating the class %d quotient ...\n", Class + 1);
AddGenerators();
Tails();
Consistency();
if (NilpMult) OutputMatrix("nilp");
EvalAllRelations();
EvalEngel();
EvalTrMetAb();
if (NilpMult) OutputMatrix("mult");
ElimGenerators(); if (NrCenGens == 0) goto end;
ExtPcPres();
if (Gap & Verbose) {
fprintf(stderr, " %d generators", Dimension[Class]);
fprintf(stderr, " with relative orders:"); for (g = NrPcGens - Dimension[Class] + 1; g <= NrPcGens; g++)
fprintf(stderr, " %d", (int)(Exponent[g]));
fprintf(stderr, "\n");
}
printf("# Layer %d of the lower central series", Class);
printf(" has %d generators\n", Dimension[Class]);
printf("# with the following exponents:"); for (g = NrPcGens - Dimension[Class] + 1; g <= NrPcGens; g++)
printf(" %d", (int)(Exponent[g]));
printf("\n"); if (Verbose) {
printf("# runtime : %ld msec\n", RunTime() - time);
printf("# total runtime : %ld msec\n", RunTime() - begin);
}
printf("#\n");
}
end:
TimeOutOff();
if (printEpim) {
printf("\n\n# The epimorphism :\n");
PrintEpim();
printf("\n\n# The nilpotent quotient :\n");
PrintPcPres();
printf("\n\n# The definitions:\n");
PrintDefs();
}
printf("# total runtime : %ld msec\n", RunTime() - begin);
if (Gap) printf("];\n");
if (Gap) { PrintRawGapPcPres(); }
if (Gap & Verbose)
fprintf(stderr, "\n");
TimeOutOn();
PrintCollectionTimes();
return0;
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.0 Sekunden
(vorverarbeitet am 2026-09-11)
¤
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.