/* coordinating routine for calculation of power-commutator presentation */
int pquotient( int max_class, int output, FILE *file, int format, struct pcp_vars *pcp) /* maximum class of p-quotient to be constructed */ /* determines level of output */ /* file containing input presentation */ /* input format for data */
{ int *auts;
Logical report;
/* read parameters for computation */
if (format == BASIC || format == PRETTY) {
read_parameters(format, &max_class, &output, pcp); if (!pcp->valid) { if (isatty(0)) return FAILURE; else exit(INPUT_ERROR);
}
} elseif (format == FILE_INPUT) { if (pretty_filter(file, &max_class, &output, pcp) == INPUT_ERROR) { if (isatty(0)) return FAILURE; else exit(INPUT_ERROR);
} if (!pcp->valid) { if (isatty(0)) return FAILURE; else exit(INPUT_ERROR);
}
}
/* if appropriate, print start message for pq */ if (output > 0 && pcp->cc == 1 && file == stdin) {
printf("\nLower exponent-%d central series for %s\n", pcp->p, pcp->ident);
}
/* now calculate the pcp, proceeding class by class */ do {
report = pcp->complete;
next_class(FALSE, &auts, &auts, pcp); if (check_for_error(pcp)) return FAILURE; if (output != 0 && !pcp->complete)
print_presentation(pcp->diagn, pcp); if (report || (output == 1 && pcp->complete) || pcp->lastg < 1)
text(5, pcp->cc, pcp->p, pcp->lastg, 0); if ((pcp->cc > 1 && pcp->cc == pcp->nocset) || pcp->complete) break;
} while (pcp->cc < max_class);
/* if necessary, calculate p-multiplicator */ if (pcp->cover) {
pcp->multiplicator = TRUE;
next_class(FALSE, &auts, &auts, pcp); /* reset flag which affects next_class computation */
pcp->multiplicator = FALSE; if (check_for_error(pcp)) return FAILURE;
text(12, pcp->p, pcp->lastg - pcp->ccbeg + 1, 0, 0); if (output != 0)
print_presentation(pcp->fullop, pcp);
}
return SUCCESS;
}
staticint check_for_error(struct pcp_vars *pcp)
{ /* insufficient space */ if (pcp->overflow) { /* text (11, pcp->newgen, 0, 0, 0);
*/ if (!isatty(0)) exit(FAILURE); else return 1;
}
/* validity error */ if (!pcp->valid) {
text(16, 0, 0, 0, 0); if (!isatty(0)) exit(INPUT_ERROR); else return 1;
}
return 0;
}
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet)
¤
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 ist noch experimentell.